Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2001 10:30:00 +0900
From:      itojun@iijlab.net
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        net@freebsd.org
Subject:   Re: annoying bug on routing tables...
Message-ID:  <3448.979608600@coconut.itojun.org>
In-Reply-To: rizzo's message of Mon, 15 Jan 2001 17:03:55 PST. <200101160103.f0G13tj02682@iguana.aciri.org>

next in thread | previous in thread | raw e-mail | index | archive | help

>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 majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3448.979608600>