Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Network Bridges Recreated On Reboot

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
mbradley
Posts: 4
Joined: 2009-06-30 19:04

Network Bridges Recreated On Reboot

#1 Post by mbradley »

Hi Folks,

I am running Debian 11, the system has some network bridge interfaces that I
would like to remove. I can remove them but they are restored on reboot.
I cannot find where the system is storing the details of these interfaces.

The bridges named beginning with 'br-' are the ones I am trying to remove
permanently.

Code: Select all

#ip link show type bridge
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:d2:12:66 brd ff:ff:ff:ff:ff:ff
5: br-1aef6ff62773: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:1d:0e:6e:2b brd ff:ff:ff:ff:ff:ff
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:ac:64:2e:63 brd ff:ff:ff:ff:ff:ff
7: br-76bbcf8f8d34: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:8c:7d:82:ce brd ff:ff:ff:ff:ff:ff
8: br-926f179fe064: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:d4:4d:8e:d8 brd ff:ff:ff:ff:ff:ff
9: br-a8aeefb914d0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:a4:56:39:d7 brd ff:ff:ff:ff:ff:ff
10: br-bbfd634bae00: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:2a:be:f2:bb brd ff:ff:ff:ff:ff:ff

Code: Select all

#brctl show
bridge name	bridge id		STP enabled	interfaces
br-1aef6ff62773		8000.02421d0e6e2b	no		
br-76bbcf8f8d34		8000.02428c7d82ce	no		
br-926f179fe064		8000.0242d44d8ed8	no		
br-a8aeefb914d0		8000.0242a45639d7	no		
br-bbfd634bae00		8000.02422abef2bb	no		
docker0			8000.0242ac642e63	no		
virbr0			8000.525400d21266	yes
Using these commands cleans up the output of ip link and brctl show

Code: Select all

ip link set br-a8aeefb914d0 down
ip link set br-bbfd634bae00 down
ip link set br-1aef6ff62773 down
ip link set br-76bbcf8f8d34 down
ip link set br-926f179fe064 down

ip addr del dev br-a8aeefb914d0
ip addr del dev br-bbfd634bae00
ip addr del dev br-1aef6ff62773
ip addr del dev br-76bbcf8f8d34
ip addr del dev br-926f179fe064

brctl delbr  br-a8aeefb914d0
brctl delbr  br-bbfd634bae00
brctl delbr  br-1aef6ff62773
brctl delbr  br-76bbcf8f8d34
brctl delbr  br-926f179fe064

nmcli con delete br-a8aeefb914d0
nmcli con delete br-bbfd634bae00
nmcli con delete br-1aef6ff62773
nmcli con delete br-76bbcf8f8d34
nmcli con delete br-926f179fe064
I enabled logging in NetworkManager logging, some webpage suggested that would help.
Does this show that the kernel is notifying NetworkManager that the br-926f179fe064 needs created?

Code: Select all

/etc/NetworkManager/NetworkManager.conf 
    [logging]
    level=TRACE

Trying to figure out how one of the bridges is recreated.

journalctl -u NetworkManager.service|grep 926f179fe06|tee output.txt

Code: Select all

