mardi 24 mars 2015

Clear the arp cache on linux, really


Both:



sudo ip -s -s neigh flush all


And:



sudo arp -d 192.168.0.102


Instead of clearing the arp cache they seem to just invalidate entries (they will appear as incomplete). Even after some minutes, the ARP cache looks like:



$ arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.0.103 (incomplete) eth0
192.168.0.1 ether DE:AD:BE:EF:DE:AD C eth0


(The MAC of the gateway has been refreshed - that is ok)


How can I really clear the ARP cache, like in "delete all entries from the table"? I do not want to keep incomplete entries, I want them removed. Is this possible?


EDIT


This is my system:



» arp --version
net-tools 1.60
arp 1.88 (2001-04-04)
+I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE
HW: (ether) +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64

» lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

» uname -a
Linux polyphemus.xxx-net 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Aucun commentaire:

Enregistrer un commentaire