arp命令 清arp表


平常刪除arp都用arp-d。大量存在的時候 arp -n|awk '/^[1-9]/ {print arp -d $1}' | sh 清除所有arp表,以前用這個來清arp表貌會清空,沒注意到存在incomplete。 今天同事發現arp-d后arp表中是incomplete。在大量IP的時候,arp-d就會存在大量的incomplete。

平常刪除arp都用arp -d。大量存在的時候
arp -n|awk '/^[1-9]/ {print "arp -d "$1}' | sh
清除所有arp表,以前用這個來清arp表貌似會清空,沒注意到存在incomplete。
今天同事發現arp -d后arp表中是incomplete。在大量IP的時候,arp -d就會存在大量的incomplete。這個要arp到期了才會消失。但是arp表滿了,無法ping了。這個時候需要如何解決呢?
發現用ip link set arp off/on來解決是最好的。
[root@localhost sbull]# arp -n
Address HWtype HWaddress Flags Mask Iface
10.66.20.38 ether 18:03:73:AF:A7:49 C eth0
10.66.255.254 ether 10:8C:CF:20:85:C4 C eth0
[root@localhost sbull]# arp -d 10.66.20.38
[root@localhost sbull]# arp -n
Address HWtype HWaddress Flags Mask Iface
10.66.20.38 (incomplete) eth0
10.66.255.254 ether 10:8C:CF:20:85:C4 C eth0
[root@localhost sbull]# arp -d 10.66.20.38
[root@localhost sbull]# arp -n
Address HWtype HWaddress Flags Mask Iface
10.66.20.38 (incomplete) eth0
10.66.255.254 ether 10:8C:CF:20:85:C4 C eth0
[root@localhost sbull]# ip link set arp off dev eth0
[root@localhost sbull]# ip link set arp on dev eth0
[root@localhost sbull]# arp -n
[root@localhost sbull]# 
本文鏈接 http://www.cxybl.com/html/czxt/linux/20130112/35993.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM