Peter Rundle wrote:brctl addbr br0 brctl stp br0 off brctl addif br0 eth0 brctl addif br0 eth1 ifconfig eth0 down ifconfig eth1 down ifconfig eth0 0.0.0.0 up ifconfig eth1 0.0.0.0 up echo 1 >/proc/sys/net/ipv4/ip_forward ifconfig br0 192.168.0.254 up
I've just setup bridging for a VPN using the same process as above and have found that if I put the steps in a script (FC1) it doesn't work. IE you get a situation like the following (I've removed the Metric and Ref columns for wrapping purposes):
Main routing table directly after running script: Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.100.0 * 255.255.255.0 U br0 192.168.100.0 * 255.255.255.0 U eth1 10.0.0.0 * 255.0.0.0 U eth0 127.0.0.0 * 255.0.0.0 U lo default 10.1.1.3 0.0.0.0 UG eth0
Main routing table 10 or so seconds later: Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.100.0 * 255.255.255.0 U eth1 192.168.100.0 * 255.255.255.0 U eth1 10.0.0.0 * 255.0.0.0 U eth0 127.0.0.0 * 255.0.0.0 U lo default 10.1.1.3 0.0.0.0 UG eth0
Which then of course screws it all right up and doesn't work. I have absolutely no idea why - still looking. If I type out the individual commands in the script by hand it works fine, and I end up with:
Destination Gateway Genmask Flags Iface 192.168.100.0 * 255.255.255.0 U br0 10.0.0.0 * 255.0.0.0 U eth0 127.0.0.0 * 255.0.0.0 U lo default 10.1.1.3 0.0.0.0 UG eth0
I've even tried putting a sleep 2 (5 and 10 as well) between the last two lines (ie bringing eth1 up with 0.0.0.0 promisc and bringing br0 up) and it doesn't help I get:
Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.100.0 * 255.255.255.0 U eth1 192.168.100.0 * 255.255.255.0 U br0 10.0.0.0 * 255.0.0.0 U eth0 127.0.0.0 * 255.0.0.0 U lo default 10.1.1.3 0.0.0.0 UG eth0
And it still doesn't work. No idea but it only just happened last thing yesterday so still looking around for a cause/fix. I know this doesn't really deal with the original problem, but couldn't help commenting.
Fil -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
