Date: Wed, 07 Mar 2001 13:32:48 CET From: Sebastien Petit <spe@bsdfr.org> To: freebsd-net@FreeBSD.org Subject: perhaps an updating local route problem when you delete an IPv4 alias Message-ID: <20010307123516.GJB433.frmta01@cha213245067102.chello.fr>
next in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex> status: active supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback> # ifconfig xl0 alias 172.16.1.2 netmask 255.255.255.255 # ifconfig xl0 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex> status: active supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010307123516.GJB433.frmta01>