ifconfig -a 显示 br-ba165999130f 而不是 eth0(以太网工作)

ifconfig -a 显示 br-ba165999130f 而不是 eth0(以太网工作)

我使用电缆将我的电脑连接到路由器,并且还连接了 WIFI USB TP-LINK。

只需检查ifconfig-a,我就会发现没有eth0接口。相反,第一个被调用br-ba165999130f,我认为是eth0(无论我是否拔出 WIFI USB)。

milano@milano-desktop:~$ ifconfig -a
br-ba165999130f: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:4a:c5:46: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

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:56:a3:3e:ce  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=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.135  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::5fac:7701:876b:133e  prefixlen 64  scopeid 0x20<link>
        ether 70:85:c2:7c:b8:ff  txqueuelen 1000  (Ethernet)
        RX packets 1575526  bytes 1425272914 (1.4 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 737541  bytes 87452976 (87.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xa3300000-a3320000  

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 14642  bytes 2453399 (2.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14642  bytes 2453399 (2.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vmnet1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.79.1  netmask 255.255.255.0  broadcast 172.16.79.255
        inet6 fe80::250:56ff:fec0:1  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:c0:00:01  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1525  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.70.1  netmask 255.255.255.0  broadcast 192.168.70.255
        inet6 fe80::250:56ff:fec0:8  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:c0:00:08  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1525  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

这背后的原因是什么?

答案1

这不太对。界面br-ba165999130f是一座虚拟桥梁。你无法找到eth0不再是因为,现在的改变udevd,为以太网设备分配名称。设备现在根据“可预测的接口名称方案”https://wiki.debian.org/NetworkInterfaceNames

就你的情况而言,前者eth0是接口eno1en=Ethernet。要标记接口是虚拟设备还是真实设备,可以执行 ls -la /sys/class/net。所有接口都列出来了。

ls -la /sys/class/net
total 0
drwxr-xr-x  2 root root 0 Jul 18 16:46 .
drwxr-xr-x 87 root root 0 Jul 18 16:46 ..
lrwxrwxrwx  1 root root 0 Jul 18 14:46 br-5888a0968254 -> ../../devices/virtual/net/br-5888a0968254
lrwxrwxrwx  1 root root 0 Jul 18 14:46 br-701dd1212771 -> ../../devices/virtual/net/br-701dd1212771
lrwxrwxrwx  1 root root 0 Jul 18 14:46 br-b00d55f5f1b1 -> ../../devices/virtual/net/br-b00d55f5f1b1
lrwxrwxrwx  1 root root 0 Jul 18 14:46 br-c8cc7afb1a4e -> ../../devices/virtual/net/br-c8cc7afb1a4e
lrwxrwxrwx  1 root root 0 Jul 18 14:46 docker0 -> ../../devices/virtual/net/docker0
lrwxrwxrwx  1 root root 0 Jul 19 08:45 enx08920494661c -> ../../devices/pci0000:00/0000:00:07.1/0000:39:00.0/0000:3a:02.0/0000:3b:00.0/usb6/6-2/6-2.4/6-2.4:1.0/net/enx08920494661c
lrwxrwxrwx  1 root root 0 Jul 18 16:46 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx  1 root root 0 Jul 18 14:51 veth5501186 -> ../../devices/virtual/net/veth5501186
lrwxrwxrwx  1 root root 0 Jul 18 14:46 wlp0s20f3 -> ../../devices/pci0000:00/0000:00:14.3/net/wlp0s20f3

此接口是虚拟的

lrwxrwxrwx  1 root root 0 Jul 18 14:46 br-5888a0968254 -> ../../devices/virtual/net/br-5888a0968254

此接口是PCIe网络设备

lrwxrwxrwx  1 root root 0 Jul 19 08:45 enx08920494661c -> ../../devices/pci0000:00/0000:00:07.1/0000:39:00.0/0000:3a:02.0/0000:3b:00.0/usb6/6-2/6-2.4/6-2.4:1.0/net/enx08920494661c

驱动程序可能不正确。该棒是否出现在 lsusb 下?

相关内容