zoukankan      html  css  js  c++  java
  • 如何在Linux下关闭ARP协议

    方法一:临时关闭ARP协议

    echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_ignore
    echo 2 > /proc/sys/net/ipv4/conf/eth0/arp_announce

    方法二:永久关闭ARP协议

    net.ipv4.conf.ens33.arp_ignore = 1

    net.ipv4.conf.ens33.arp_announce = 2

    或:

    net.ipv4.conf.ens33.arp_ignore = 1

    net.ipv4.conf.ens33.arp_announce = 2

    net.ipv4.conf.all.arp_ignore = 1

    net.ipv4.conf.all.arp_announce = 2

    net.ipv4.conf.lo.arp_ignore = 1

    net.ipv4.conf.lo.arp_announce = 2

    参数说明:

    arp_ignore 为:1  #  - 只回答目标IP地址是访问本网络接口(ens33)的ARP查询请求。

    在设置参数的时候将arp_ignore 设置为1,意味着当别人的arp请求过来的时候,如果接收的网卡设备上面没有这个ip,就不做出响应,默认是0,只要这台机器上面任何一个网卡设备上面有这个ip,就响应arp请求,并发送mac地址。

     

    arp_announce 为2 #  - 对查询目标使用最适当的本地地址。例如,如果在ens33接口上接受到了一个VIP的arp请求包。内核判断这个VIP地址是不是ens33接口上的IP一样。如果一样,则回复这个包。如果不一样,就丢弃不回应。

  • 相关阅读:
    生成doc
    Struts2 配置
    Struts(一)struts2.2概述与MVC模式深度剖析
    [DOM Event Learning] Section 4 事件分发和DOM事件流
    jquery 高亮显示案例
    jquery 下拉菜单
    3_1:操作样式
    2_2:筛选器
    2_1:选择元素
    本地存储小案例:记住用户名
  • 原文地址:https://www.cnblogs.com/hgd3279137708/p/12244511.html
Copyright © 2011-2022 走看看