我一直在使用enp7s0
(以太网)和wlp5s0
(wifi),但还有一些我不认识的其他网络接口在 dmesg 中定期显示。它们是什么?如何删除它们?
$ sudo dmesg -w
[ 5400.052789] device veth517d19f entered promiscuous mode
[ 5400.052861] br-b6747aa2af8f: port 1(veth517d19f) entered blocking state
[ 5400.052862] br-b6747aa2af8f: port 1(veth517d19f) entered forwarding state
[ 5400.213261] eth0: renamed from veth244244e
[ 5400.222378] IPv6: ADDRCONF(NETDEV_CHANGE): veth517d19f: link becomes ready
[ 5568.791784] veth244244e: renamed from eth0
[ 5568.810950] br-b6747aa2af8f: port 1(veth517d19f) entered disabled state
[ 5568.830903] br-b6747aa2af8f: port 1(veth517d19f) entered disabled state
[ 5568.831278] device veth517d19f left promiscuous mode
[ 5568.831280] br-b6747aa2af8f: port 1(veth517d19f) entered disabled state
[ 5568.880757] br-b6747aa2af8f: port 1(veth011f3f5) entered blocking state
[ 5568.880760] br-b6747aa2af8f: port 1(veth011f3f5) entered disabled state
[ 5568.880814] device veth011f3f5 entered promiscuous mode
[ 5568.880962] br-b6747aa2af8f: port 1(veth011f3f5) entered blocking state
[ 5568.880964] br-b6747aa2af8f: port 1(veth011f3f5) entered forwarding state
[ 5569.077840] eth0: renamed from veth6e8382e
[ 5569.093718] IPv6: ADDRCONF(NETDEV_CHANGE): veth011f3f5: link becomes ready
[ 5737.805813] veth6e8382e: renamed from eth0
[ 5737.823318] br-b6747aa2af8f: port 1(veth011f3f5) entered disabled state
[ 5737.843811] br-b6747aa2af8f: port 1(veth011f3f5) entered disabled state
[ 5737.844340] device veth011f3f5 left promiscuous mode
[ 5737.844344] br-b6747aa2af8f: port 1(veth011f3f5) entered disabled state
[ 5737.893657] br-b6747aa2af8f: port 1(vethd8bfbd6) entered blocking state
[ 5737.893661] br-b6747aa2af8f: port 1(vethd8bfbd6) entered disabled state
[ 5737.893736] device vethd8bfbd6 entered promiscuous mode
[ 5737.893886] br-b6747aa2af8f: port 1(vethd8bfbd6) entered blocking state
[ 5737.893890] br-b6747aa2af8f: port 1(vethd8bfbd6) entered forwarding state
[ 5738.172548] eth0: renamed from veth7906981
[ 5738.188736] IPv6: ADDRCONF(NETDEV_CHANGE): vethd8bfbd6: link becomes ready
[ 5906.354088] veth7906981: renamed from eth0
[ 5906.369700] br-b6747aa2af8f: port 1(vethd8bfbd6) entered disabled state
[ 5906.389362] br-b6747aa2af8f: port 1(vethd8bfbd6) entered disabled state
[ 5906.389734] device vethd8bfbd6 left promiscuous mode
[ 5906.389737] br-b6747aa2af8f: port 1(vethd8bfbd6) entered disabled state
[ 5906.443306] br-b6747aa2af8f: port 1(veth7a88bf4) entered blocking state
[ 5906.443309] br-b6747aa2af8f: port 1(veth7a88bf4) entered disabled state
[ 5906.443354] device veth7a88bf4 entered promiscuous mode
[ 5906.443425] br-b6747aa2af8f: port 1(veth7a88bf4) entered blocking state
[ 5906.443426] br-b6747aa2af8f: port 1(veth7a88bf4) entered forwarding state
[ 5906.637888] eth0: renamed from veth9acd0b3
[ 5906.659074] IPv6: ADDRCONF(NETDEV_CHANGE): veth7a88bf4: link becomes ready
[ 6074.517484] veth9acd0b3: renamed from eth0
[ 6074.529161] br-b6747aa2af8f: port 1(veth7a88bf4) entered disabled state
[ 6074.544507] br-b6747aa2af8f: port 1(veth7a88bf4) entered disabled state
[ 6074.544814] device veth7a88bf4 left promiscuous mode
[ 6074.544815] br-b6747aa2af8f: port 1(veth7a88bf4) entered disabled state
[ 6074.582235] br-b6747aa2af8f: port 1(veth7cc8283) entered blocking state
[ 6074.582238] br-b6747aa2af8f: port 1(veth7cc8283) entered disabled state
[ 6074.582284] device veth7cc8283 entered promiscuous mode
[ 6074.582354] br-b6747aa2af8f: port 1(veth7cc8283) entered blocking state
[ 6074.582355] br-b6747aa2af8f: port 1(veth7cc8283) entered forwarding state
[ 6074.771300] eth0: renamed from veth5a7e47a
[ 6074.791442] IPv6: ADDRCONF(NETDEV_CHANGE): veth7cc8283: link becomes ready
$ ip -br -c addr show
lo UNKNOWN 127.0.0.1/8 ::1/128
enp7s0 UP 10.10.10.1/8 fe80::a66e:xxxx:e22:xxxx/64
wlp5s0 UP 192.168.18.193/24 fe80::d28c:xxxx:6da5:xxxx/64
virbr0 DOWN 192.168.122.1/24
virbr1 DOWN 192.168.39.1/24
lxcbr0 DOWN 10.0.3.1/24
br-e32feb7cbdc6 DOWN 172.23.0.1/16
br-ef8e425d866f DOWN 172.21.0.1/16
br-0d1de33a9fd1 DOWN 172.18.0.1/16
br-1535ef132d94 DOWN 172.24.0.1/16
br-3daca6071d2e DOWN 172.20.0.1/16
docker0 DOWN 172.17.0.1/16
br-80a4ad7261ed DOWN 172.22.0.1/16
br-b6747aa2af8f UP 172.19.0.1/16 fe80::42:bff:xxxx:xxxx/64
vethed6ff23@if18 UP fe80::fc36:adff:xxxx:xxxx/64
vethecf0d6f@if38 UP fe80::c8a6:48ff:xxxx:xxxx/64
我怎么知道是哪个软件创建了这些?
答案1
您的列表如下所示:
- lo=环回
- enp7s0 = 以太网
- lp5s0 = 无线局域网
- virbr* = 虚拟网桥
- lxcbr* = lxc/lxd
- 码头工人* = 码头工人
- br* = 码头桥
- veth* = 虚拟以太网设备
你可以使用纳米克利(网络管理员)
并运行:
$ nmcli device list
为您泊坞窗容器运行:
$ docker network ls
比
$ docker network inspect [USE THE NETWORK ID FROM THE FIRST COMMAND]
尝试以下方法获取网络设备列表:
$ echo /sys/class/net/*
您可以通过以下方式获取更多信息乌德瓦德姆:
$ udevadm info -a -p /sys/class/net/[NETWORK DEVICE NAME]
例子:
$ udevadm info -a -p /sys/class/net/enp0s25
和ip:
$ ip -r link
$ ip -br link
$ ip -br -c link show
$ ip token
$ ip -s -s link show dev docker0
和长沙:
$ lshw -class network
$ lshw -class network -short
更新
从此联机帮助页获取更多信息:
- man systemd.netdev
- man systemd.link
- man systemd.network
更多详细信息与网络控制
$ networkctl
$ networkctl status
$ networkctl status --all