Oct 15 19:53:23 laptop NetworkManager[672]: <trace> [1634324003.6171] platform-linux: event-notification: RTM_NEWLINK, flags 0, seq 0: 8: br-926f179fe064 <DOWN;broadcast,multicast> mtu 1500 arp 1 bridge* not-init addrgenmode eui64 addr 02:42:AB:61:13:7C brd FF:FF:FF:FF:FF:FF rx:0,0 tx:0,0; forward_delay 1500 hello_time 200 max_age 2000 ageing_time 30000 stp_state 0 priority 32768 vlan_protocol 33024 vlan_stats_enabled 0 group_fwd_mask 0 group_address 01:80:C2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_max 4096 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3124
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6171] platform: (br-926f179fe064) signal: link   added: 8: br-926f179fe064 <DOWN;broadcast,multicast> mtu 1500 arp 1 bridge* not-init addrgenmode eui64 addr 02:42:AB:61:13:7C brd FF:FF:FF:FF:FF:FF driver bridge rx:0,0 tx:0,0
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6172] platform: (br-926f179fe064) signal: address 4   added: 172.21.0.1/16 brd 172.21.255.255 lft forever pref forever lifetime 8-0[4294967295,4294967295] dev 8 flags permanent src kernel
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6172] platform: (br-926f179fe064) signal: route   4   added: type local table 255 172.21.0.1/32 via 0.0.0.0 dev 8 metric 0 mss 0 rt-src rt-kernel scope host pref-src 172.21.0.1
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6230] device[1ff5b986827a7f4f] (br-926f179fe064): ifindex: set ifindex 8
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6231] device[1ff5b986827a7f4f] (br-926f179fe064): constructed (NMDeviceBridge)
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6231] device[1ff5b986827a7f4f] (br-926f179fe064): start setup of NMDeviceBridge, kernel ifindex 8
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6232] platform-linux: error reading net:/sys/class/net/br-926f179fe064/phys_port_id: error reading 4096 bytes from file descriptor: Operation not supported
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6232] platform-linux: sysctl: reading 'net:/sys/class/net/br-926f179fe064/dev_id': '0x0'
Oct 15 19:53:23 laptop NetworkManager[672]: <trace> [1634324003.6233] ethtool[8]: ETHTOOL_GDRVINFO, br-926f179fe064: success
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6233] platform-linux: error reading net:/sys/class/net/br-926f179fe064/device/sriov_numvfs: Failed to open file "device/sriov_numvfs" with openat: No such file or directory
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6233] device[1ff5b986827a7f4f] (br-926f179fe064): hw-addr: hardware address now 02:42:AB:61:13:7C
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6233] device[1ff5b986827a7f4f] (br-926f179fe064): hw-addr: update initial MAC address 02:42:AB:61:13:7C
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6234] device[1ff5b986827a7f4f] (br-926f179fe064): unmanaged: flags set to [platform-init,external-down=0x810/0x810/unmanaged/unrealized], set-unmanaged [external-down=0x800])
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6234] device[1ff5b986827a7f4f] (br-926f179fe064): unmanaged: flags set to [platform-init,external-down,!by-type=0x810/0x818/unmanaged/unrealized], set-managed [by-type=0x8])
Oct 15 19:53:23 laptop NetworkManager[672]: <debug> [1634324003.6234] device[1ff5b986827a7f4f] (br-926f179fe064): unmanaged: flags set to [platform-init,external-down,!sleeping,!by-type=0x810/0x819/unmanaged/unrealized], set-managed [sleeping=0x1])
Oct 15 19:53:23 laptop NetworkManager[672]: <info>  [1634324003.6237] manager: (br-926f179fe064): new Bridge device (/org/freedesktop/NetworkManager/Devices/9)

thank you
Martin

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: Network Bridges Recreated On Reboot

#2 Post by CwF »

check /etc/libvirt/qemu/networks/autostart/

mbradley
Posts: 4
Joined: 2009-06-30 19:04

Re: Network Bridges Recreated On Reboot

#3 Post by mbradley »

Hi CwF,

Thank you for taking time to reply,

I looked in that location but only seeing the virbr0 mentioned, one I want to retain.

Code: Select all

root@laptop:/etc/libvirt/qemu/networks# diff autostart/default.xml default.xml 
root@laptop:/etc/libvirt/qemu/networks# pwd
/etc/libvirt/qemu/networks
root@laptop:/etc/libvirt/qemu/networks# diff autostart/default.xml default.xml 
root@laptop:/etc/libvirt/qemu/networks# cat autostart/default.xml 
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh net-edit default
or other application using the libvirt API.
-->

<network>
  <name>default</name>
  <uuid>1924c05d-6ecc-496e-8eb6-32af273197ba</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:d2:12:66'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>
I've been trying to find mentions of the mac addresses but not finding them.

Code: Select all

grep -s "02:42:33" $(find /lib/systemd /lib/libvirt/ /etc -type f|xargs)
This problem has wound me up enough now that it cannot be allowed to go
unsolved.

thanks
Martin

mbradley
Posts: 4
Joined: 2009-06-30 19:04

Re: Network Bridges Recreated On Reboot

#4 Post by mbradley »

Hi Folks,

I have found out that the bridge networks are being created by Docker.
I disabled both libvirt and docker with systemctl stop and then systemctl disable
Restarted machine, the bridges were gone. Then re-enabled them one
at a time so found out it was Docker.

Then listing the networks from docker it became clear.

Code: Select all

root@laptop:~# docker network ls
NETWORK ID     NAME                      DRIVER    SCOPE
926f179fe064   agent-resources_default   bridge    local
76bbcf8f8d34   aws                       bridge    local
a09af6551503   bridge                    bridge    local
1aef6ff62773   docker_default            bridge    local
bbfd634bae00   gorticrum_default         bridge    local
643f38923f73   host                      host      local
04df8e2bed0e   none                      null      local
a8aeefb914d0   postgres_default          bridge    local
root@laptop:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0f2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:16:7e:0e:7c:2c brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 54:27:1e:1c:e0:0a brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:d2:12:66 brd ff:ff:ff:ff:ff:ff
6: br-bbfd634bae00: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:20:ce:28:7f brd ff:ff:ff:ff:ff:ff
7: br-1aef6ff62773: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:f1:7a:e6:d7 brd ff:ff:ff:ff:ff:ff
8: br-76bbcf8f8d34: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:9d:6a:15:60 brd ff:ff:ff:ff:ff:ff
9: br-926f179fe064: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:ed:dd:b6:6a brd ff:ff:ff:ff:ff:ff
10: br-a8aeefb914d0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e5:85:b0:16 brd ff:ff:ff:ff:ff:ff
11: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:40:cd:73:22 brd ff:ff:ff:ff:ff:ff
thank you,
Martin

Post Reply