linux配置ARP内核参数,详细讲解linux内核参数arp_announce和arp_ignore

本文详细介绍了Linux内核参数arp_ignore和arp_announce的用法,包括它们的不同取值及对网络通信的影响。通过设置这些参数,可以控制Linux系统如何响应ARP请求,例如限制只回复特定网卡和网段的ARP请求,或者完全不响应。通过实例展示了如何清理ARP缓存并进行实验验证不同设置的效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

linux内核/proc/sys/net/ipv4/conf中下面会有各网卡的配置参数其中arp_ignore和arp_annouce与arp相关

arp_ignore 取值为integer

0 (default) :reply for any local target IP address configured on any interface

1 : reply only if the target IP address is local address configured on the incoming interface

2 : reply only if the target IP address is local address configured on the incoming interface and both with the sender‘s IP address are part from the same subnet on this interface

3 : do not reply for local address configured with scope host,only resolutions for global and link addresses are replied

4-7 : reserved

8 : do not reply for all local addresses

arp_ignore=0:此为默认值,遇到任何网卡,任何IP地址,内核都会相应arp请求

arp_ignore=1:只有IP地址配置在接收到arp请求的网卡上时,内核才会做出arp回应

arp_ignore=2:比arp_ignore多了一层限制,就是不仅要同网卡,还必须同网段

arp_ignore=3:scope为host的全部拒绝,只回应IP地址scope为global和link的

arp_ignore=8:属于自

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值