From owner-freebsd-net Wed Mar 7 4:35:28 2001 Delivered-To: freebsd-net@freebsd.org Received: from frmta01.chello.fr (smtp.chello.fr [212.186.224.12]) by hub.freebsd.org (Postfix) with ESMTP id 1AA0037B718 for ; Wed, 7 Mar 2001 04:35:23 -0800 (PST) (envelope-from spe@bsdfr.org) Received: from cha213245067102.chello.fr ([213.245.67.102]) by frmta01.chello.fr with ESMTP id <20010307123516.GJB433.frmta01@cha213245067102.chello.fr> for ; Wed, 7 Mar 2001 13:35:16 +0100 Date: Wed, 07 Mar 2001 13:32:48 CET From: Sebastien Petit To: freebsd-net@FreeBSD.org Subject: perhaps an updating local route problem when you delete an IPv4 alias Reply-To: spe@bsdfr.org X-Mailer: Spruce 0.6.5 for X11 w/smtpio 0.7.9 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <20010307123516.GJB433.frmta01@cha213245067102.chello.fr> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi FreeBSD team, Consider this manipulation on host A: # netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 172.16 link#1 UC 0 0 xl0 => # ifconfig xl0 xl0: flags=8843 mtu 1500 inet 172.16.1.1 netmask 0xffff0000 broadcast 172.16.255.255 inet6 fe80::250:daff:fe66:aa87%xl0 prefixlen 64 scopeid 0x1 ether 00:50:da:66:aa:87 media: 100baseTX status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP 100baseTX # ifconfig xl0 alias 172.16.1.2 netmask 255.255.255.255 # ifconfig xl0 xl0: flags=8843 mtu 1500 inet 172.16.1.1 netmask 0xffff0000 broadcast 172.16.255.255 inet6 fe80::250:daff:fe66:aa87%xl0 prefixlen 64 scopeid 0x1 inet 172.16.1.2 netmask 0xffffffff broadcast 172.16.1.2 ether 00:50:da:66:aa:87 media: 100baseTX status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP 100baseTX At this step, all is good. When you ping 172.16.1.2 for example, kernel (I think) create a Local Host route (UHLW) for 172.16.1.2 to 00:50:da:66:aa:87 (mac address of xl0) and for 172.16.1.2/32 to link#1 (UC). # ping 172.16.1.2 (...) # netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 172.16 link#1 UC 0 0 xl0 => 172.16.1.2 0:50:da:66:aa:87 UHLW 0 4 lo0 => 172.16.1.2/32 link#1 UC 0 0 xl0 => A problem of updating route appears when you delete the IPv4 alias on the interface like this: # ifconfig xl0 delete 172.16.1.2 netmask 255.255.255.255 # netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 172.16 link#1 UC 0 0 xl0 => 172.16.1.2 0:50:da:66:aa:87 UHLW 0 4 lo0 => route to 172.16.1.2/32 is destructed so it's ok no problem, but route to 172.16.1.2 seems to stay and no deletion is performed. So a permanent arp entry exist for this IPv4 address (172.16.1.2): # arp -a -n ? (172.16.1.1) at 0:50:da:66:aa:87 permanent [ethernet] ? (172.16.1.2) at 0:50:da:66:aa:87 permanent [ethernet] This permanent entry is due to the problem route. So if another host B on the network own 172.16.1.2 IPv4 address, this host B send a gratuitous arp but host A don't update arp cache because permanent entry cannot be removed by a gratuitous arp. So If you want that host A communicate with host B and know the *real* arp entry, you must delete by hand this wrong route. Do you think that ifconfig must delete this route if it exist ? PS: problem does not appear when host A don't try to communicate with his IPv4 alias. Cheers. -- Sebastien Petit spe@bsdfr.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message