Linux透明网桥


重编译内核(2.6.38.8)开启 802.1d Ethernet Bridging 
-*- Networking support  --->
    Networking options  ---> 
         <*> 802.1d Ethernet Bridging 
         
系统开启uRPF(单播反向路径转发)与IP转发
sysctl -w net.ipv4.conf.default.rp_filter=1
sysctl -w net.ipv4.conf.all.rp_filter=1
sysctl -w net.ipv4.ip_forward=1
brctl addbr br0
brctl addif br0 eth1 
brctl addif br0 eth2
ifconfig eth1 0.0.0.0 up promisc
ifconfig eth2 0.0.0.0 up promisc
ifconfig br0 up


注: 
eth1 连 Lan1
eth2 连 Lan2

A1 在Lan1中,IP 10.1.100.227
A2 在Lan2中,IP 10.1.100.228


这样A1与A2通过br0这个透明的桥就可以连起来了


http://hi.baidu.com/sing520/item/56418e51ebb02da8adc85701


原文地址:https://www.cnblogs.com/mull/p/4477838.html