启动/引导我的 ubuntu 时出现许多桥接网络

启动/引导我的 ubuntu 时出现许多桥接网络

当我启动 ubuntu 18.04 时,我的 ifconfig 中有许多桥接网络。我无法连接某些网络(不是有线网络也不是 wifi 网络),除非我删除其中一些网络。

删除它们之后,系统运行正常。

/etc/network/interfaces的内容:

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

ifconfig:

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



[编辑]

在我的 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    

它们有关系吗?我是一名开发人员,不是网络专业人士。

期望状态:

[编辑]

因此这些网络似乎是 docker 网络。我尝试删除它们,但其中一个网络似乎与网络中的某些东西重叠,因此我遇到了问题。正在努力...

期望状态:

WIFI 或 LAN 正常工作。删除未使用的桥接网络。

[编辑]

/etc/netplan/01-网络管理器-all.yaml

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

答案1

您肯定正在运行 Docker。这可以通过以下几条信息推断出来:

  • 桥梁名称看起来像 Docker bridge
  • 具有 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

相关内容