what i need is configure my machine(3 interface, eth0, eth1, priv0--
switch interface) as a whole net bridge, and make all the subnets in
interface priv0 still works. when i user brctl to add all the three
interface into a new create bridge i.e. interface br0, all the subnets
seems not work,
then i add iptables SNAT rules to try to add a virtual ip for the new
interface br0, it seems still not work,then i config the new bridge to
make it have the same mac as priv0, it seems works. i think it is
because the host have arp table cached, however after clear the host's
arp table the machine can still connect to the host(using ping), the
detail step are list below:
host 188.1.1.9 connect to priv0
priv0 188.1.1.2 mac xx:xx:xx:xx:xx:64
1 brctl addbr new
2 brctl addif new eth0
3 brctl addif new eth1
4 brctl addif new priv0
---after that ping 188.1.1.9 stop work
5 iptables -t nat -A POSTROUTING -j SNAT --to-source 188.1.1.2
---ping 188.1.1.9 still not work
6 ifconfig new hw ether xx:xx:xx:xx:xx:64
--ping 188.1.1.9 start work
7 goto 188.1.1.9 arp -d 188.1.1.2
--ping 188.1.1.9 from machine still work
any one can tell me why? and any better solusion?
|