zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    集合
    字典
    元组
    列表
    数字类型和字符串类型
    Python 数据类型
    jq的一点点
    常用到jq的ajax
    上传
    下载
  • 原文地址:https://www.cnblogs.com/zhouhbing/p/4599780.html
Copyright © 2011-2022 走看看