Linux
這些網路介面是什麼?
我的工作站——執行 Ubuntu 18.04——有一個龐大的網路介面列表,我不知道它們為什麼/從哪裡來。如何辨識它們的來源並最終刪除不必要的來源?
這是列表:
$ ifconfig br-29520a0ce031: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.16.1 netmask 255.255.240.0 broadcast 192.168.31.255 inet6 fe80::42:caff:fed9:52e prefixlen 64 scopeid 0x20<link> ether 02:42:ca:d9:05:2e txqueuelen 0 (Ethernet) RX packets 251577 bytes 39174576 (39.1 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 309301 bytes 69182317 (69.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 br-ff1381b996dc: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.32.1 netmask 255.255.240.0 broadcast 192.168.47.255 inet6 fe80::42:3cff:fe7f:4557 prefixlen 64 scopeid 0x20<link> ether 02:42:3c:7f:45:57 txqueuelen 0 (Ethernet) RX packets 267586 bytes 46766800 (46.7 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 335535 bytes 79812439 (79.8 MB) 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 inet6 fe80::42:c7ff:fe35:d36e prefixlen 64 scopeid 0x20<link> ether 02:42:c7:35:d3:6e txqueuelen 0 (Ethernet) RX packets 29876 bytes 140318987 (140.3 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 37338 bytes 59172455 (59.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.50.200.154 netmask 255.255.0.0 broadcast 10.50.255.255 inet6 fe80::1bc3:ab5d:375c:8ce6 prefixlen 64 scopeid 0x20<link> ether b8:ca:3a:81:32:80 txqueuelen 1000 (Ethernet) RX packets 25972627 bytes 15133370409 (15.1 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1143922 bytes 352665651 (352.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xfb500000-fb520000 enp7s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:ca:3a:81:32:81 txqueuelen 1000 (Ethernet) RX packets 25361880 bytes 15989431890 (15.9 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14442174 bytes 7247141626 (7.2 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 17 memory 0xfb200000-fb220000 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 (Local Loopback) RX packets 8701819 bytes 3493583516 (3.4 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 8701819 bytes 3493583516 (3.4 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth097d5a6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::c94:feff:fea4:284a prefixlen 64 scopeid 0x20<link> ether 0e:94:fe:a4:28:4a txqueuelen 0 (Ethernet) RX packets 30506 bytes 9858899 (9.8 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 35067 bytes 20332314 (20.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth5716a8c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::bc62:38ff:fed2:b18a prefixlen 64 scopeid 0x20<link> ether be:62:38:d2:b1:8a txqueuelen 0 (Ethernet) RX packets 159232 bytes 26302540 (26.3 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 170757 bytes 34933057 (34.9 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth5faed64: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::d4be:66ff:fe5a:4648 prefixlen 64 scopeid 0x20<link> ether d6:be:66:5a:46:48 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2360 bytes 483714 (483.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth7ce715c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::6031:cdff:fe13:66dd prefixlen 64 scopeid 0x20<link> ether 62:31:cd:13:66:dd txqueuelen 0 (Ethernet) RX packets 66523 bytes 13644088 (13.6 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 103133 bytes 22174559 (22.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth9b98dd5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::a89b:b2ff:fe54:45a0 prefixlen 64 scopeid 0x20<link> ether aa:9b:b2:54:45:a0 txqueuelen 0 (Ethernet) RX packets 76962 bytes 11725527 (11.7 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 53731 bytes 9298294 (9.2 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vethb5023c5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::1cb9:b6ff:fe9a:c42a prefixlen 64 scopeid 0x20<link> ether 1e:b9:b6:9a:c4:2a txqueuelen 0 (Ethernet) RX packets 62643 bytes 9497323 (9.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 110635 bytes 15533473 (15.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
我認識
docker0
(Docker)、lo
(localhost)enp0s25
和enp7s0
(乙太網設備 0 和 1)。但是所有其他人,
br-*
我veth*
不知道他們來自哪裡,或者他們在那裡做什麼。
您目前在該主機上執行了多少個虛擬機和/或 Docker 容器?這些虛擬機/容器上的虛擬網路介面的總和是否與
veth*
您看到的介面數量相匹配?這些
veth*
介面可能是您的虛擬機/容器擁有的任何虛擬 NIC 的“主機端”,並且這些br-*
介面可能是橋接介面(對應於例如 VMware 中的虛擬交換機),將不同的虛擬機/容器彼此、主機和/或外面的世界。docker0
是 Docker 的預設網橋,但由於您有兩個物理網卡,您的配置可能需要的不僅僅是預設網橋。
br-* - 網橋,veth* - 虛擬乙太網。您正在使用 Docker。
更多資訊在這裡: