You are not logged in.

#1 2008-11-22 23:36:27

11010010110
Member
Registered: 2008-01-14
Posts: 284

bridge network interfaces in startup

i asked here before about internet sharing and some1 showed me howto bridge the network interfaces in rc.local

it works but the dhcp part fails.

i need to run dhcpcd -k br0 and then dhcpcd br0 to connect




i want a bridge that

is set up on each boot

gets dhcp automatically at boot

managed by network-deamon ie if i plug in a network cable at any time it is recognized and probed for dhcp automatically

i saw people doing it for their virtual machines directly in rc.conf but did not understand how to do that with 2 real netcards

how can i make a bridge like that ?

Offline

#2 2008-11-24 17:58:13

11010010110
Member
Registered: 2008-01-14
Posts: 284

Re: bridge network interfaces in startup

anybody ?

Offline

#3 2010-01-19 22:51:41

conrausch
Member
Registered: 2010-01-19
Posts: 2

Re: bridge network interfaces in startup

This is a (known) problem with bridge utils, a new bridge will not send packages for 30 seconds by default (it might bring down some of the more complex network topologies)

See http://www.linuxfoundation.org/collabor … _bridge.3F
and http://bugs.archlinux.org/task/16625

You can fix it by adding a line in /etc/rc.d/network:

....
159                        /usr/sbin/brctl addbr $br
160 *                      /usr/sbin/brctl setfd $br 0
161                        eval brifs="\$bridge_${br}"
162                        for brif in $brifs; do
...

I added the line beginning with the *, the numbers are line numbers as a hint to where to put it.

On a side node, you micht want to try eth0="eth0 0.0.0.0" instead of "eth0 up" in your rc.conf, assuming that eth0 is a part of your bridge, as also noted in the bug report linked above.

HTH, conrausch

Offline

#4 2010-03-22 08:21:54

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 202

Re: bridge network interfaces in startup

Nevermind, I'm a total n00b apparently.

Last edited by HyperBaton (2010-03-22 08:23:02)

Offline

Board footer

Powered by FluxBB