Ubuntu

啟動/啟動我的 ubuntu 時出現許多橋接網路

  • October 14, 2019

當我啟動 ubuntu 18.04 時,我的 ifconfig 中有許多橋接網路。在刪除其中一些網路之前,我無法連接某些網路(既不是有線也不是 wifi)。

刪除它們後,系統可以正常工作。

/etc/network/interfaces 的內容:

# interfaces(5) file used by ifup(8) and ifdown(8)
lo
iface lo inet loopback

如果配置:

br-01850822aefc: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.31.0.1  netmask 255.255.0.0  broadcast 172.31.255.255
       ether 02:42:ae:cc:ae:43  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-0533d7f1a7c4: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:8d:07:31:2d  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-0665bdac5306: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:05:94:7a:aa  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-0d1d976daa10: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:6e:fa:e9:f7  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-1051032a9708: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:f4:1b:2f:47  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-14c5799fe1b2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.24.0.1  netmask 255.255.0.0  broadcast 172.24.255.255
       ether 02:42:34:ce:d1:9d  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-29193068b7be: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:37:9b:78:43  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-356baf420a29: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:61:f9:f8:ee  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-37286cdaa43d: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:e4:9f:d6:39  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-4379136c3972: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.30.0.1  netmask 255.255.0.0  broadcast 172.30.255.255
       ether 02:42:13:cd:2f:4f  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-4753952f062a: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.28.0.1  netmask 255.255.0.0  broadcast 172.28.255.255
       ether 02:42:96:2c:70:cc  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-48f23f7b8ad4: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.25.0.1  netmask 255.255.0.0  broadcast 172.25.255.255
       ether 02:42:a9:c9:9c:e4  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-4ace4c5ba371: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 192.168.48.1  netmask 255.255.240.0  broadcast 192.168.63.255
       ether 02:42:2b:ff:97:e2  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-4c848250e12d: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
       ether 02:42:29:2f:c6:35  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-513c950dbdd1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 192.168.32.1  netmask 255.255.240.0  broadcast 192.168.47.255
       ether 02:42:be:87:08:b6  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-55b37644da9c: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:68:92:d5:03  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-599a0a66bbc9: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:af:77:9b:d8  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-59b5648d5af6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:b4:cc:ba:a4  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-887511af4293: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
       ether 02:42:dc:a9:d9:af  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-89d49e2f2224: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:b1:75:4e:50  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-8bec26608e85: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:69:b7:88:6c  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-92a88a91f4b0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.29.0.1  netmask 255.255.0.0  broadcast 172.29.255.255
       ether 02:42:22:39:8a:ae  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-98b4c7a75e2e: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:a7:0f:4e:c0  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-a25c53ab3ce9: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.22.0.1  netmask 255.255.0.0  broadcast 172.22.255.255
       ether 02:42:5c:a0:f7:8a  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-b01a537efc09: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:9b:c0:4e:3d  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-bb41b5e452fb: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:16:a7:18:48  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ccc1755f9ed9: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:78:da:c4:6d  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-cd91e6b91600: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 02:42:93:95:fd:32  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ebe25881b847: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
       ether 02:42:f6:dc:b9:fb  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ed1db6abbd8c: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 192.168.80.1  netmask 255.255.240.0  broadcast 192.168.95.255
       ether 02:42:21:33:6a:29  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ee2de731fa5a: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 192.168.176.1  netmask 255.255.240.0  broadcast 192.168.191.255
       ether 02:42:c6:59:41:3f  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
       ether 02:42:43:d1:12:75  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker_gwbridge: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       inet 192.168.16.1  netmask 255.255.240.0  broadcast 192.168.31.255
       ether 02:42:31:9f:59:ad  txqueuelen 0  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether 80:ce:62:1b:d6:a8  txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 1000  (Bucle local)
       RX packets 50305  bytes 4261755 (4.2 MB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 50305  bytes 4261755 (4.2 MB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.0.38  netmask 255.255.255.0  broadcast 192.168.0.255
       inet6 fe80::141d:fe6e:6a9d:d954  prefixlen 64  scopeid 0x20<link>
       ether 88:b1:11:a7:81:7c  txqueuelen 1000  (Ethernet)
       RX packets 667177  bytes 529813316 (529.8 MB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 303992  bytes 86499860 (86.4 MB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$$ EDIT $$ 在我的 systemctl 列表中:

sys-devices-virtual-net-br\x2d8bec26608e85.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-8bec26608e85                                        
 sys-devices-virtual-net-br\x2d92a88a91f4b0.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-92a88a91f4b0                                        
 sys-devices-virtual-net-br\x2d98b4c7a75e2e.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-98b4c7a75e2e                                        
 sys-devices-virtual-net-br\x2da25c53ab3ce9.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-a25c53ab3ce9                                        
 sys-devices-virtual-net-br\x2db01a537efc09.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-b01a537efc09                                        
 sys-devices-virtual-net-br\x2dbb41b5e452fb.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-bb41b5e452fb                                        
 sys-devices-virtual-net-br\x2dccc1755f9ed9.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-ccc1755f9ed9                                        
 sys-devices-virtual-net-br\x2dcd91e6b91600.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-cd91e6b91600                                        
 sys-devices-virtual-net-br\x2debe25881b847.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-ebe25881b847                                        
 sys-devices-virtual-net-br\x2ded1db6abbd8c.device                                        loaded    active   plugged   /sys/devices/virtual/net/br-ed1db6abbd8c    

他們有關係嗎?我是開發人員,而不是網路專業人士。

期望狀態:

$$ EDIT $$ 所以這些網路似乎是 docker 網路。我正在嘗試刪除,因此其中一個似乎與網路中的某些內容重疊,我遇到了問題。正在努力…

期望狀態:

WIFI 或 LAN 工作。刪除未使用的橋接網路。

$$ EDIT $$ /etc/netplan/01-network-manager-all.yaml

# Let NetworkManager manage all devices on this system
network:
 version: 2
 renderer: NetworkManager

你肯定在執行 Docker。這可以通過一些資訊來推斷:

  • 網橋名稱看起來像 Docker 網橋
  • 具有 IP 集的網橋使用經典的 Docker 網橋 IP:/16172.16.0.0/12空間中
  • 你是開發者
  • 每個網橋 MAC 地址都以 開頭02:42,它指定一個私有 MAC(很好),但如果它們真的是隨機的,它們會有很多其他的可能性。這篇與 Docker 相關的 SO 文章談到了它:Docker 如何為容器分配 MAC 地址?. 那裡的官方連結已經不存在了。
  • 在 Docker 文件站點上執行搜尋:https ://docs.docker.com/search/?q=02%3A42顯示了很多具有這種 MAC 特性的範例,它不可能是別的東西(遺憾的是我沒有找到關於 MAC 地址的原始連結)。

通過所有這些線索,我可以相當安全地假設您的問題是由執行多個 Docker 網路引起的,這些網路與您通常的網路路由發生干擾。只需更改他們的設置以不再乾擾。這可能應該作為一個單獨的問題來完成(我不知道 SO 或這裡是否最適合)。這應該與docker network它的子命令有關。

這個問題可能會有所幫助:https ://forums.docker.com/t/dtr-network-overlaps-corporate-lan/22193

引用自:https://serverfault.com/questions/987638