20

I have the same problem as this guy : Bring down and delete bridge interface that's up

But that solution does not work for me.

I remove all interfaces from the bridge using brctl delif . I then set the link to down using either ifconfig or ip. I then try to remove the bridge using brctl br0 "bridge br0 is still up; can't delete it".

The platform is Raspbian on a Raspberry Pi.

Any ideas?

Identical output from ifconfig and ifconfig -a :

br0   Link encap:Ethernet  HWaddr 54:e6:fc:89:be:4b
      inet6 addr: fe80::56e6:fcff:fe89:be4b/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 B)  TX bytes:6569 (6.4 KiB)

eth0  Link encap:Ethernet  HWaddr b8:27:eb:47:0d:a5
      inet addr:192.168.2.29  Bcast:192.168.2.255  Mask:255.255.255.0
      inet6 addr: fe80::ba27:ebff:fe47:da5/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:287 errors:0 dropped:0 overruns:0 frame:0
      TX packets:389 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:25109 (24.5 KiB)  TX bytes:64247 (62.7 KiB)

lo    Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

mon.wlan1 Link encap:UNSPEC  HWaddr 54-E6-FC-89-BE-4B-00-00-00-00-00-00-00-00-00-00
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:277 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:62535 (61.0 KiB)  TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet  HWaddr 80:1f:02:84:f8:3f
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:15 errors:0 dropped:17 overruns:0 frame:0
      TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:3828 (3.7 KiB)  TX bytes:1294 (1.2 KiB)

wlan1 Link encap:Ethernet  HWaddr 54:e6:fc:89:be:4b
      inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
      inet6 addr: fe80::56e6:fcff:fe89:be4b/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:0 (0.0 B)  TX bytes:21016 (20.5 KiB)
LinusK
  • 351
  • 1
  • 2
  • 6
  • Can you share the output of `ifconfig` and `ifconfig -a`? – njsg Jan 27 '13 at 16:52
  • 2
    Then `br0` is still up. So it's not surprising that you get the error you get. Maybe try `ifconfig br0 down`? – njsg Jan 27 '13 at 21:02
  • Maybe I wasn't clear enough in my question. I already tried that. Both using ifconfig and ip link. – LinusK Jan 28 '13 at 06:58
  • Maybe you have some kind of daemon running and automagically starting available network devices? Whatever is happenning, you need it to stop being UP before destroying the bridge. – njsg Jan 28 '13 at 08:11
  • Removing all Jails and plugins resolved this for me. –  Mar 23 '15 at 19:57
  • This is a double of [bring down and delete bridge interface thats up](https://unix.stackexchange.com/questions/31763/bring-down-and-delete-bridge-interface-thats-up). There is a working answer. – Ulrich-Lorenz Schlüter May 27 '17 at 08:17

6 Answers6

41

According to the other post you've already linked, this shuld help

ifconfig br0 down
brctl delbr br0
Bonsi Scott
  • 2,473
  • 1
  • 16
  • 16
11
ifconfig br100 down

or

ip link set dev br100 down
firo
  • 401
  • 4
  • 9
2

Remove all network interfaces from the bridge:

brctl delif brX ethX

Bring the bridge down:

ifconfig brX down

Remove the bridge:

brctl delbr brX
Axel
  • 21
  • 1
2

I also had this problem on raspberry pi. When I tried to remove a bridge, E.g brctl delbr br0 I got

bridge br0 is still up; can't delete it

I tried what Bonsi Scott suggested, but I had no success.

So I did a lsmod

Module                  Size  Used by
bridge                 90721  0

and saw that the bridge module is not in use.

I don't understand why I can't remove the bridge if the module is not in use.

As a workaround I unloaded the kernel module.

modprobe -r bridge

and loaded the module again

modprobe bridge

Both (unload and load) worked and the bridge interface was gone. I verified this with ifconfig.

Hopefully that helps someone.

René Link
  • 121
  • 4
2

I removed the package bridge-utils and br0 seemed to disappear. This solution is of course only acceptable if you don't need any other bridges, which I don't.

LinusK
  • 351
  • 1
  • 2
  • 6
0

In worst case, You would need to turn off all network services and then from console try deleting it. It should work.

Albert
  • 83
  • 6