D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] brctl & startup

 

Simon,

Thanks so much, sometimes I cant see the wood for the trees.

<Bangs head on table>

Cheers for the help ;)


On 14/05/07, Simon Waters <simon@xxxxxxxxxxxxxx> wrote:
> Terry Hill wrote:
> >
> > Thing is, if I type the above manually, all works fine.  If I use it
> > in a script, which I link to the relevant rc.d it run the script at
> > startup but hangs when it adds the first eth to the bridge.  Bear in
> > mind i've killed all relevant (conflicting) bits like dhcp etc. from
> > the startup.
>
> The Debian way would be to do it via /etc/network/interfaces, as then it
> happens when it should - much safer. Just add the options as "up" or
> "post-up" lines to the end of the eth0 section.
>
> My Redhat box has a script like...
>
> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 eth1
>
> ifconfig eth0 0.0.0.0
> ifconfig eth1 0.0.0.0
> ifconfig br0 ip.ad.re.ss netmask 255.255.255.0
>
> if [ -f /etc/sysconfig/static-routes ]; then
>   grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
>               /sbin/route add -$args
>   done
> fi
>
> Where eth0 starts with the same IP address br0 ends up with. eth1 starts
> with a meaningless address (10.0.0.2).
>
> The key points being I give the bridge interface the same IP address as
> eth0 had, and I add the static routes again, as they were applied to the
> eth0 or eth1 interface, which will no longer work in my config.
>
> I don't know which of these are absolutely required, and which I did out
> of misguided sticking to the manual, but they seem logical enough steps.
>
>  Simon
>
>
> --
> The Mailing List for the Devon & Cornwall LUG
> http://mailman.dclug.org.uk/listinfo/list
> FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html
>
>
>

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html