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
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message