From owner-freebsd-net Mon Jan 15 17:30:33 2001 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id B2BC037B698 for ; Mon, 15 Jan 2001 17:30:14 -0800 (PST) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W) with ESMTP id KAA03450; Tue, 16 Jan 2001 10:30:00 +0900 (JST) To: Luigi Rizzo Cc: net@freebsd.org In-reply-to: rizzo's message of Mon, 15 Jan 2001 17:03:55 PST. <200101160103.f0G13tj02682@iguana.aciri.org> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: annoying bug on routing tables... From: itojun@iijlab.net Date: Tue, 16 Jan 2001 10:30:00 +0900 Message-ID: <3448.979608600@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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