On Fri, May 13, 2005 at 09:04:47AM +1000, Phil Scarratt wrote: > >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: interesting - have your tried a bash -x
quick look at man ifconfig suggests, I could be wrong but
ifconfig eth0 0.0.0.0 up - should be split into
ifconfig eth0 up
ifconfig eth0 0.0.0.0
from man
SYNOPSIS
ifconfig [interface]
ifconfig interface [aftype] options | address ...
seems like there is a | between options and address ! or maybe the
address should come before any options !
>
> 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
>
signature.asc
Description: Digital signature
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
