Re: Selecting source ip
On Wed, May 28, 2003 at 03:30:20PM -0700, brian moore wrote:
> You could change how it behaves be swapping eth0 and eth0:1, assuming
> they are both on the same subnet.
My guess is that linux doesn't decide which interface is closer to the
destination trough the interface number. It depends on your route to the
destination (default route in most cases) and the subnet of the interfaces.
For instance, if you have 2 interfaces, eth0 and eth0:1, where eth0 has
ip 220.127.116.11 netmask 255.255.255.255, and where eth0:1 has ip 18.104.22.168 netmask
255.255.255.0, and the default gateway is 22.214.171.124, the ip the kernel will
pick is 126.96.36.199, and not 188.8.131.52.
I could be wrong though :-)
Bart Matthaei firstname.lastname@example.org
There's no sex in struct sockaddr_in ..