62

ip link shows this:

[root@0-25-90-68-79-4a log]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether 00:25:90:68:79:4a brd ff:ff:ff:ff:ff:ff
5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether 00:25:90:68:79:4a brd ff:ff:ff:ff:ff:ff
8: gre0: <NOARP> mtu 1476 qdisc noop state DOWN 
    link/gre 0.0.0.0 brd 0.0.0.0
10: 35978f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br35978f0 state UP qlen 32
    link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
13: br35978f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff

Here, the interface 35978f0 is the virtual interface which is tied to the bridge br 35978f0. I've already done ifconfig 35978f0 down and brctl delif br35978f0 35978f0.

But how do I delete interface 35978f0?

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
vikas
  • 901
  • 3
  • 10
  • 13

2 Answers2

134

You can use sudo ip link delete br35978f0 to remove the interface (replacing br35978f0 with the code for the interface you wish to delete, as needed).

JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
Frederik Deweerdt
  • 4,943
  • 2
  • 29
  • 31
  • 6
    After reboot, then the virtual bridges showed again, even with brctl commands. Then I found it is because docker network, after deletion by command `docker network delete `, two bridges disappeared after reboot. [https://docs.docker.com/engine/reference/commandline/network_create/] – zqcolor May 08 '19 at 17:36
  • 3
    RTNETLINK answers: Operation not supported – Alex Jansen Jun 29 '21 at 10:54
  • 2
    sudo ip link delete 35978f0 – Ahmad Alhilal Sep 21 '21 at 05:36
  • 1
    @AlexJansen: I managed to delete the interface after reading [this answer](https://unix.stackexchange.com/questions/558839/unable-to-delete-virtual-network-interface-on-linux): `sudo iw wlp3s0mon del` – Matthias Braun Nov 24 '22 at 21:25
17

Have you tried:

ifconfig 10:35978f0 down

As the physical interface is 10 and the virtual aspect is after the colon :.

See also https://www.cyberciti.biz/faq/linux-command-to-remove-virtual-interfaces-or-network-aliases/

jkalden
  • 1,548
  • 4
  • 24
  • 26