>Example:
> ifconfig ed0 10.0.0.1
> ping 10.0.0.20 # works fine
> ifconfig ed0 10.0.0.2
> ping 10.0.0.20 # no reply, tcpdump shows traffic coming from 10.0.0.1
> route delete 10.0.0.2
> ping 10.0.0.20 # now things work as expected
>So it seems that the old address is stored somewhere in the routing
>table, but "netstat -raA" does not show it (and the 'aA' flags
>are supposed to dump the whole tree if i get it right).
>Any idea on where the old address is stored ?
try using
# route -n get 10.0.0.0
and you'll see rt_ifa holding pointer to 10.0.0.1. rt_ifa is used for
source address selection.
IMHO IPv4 code is not very friendly with multiple addresses on single
interface. i believe the following items are assumed for the use
of rt_ifa.
- 1 interface address per a interface
- interface address do not change too frequently (or set on boot time)
- only destination address matters to source address selection
if we do not assume the following, we should (1) compute source address
every time from rt_ifp and destionation address, or (2) refresh rt_ifa
every time interface address changes. not sure which one is better -
(2) has problem with manually configured rt_ifa (some people controls
source address selection by route -ifa).
itojun
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message