Ubuntu
這些出現在核心日誌中的意外網路設備是什麼?
我有
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
我怎麼知道是哪個軟體創建了這些?
您的列表如下所示:
- lo = 環回
- enp7s0 = 乙太網
- lp5s0 = 無線區域網路
- virbr* = 虛擬網橋
- lxcbr* = lxc/lxd
- 碼頭工人* =碼頭工人
- br* = 碼頭橋
- veth* = 虛擬乙太網設備
您可以使用nmcli(網路管理器)
並執行:
$ nmcli device list
為您的docker容器執行:
$ docker network ls
比
$ docker network inspect [USE THE NETWORK ID FROM THE FIRST COMMAND]
試試這個來獲取網路設備的列表:
$ echo /sys/class/net/*
您可以使用udevadm獲取更多資訊:
$ 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:
$ lshw -class network
$ lshw -class network -short
更新
從此手冊頁獲取更多資訊:
- 人 systemd.netdev
- 人 systemd.link
- 人 systemd.network
使用networkctl獲得更多詳細資訊
$ networkctl
$ networkctl status
$ networkctl status --all