linux 双网卡在同一网段的解决办法
来源:互联网 发布:典狱司歌词含义知乎 编辑:程序博客网 时间:2024/05/19 12:12
Multiple Interfaces on Same Ethernet Broadcast Network
------------------------------------------------------
Due to the default ARP behavior on Linux, it is not possible to have
one system on two IP networks in the same Ethernet broadcast domain
(non-partitioned switch) behave as expected. All Ethernet interfaces
will respond to IP traffic for any IP address assigned to the system.
This results in unbalanced receive traffic.
If you have multiple interfaces in a server, either turn on ARP
filtering by entering:
echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
(this only works if your kernel's version is higher than 2.4.5),
NOTE: This setting is not saved across reboots. The configuration
change can be made permanent by adding the line:
net.ipv4.conf.all.arp_filter = 1
to the file /etc/sysctl.conf
or,
install the interfaces in separate broadcast domains (either in
different switches or in a switch partitioned to VLANs).
vi /etc/rc.local
也可尝试以下方法(本人测试, 不能很好解决)
增加以下内容:
route add -net 0.0.0.0 netmask 0.0.0.0 gw 0.1.52.1 dev eth0
route add -net 0.0.0.0 netmask 0.0.0.0 gw 0.1.52.1 dev eth2
ip route add to 0.0.0.0/0 via 10.1.52.1 dev eth0 table 10
ip route add to 0.0.0.0/0 via 10.1.52.1 dev eth2 table 20
ip rule add from 10.1.52.226/32 table 10
ip rule add from 10.1.52.228/32 table 20
- linux 双网卡在同一网段的解决办法
- 双网卡在同一网段的解决办法
- 双网卡在同一网段的解决办法
- 双网卡在同一网段的解决办法
- Linux双网卡设置IP属于同一网段的问题
- Linux双网卡设置IP属于同一网段的问题
- Linux双网卡设置IP属于同一网段的问题
- Linux下多网卡不同IP在同一网段的情况
- 同一网段,双网卡配置
- 多网卡在同一网段内的问题
- Linux下多块网卡同一网段连通配置
- 双网卡设置同一网段IP
- 在同一网段和不同网段通信的区别
- linux同一网段文件传输
- 关于linux的默认网关,双网卡不同网段
- 设置虚拟机linux和主机IP在同一网段
- linux虚拟机和物理机在同一网段
- 关于虚拟机linux无法与主机在同一网段
- 里name和id的差别
- 日记: 2010-07-30 星期五
- 编译错Inconsistent accessibility
- 苦战两天以后的成果,SQL ,Executesql,带输入及输出传参的
- Cygwin for Geomview 的安装和配置
- linux 双网卡在同一网段的解决办法
- 耶鲁大学开放课程:博弈论
- 数据结构-双链表
- android 线程,服务,活动
- 软件管道规则
- Nokia论坛filelogger中不能直接使用的原因
- 祝福!
- asp.net 页面清除缓存
- android 的sqlite 主键与simpleCursorAdapter