0

I am trying to add the interface wwan0 to a bridge. Currently I am unable to do that. When I run the command

brctl addif br0 wwan0

can't add wwan0 to bridge br0: Invalid argument

Any ideas why this could be happening?

edit 1: I want to bridge wwan0 which is my 3g cellular dongle and Ethernet eth0. I run the below command to get my wwan0 network activated. udhcpc -n -i wwan0 Once I have successfully completed that. I run the commands shown below.

brctl addbr br0 brctl addif br0 eth0

The above commands complete without any issues. Then I try running brctl addif br0 wwan0

thats when I get the error can't add wwan0 to bridge br0: Invalid argument

I am using a kernel version of 4.19

  • Have you defined wwan0 anywhere (WiFi is normally on wlan0) and normally the brctl command needs two adapters e.g. eth0 and wlan0 etc. –  Apr 15 '20 at 21:14
  • @Andyroo I haven't defined it manually. But I do create a wwan0 by running `udhcpc -n -i wwan0` – thesillywhat Apr 15 '20 at 21:27
  • So you need to tell the bridge which two networks you are wanting to bridge... –  Apr 16 '20 at 00:47
  • For what do you need the **wwan0** interface? Where do you get the command `udhcpc`? For what do you need it? What operating system do you use? On my default Raspbian Buster Light there isn't it available (`sudo: udhcpc: command not found`). – Ingo Apr 16 '20 at 08:57
  • @Ingo I think you have to download a package to get that. Having said that are you able to run the command `brctl addif br0 wwan0` – thesillywhat Apr 16 '20 at 14:21
  • @Andyroo I have edited my question. Maybe that should explain the issue a little better. I am trying to add `wwan0` to my bridge `br0`. I am able to add `eth0` to `br0` but not `wwan0` – thesillywhat Apr 16 '20 at 14:25
  • I would have thought the `brctl addif br0 wwan0 eth0` command would have done it though you may have to remove eth0 first. What OS are you trying to run on the board? –  Apr 16 '20 at 14:56

1 Answers1

2

It is well known that the linux bridge does not accept all interfaces, in particular WiFi interfaces to be used for a client connection to an uplink router if it does not support WDS (Wireless Distribution Service) with 4addr. For further information you can look at Raspberry Pi WiFi to Ethernet Bridge. OK, this does not fit exactly your situation but may give you an idea what could be wrong. Check if the interface is known as a WiFi interface and if it supports WDS then. If the bridge does not accept the wwan0 interface you have to use routing.

Ingo
  • 40,606
  • 15
  • 76
  • 189