莱因电博

Li-e.cn

Li Internet Electronic Blog
@rss

Linux有关rp_filter的简单说明

A brief explanation of ‘rp_filter’ in Linux

————————————————————

rp_filter 组播过滤

PS: 只想关闭一个接口的 rp filter,应该把 net.ipv4.conf.all.rp_filter 调整为0,并开启其他接口的 rp filter,再调整目标接口的 rp filter 为0.

一直接收

rp_filter 在一段时间后没有收到数据会关闭接收;如需一直启用,需要设置为2:

echo "2" > /proc/sys/net/ipv4/conf/default/rp_filter
echo "2" > /proc/sys/net/ipv4/conf/all/rp_filter

echo "2" > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo "2" > /proc/sys/net/ipv4/conf/eth1/rp_filter
......
echo "2" > /proc/sys/net/ipv4/conf/eth11/rp_filter
(C) 2019 - 2024 Li-e.cn莱因电博(立网电子博客) | Powered by Vercel , based on Hugo with Gists theme.