kern/139113: removing IP alias doesn't delete permanent arp entry

Mykhaylo mclone at gmail.com
Thu Sep 24 13:50:02 UTC 2009


>Number:         139113
>Category:       kern
>Synopsis:       removing IP alias doesn't delete permanent arp entry
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 24 13:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Mykhaylo
>Release:        RELENG_8
>Organization:
Xata
>Environment:
FreeBSD Ch.TigerNet.com.ua 8.0-RC1 FreeBSD 8.0-RC1 #0: Tue Sep 22 06:05:59 EEST 2009     bogon at Trango.local:/usr/obj/usr/src/sys/Trango  amd64
>Description:
I wanted to change IP address on client laptop (FreeBSD 8.0-BETA4 #3: Wed Sep  9 15:22:34 EEST 2009 amd64), but noticed i forgot to remove this ip from the same interface on gateway that i was connected too (famous "is using my ip address" woe). I switched client IP back, ssh'ed gateway and removed offending alias, When i tried to use this IP again, there were no no ARP replies from gateway. Then i ssh'ed to gateway another time, and i saw there still was permanent arp entry in gateway's arp table for an IP alias i just removed. 

Issuing "arp -d <deleted.alias.ip>" did not help - arp(8) reported successfull deletion, but there was still this permanent entry in arp table.

So there is no way to delete permanent arp table entry on host, for an IP which was this host's IP alias.

Workaround is to reload if_re module and reconfigure the NIC.

>How-To-Repeat:
18:53 combiner at Ch:~> ifconfig
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:1f:d0:26:67:6a
        inet 94.231.187.10 netmask 0xfffffffc broadcast 94.231.187.11
        media: Ethernet 10baseT/UTP <full-duplex>
        status: active
re1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:1f:d0:26:6d:9a
        inet 10.35.52.254 netmask 0xffffff00 broadcast 10.35.52.255
        inet 10.35.52.42 netmask 0xffffff00 broadcast 10.35.52.255
        inet 10.35.52.252 netmask 0xffffff00 broadcast 10.35.52.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8149<UP,LOOPBACK,RUNNING,PROMISC,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> metric 0 mtu 1460
        syncpeer: 224.0.0.240 maxupd: 128
pflog0: flags=0<> metric 0 mtu 33152
18:56 combiner at Ch:~> s ifconfig re1 delete 10.35.52.42
18:56 combiner at Ch:~> ifconfig
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:1f:d0:26:67:6a
        inet 94.231.187.10 netmask 0xfffffffc broadcast 94.231.187.11
        media: Ethernet 10baseT/UTP <full-duplex>
        status: active
re1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:1f:d0:26:6d:9a
        inet 10.35.52.254 netmask 0xffffff00 broadcast 10.35.52.255
        inet 10.35.52.252 netmask 0xffffff00 broadcast 10.35.52.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8149<UP,LOOPBACK,RUNNING,PROMISC,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> metric 0 mtu 1460
        syncpeer: 224.0.0.240 maxupd: 128
pflog0: flags=0<> metric 0 mtu 33152
18:57 combiner at Ch:~> arp0
? (10.35.52.252) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (10.35.52.222) at 00:a0:d1:96:bb:09 on re1 [ethernet]
? (10.35.52.254) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (10.35.52.42) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (94.231.187.10) at 00:1f:d0:26:67:6a on re0 permanent [ethernet]
? (94.231.187.9) at 00:02:b3:25:f8:ec on re0 [ethernet]
18:58 combiner at Ch:~> s arp -d 10.35.52.42
10.35.52.42 (10.35.52.42) deleted
18:59 combiner at Ch:~> arp0
? (10.35.52.252) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (10.35.52.222) at 00:a0:d1:96:bb:09 on re1 [ethernet]
? (10.35.52.254) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (10.35.52.42) at 00:1f:d0:26:6d:9a on re1 permanent [ethernet]
? (94.231.187.10) at 00:1f:d0:26:67:6a on re0 permanent [ethernet]
? (94.231.187.9) at 00:02:b3:25:f8:ec on re0 [ethernet]

>Fix:
kldunload if_re
kldload if_re
sleep 11
/etc/rc.d/netif restart
/etc/rc.d/routing restart

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list