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

转载于:https://www.cnblogs.com/zhouhbing/p/4599780.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值