How does the OS decide which source IP address to put into an outgoing packet?

David Tonhofer, m-plify S.A. d.tonhofer at m-plify.com
Tue Apr 5 15:28:40 UTC 2005


Hi,

I was just wondering how the OS (in this case, RH ES 3.0)
decides which IP address to put into an outgoing packet.

I have an interface with several IP addresses assigned to it,
i.e. there I have the following setup:

eth0:   - IP address 1 on subnet 1, a /28 subnet
eth0:0  - IP address 2 on subnet 1, a /28 subnet
eth0:1  - IP address 1 on subnet 2, a /27 subnet
eth0:2  - IP address 2 on subnet 2, a /27 subnet

I always thought outgoing packets would have the address of
eth0. To my surprise, they have the address of eth0:1.

If anyone has a hint on why this might be so, please do tell.

Best regards,

-- David
















More information about the redhat-list mailing list