这些网络接口是什么?

这些网络接口是什么?

我的工作站——运行 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)enp0s25enp7s0(以太网设备 0 和 1)。

但其他所有人,br-*还有veth*不知道他们来自哪里或者在那里做什么。

答案1

br-* - 网桥,veth* - 虚拟以太网。你正在使用 Docker。

更多信息请点击这里:

答案2

您当前在该主机上运行了多少个虚拟机和/或 Docker 容器?这些虚拟机/容器上的虚拟网络接口总数是否与veth*您看到的接口数量匹配?

这些veth*接口可能是您的虚拟机/容器拥有的任何虚拟网卡的“主机端”,并且这些br-*接口可能是桥接接口(对应于例如 VMware 中的虚拟交换机)将不同的虚拟机/容器相互连接、与主机和/或外部世界连接。docker0是个默认Docker 的网桥,但由于您有两个物理网卡,您的配置可能需要的不仅仅是默认网桥。

相关内容