[clug] TCP Source Address
Martijn van Oosterhout
kleptog at svana.org
Fri Oct 17 15:26:09 EST 2003
Unless the program specifies itself, the source is determined by the route
used to go out. If the route of the destination is routed through eth0:1
rather than eth0 you may get the effect you're seeing.
Note, I've never seen the problem you're seeing but if you're using the new
iproute tools you can control this better. The output of "ip route" includes
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.2
IIRC, It's the "src" that you want to look at. It *may* be possible to do
this with the older tools, I don't know.
Hope this helps,
On Fri, Oct 17, 2003 at 03:05:23PM +1000, Brett Worth wrote:
> When a TCP connection is established how is the source IP address
> I have a machine (A) that has an ethernet interface eth0 and that
> same interface also has an alias eth0:1
> When I connect from A to a another machine (B) and do a 'who am i'
> I randomly see either the eth0 address or the eth0:1 alias.
> A netstat -r shows only the eth0 and lo Iface's and not the alias.
> I dont really want the alias to ever be the source address. Is there
> some way to hard wire this?
Martijn van Oosterhout <kleptog at svana.org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20031017/1deda5f4/attachment.bin
More information about the linux