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了。這個時候需要如何解決呢?
發現用iplinksetarpoff/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
總結
以上是生活随笔為你收集整理的arp命令 清arp表的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《鸣潮》长离声骸搭配推荐
- 下一篇: 医用一次性奶瓶可以用二次吗