根本原因:
默认启用了反向路由检查
如果2个网卡在一个Lan里面,那么服务器可能从eth0或者eth1发现网关, 如果一个包从eth0进入了, 而网关在eth1上, 那么从eth1是出不去的, 就不通了. 反向路由检查要求从哪里来的才能回哪去.
关闭反向路由检查(根据自己的情况替换第二第三行的网卡名):
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter
以上就是本篇文章【转:Linux 双网卡配置两个IP同时只有一个会通的原因】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/news/11563.html
栏目首页
相关文章
动态
同类文章
热门文章
网站地图
返回首页 企库往资讯移动站 https://sicmodule.kub2b.com/mobile/ , 查看更多