user321
Posts: 3
Joined: Fri Dec 01, 2017 11:30 pm

Network bridge on stretch

Fri Dec 01, 2017 11:42 pm

Hello,

I need to have a network bridge to use it with lxc containers.
I used this code in /etc/network/interfaces on Stretch 2017-08-16, but on Stretch 2017-09-07 the network connection fails if I use it:

Code: Select all

auto br0
iface br0 inet dhcp
    bridge_ports enxb827ebeb1620
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
I want to use it on Stretch 2017-09-07. Another problem is that predictable interface names does not work on this version. The interface names are eth0 and wlan0. Can anyone help me?

User avatar
DougieLawson
Posts: 36530
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Network bridge on stretch

Sat Dec 02, 2017 1:05 am

There's a raspi-config option in latest Stretch to re-enable predictable names.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Network bridge on stretch

Sat Dec 02, 2017 1:39 am

Which interfaces do you want to bridge? I see only one interface on br0 in your /etc/network/interfaces file.

Code: Select all

    bridge_ports enxb827ebeb1620

user321
Posts: 3
Joined: Fri Dec 01, 2017 11:30 pm

Re: Network bridge on stretch

Sat Dec 02, 2017 1:59 pm

I don't want to bridge two interfaces. I need an additional interface for lxc.
I followed this tutorial https://wiki.debian.org/LXC/SimpleBridge (Host device as bridge)

epoch1970
Posts: 3864
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network bridge on stretch

Sat Dec 02, 2017 3:07 pm

To rephrase what DougieLawson said,
- either reinstate the previous behaviour regarding network interfaces names via raspi-config, this was changed between the 2 releases you've used
- or "bridge-ports eth0" from now on.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

user321
Posts: 3
Joined: Fri Dec 01, 2017 11:30 pm

Re: Network bridge on stretch

Sat Dec 02, 2017 7:13 pm

Is it possible to do this with wlan0? I read that wifi does not support bridging because it is not possible to have multiple mac adresses for one wifi interface.

sparkie777
Posts: 121
Joined: Tue Nov 27, 2012 4:37 am

Re: Network bridge on stretch

Sun Dec 03, 2017 2:05 pm

user321 wrote:
Sat Dec 02, 2017 7:13 pm
I read that wifi does not support bridging because it is not possible to have multiple mac adresses for one wifi interface.
it depends. Basically bridging is possible always.

- wlan configured as a wireless access point easily supports bridging
- wlan configured as a wireless client basically supports bridging too (with some constraints). And only with some tweaking around. Further reading: BridgeNetworkConnectionsProxyArp - Debian Wiki (this overcomes the "multiple mac addresses for one wifi interface" problem)

epoch1970
Posts: 3864
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network bridge on stretch

Sun Dec 03, 2017 3:03 pm

sparkie777 wrote:
Sun Dec 03, 2017 2:05 pm
- wlan configured as a wireless client basically supports bridging not
FTFY.
Let's keep it simple and clear. It does not work out of the box, hacking around this limit is fiddly and once you're a hero and done you'll be rewarded with poor service.
Just use routing in this case. There are many "bridging wifi" threads on this forum that actually relate to routing...
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

sparkie777
Posts: 121
Joined: Tue Nov 27, 2012 4:37 am

Re: Network bridge on stretch

Sun Dec 03, 2017 3:51 pm

epoch1970 wrote:
Sun Dec 03, 2017 3:03 pm
It does not work out of the box,
that's what I said.

Return to “Advanced users”