[Gllug] Bridge problems (Ubuntu)

John Edwards john at cornerstonelinux.co.uk
Tue Jun 28 10:41:06 UTC 2011


On Tue, Jun 28, 2011 at 09:52:37AM +0100, Adrian McMenamin wrote:
> I thought I had all my bridge problems solved (bridging an ethernet and
> wireless connection) but we had a powercut on Sunday night and as I had
> set the bridge up on the command line rather than through
> /etc/network/interfaces, I had to do that again and I just cannot get it
> to come back up properly - the issue seems to be a routing one.
> 
> I have wasted a day of my life trying to fix this to no avail so hope that
> someone here can identify what I am getting wrong - apologies for the
> length and thanks for your forbearance.
> 
> This is a small home network with the commodity router (a really poor
> piece of kit but which supports Talk Talk's video streaming so needs to
> stay) and the box on which I am trying to bridge the interfaces on all the
> time. The box provides squid proxy, DNS, email and a web server (webmail -
> as I am using now) to the network, so really needs to be reachable!
> 
> The box's ethernet address is 192.168.62.104 - which has to be preserved
> (or at least it has to come back at a known address every time given the
> services it provides to the network).
> 
> So - typically... (with wlan0 under hostapd control)
> 
> I have
> 
> auto eth0 wlan0
> iface eth0 dhcp
> 
> 
> Then go to command line and type:
> 
> sudo brctl addbr br0
> sudo brctl stp br0 on  # have some other bridges (eg plug adapters) on
> network
> sudo brctl addif br0 eth0 wlan0
> sudo ifconfig br0 up
> 
> 
> Typically this results in a complete loss of routing ie I cannot even ping
> 192.168.62.1 (commodity router) from this box

Is there any mention of br0 in /etc/network/interfaces ?

You seem to be using DHCP for eth0 and not br0, which means that
when you create the br0 interface it has no IP address.

Try something like:
--------
# The primary network interface
auto eth0
iface eth0 inet manual

# Bridge primary and wireless network interfaces
auto br0
iface br0 inet dhcp
      bridge_ports eth0 wlan0
      bridge_stp on
--------

With this you should not need to mess with brctl except when
debugging.

The only thing I'm not sure about is hostapd. If that allocates
IP address or routing information then those may need to be given
to br0 instead of wlan0.


-- 
#---------------------------------------------------------#
|    John Edwards   Email: john at cornerstonelinux.co.uk    |
#---------------------------------------------------------#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 205 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20110628/93f8b94a/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list