[ILUG] IP aliases in different subnets
Jakma, Paul
Paul.Jakma at compaq.com
Fri Jan 21 13:51:52 GMT 2000
> default gateway? Is it sufficient that the linux box knows that there
> is *one* way out, even if it's on a different subnet?
>
afaik, yes. the default gateway is global, and if the outgoing IP doesn't
match a static route it will go to the gateway.
eg at home when connected to the net i have eth0 on net1, tap0 on net1
(diald) and ppp0 on isp-net. Default points to ppp0, and i've never seen any
problems with packets not getting out. Not exactly the same as your
situation, but still.
however, i'm not sure that it's guaranteed that the outgoing source IP
address will be the same as the IP the process bound the socket to. Eg even
if bind binds to x.y.z.a, the source IP when it leaves the interface might
well be that of the interface. I'm pretty sure i've seen a lot of talk about
this behaviour of linux on linux-kernel. (but my memory is hazy).
best thing to do is try it out. I'm sure the routing will work, but i'm not
sure you will get the desired effect of knowing that all traffic from
process A will have src ip of x.y.z.a on all outbound interfaces. I assume
you want this for firewalling/logging, right?
regards,
Paul Jakma.
More information about the ILUG
mailing list