每次重启后网络接口名称都会改变

每次重启后网络接口名称都会改变

全新安装 Ubuntu 20.04 Server。设置 netplan 配置。但是,由于某种原因,接口名称每次都会更改,因此 netplan 配置在重新启动后停止工作。设置 netplan 配置以匹配 mac 地址并设置名称,但这仍然不起作用,因为接口名称每次重新启动都会更改。

尝试将 grub 重新设置为旧的接口命名约定 (eth0),但没有成功。尝试更改 netplan 配置以将接口名称反映为 (ens0),也没有成功。

改变的接口名称是随机的,并且每次重启都不同。

dmesg | grep eth 输出

[    9.704345] tg3 0000:03:00.0 eth0: Tigon3 [partno(629133-001) rev 5719001] (PCI Express) MAC address ac:16:2d:8c:83:40
[    9.747819] tg3 0000:03:00.0 eth0: attached PHY is 5719C (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
[    9.747821] tg3 0000:03:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
[    9.747824] tg3 0000:03:00.0 eth0: dma_rwctrl[00000001] dma_mask[64-bit]
[    9.772054] tg3 0000:03:00.1 eth1: Tigon3 [partno(629133-001) rev 5719001] (PCI Express) MAC address ac:16:2d:8c:83:41
[    9.887044] tg3 0000:03:00.1 eth1: attached PHY is 5719C (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
[    9.922968] tg3 0000:03:00.1 eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
[    9.960541] tg3 0000:03:00.1 eth1: dma_rwctrl[00000001] dma_mask[64-bit]
[   10.027843] tg3 0000:03:00.2 eth2: Tigon3 [partno(629133-001) rev 5719001] (PCI Express) MAC address ac:16:2d:8c:83:42
[   10.066251] tg3 0000:03:00.2 eth2: attached PHY is 5719C (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
[   10.105881] tg3 0000:03:00.2 eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
[   10.145704] tg3 0000:03:00.2 eth2: dma_rwctrl[00000001] dma_mask[64-bit]
[   10.214958] tg3 0000:03:00.3 eth3: Tigon3 [partno(629133-001) rev 5719001] (PCI Express) MAC address ac:16:2d:8c:83:43
[   10.290362] tg3 0000:03:00.3 eth3: attached PHY is 5719C (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
[   10.290364] tg3 0000:03:00.3 eth3: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
[   10.290366] tg3 0000:03:00.3 eth3: dma_rwctrl[00000001] dma_mask[64-bit]
[   10.660995] tg3 0000:03:00.1 eno2: renamed from eth1
[   11.045599] tg3 0000:03:00.0 eno1: renamed from eth0
[   12.513784] r8169 0000:09:00.0 eth0: RTL8168c/8111c, 00:e0:4c:69:58:ab, XID 3c4, IRQ 126
[   12.514210] tg3 0000:03:00.3 eno4: renamed from eth3
[   12.673906] r8169 0000:09:00.0 eth0: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[   12.902002] tg3 0000:03:00.2 eno3: renamed from eth2
[   14.432154] r8169 0000:0a:00.0 eth1: RTL8168c/8111c, 00:e0:4c:69:58:ac, XID 3c4, IRQ 127
[   14.732638] r8169 0000:0a:00.0 eth1: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[   14.865814] r8169 0000:0b:00.0 eth2: RTL8168c/8111c, 00:e0:4c:69:58:ad, XID 3c4, IRQ 128
[   14.865819] r8169 0000:0b:00.0 eth2: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[   14.877849] r8169 0000:0c:00.0 eth3: RTL8168c/8111c, 00:e0:4c:69:58:ae, XID 3c4, IRQ 129
[   14.877857] r8169 0000:0c:00.0 eth3: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[   14.885379] r8169 0000:0b:00.0 ens2: renamed from eth2
[   19.550328] r8169 0000:0a:00.0 ens7: renamed from eth1
[   19.585651] r8169 0000:0c:00.0 ens5: renamed from eth3
[   19.701789] r8169 0000:09:00.0 ens8: renamed from eth0

猫/etc/默认/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX="GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Everything I have tried does not resolve. 

猫/etc/netplan/*.yaml

#This is the network config written by ''
network:
  version: 2
  renderer: networkd
  ethernets:
    eth1:
      match:
        macaddress: ac:16:2d:8c:83:40
      dhcp4: no
      optional: true
      set-name: eth1
    eth2:
      match:
        macaddress: ac:16:2d:8c:83:41
      dhcp4: true
      optional: true
      set-name: eth2
    eth3:
      match:
        macaddress: ac:16:2d:8c:83:42
      dhcp4: true
      optional: true
      set-name: eth3
    eth4:
      match:
        macaddress: ac:16:2d:8c:83:43
      dhcp4: true
      optional: true
      set-name: eth4
    eth5:
      match:
        macaddress: 00:e0:4c:69:58:ae
      dhcp4: no
      optional: true
      set-name: eth5
    eth6:
      match:
        macaddress: 00:e0:4c:69:58:ad
      dhcp4: true
      optional: true
      set-name: eth6
    eth7:
      match:
        macaddress: 00:e0:4c:69:58:ac
      dhcp4: true
      optional: true
      set-name: eth7
    eth8:
      match:
        macaddress: 00:e0:4c:69:58:ab
      dhcp4: true
      optional: true
      set-name: eth8
  bonds:
    bond-lan:
      interfaces: [eth1, eth5]
      addresses: # [my ip address]
      gateway4: # my gateway
      nameservers:
        search: # [my domain]
        addresses: # [my name servers]
      parameters:
        mode: active-backup

/etc/network/interfaces 为空。文件存在,但没有任何内容

sudo lshw -C 网络

*-network:0 DISABLED
       description: Ethernet interface
       product: NetXtreme BCM5719 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth4
       version: 01
       serial: ac:16:2d:8c:83:40
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5719-v1.31 NCSI v1.1.15.0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:57 memory:f67f0000-f67fffff memory:f67e0000-f67effff memory:f67d0000-f67dffff memory:f4000000-f401ffff
  *-network:1 DISABLED
       description: Ethernet interface
       product: NetXtreme BCM5719 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0.1
       bus info: pci@0000:03:00.1
       logical name: eth5
       version: 01
       serial: ac:16:2d:8c:83:41
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5719-v1.31 NCSI v1.1.15.0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:129 memory:f67c0000-f67cffff memory:f67b0000-f67bffff memory:f67a0000-f67affff memory:f4020000-f403ffff
  *-network:2 DISABLED
       description: Ethernet interface
       product: NetXtreme BCM5719 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0.2
       bus info: pci@0000:03:00.2
       logical name: eth6
       version: 01
       serial: ac:16:2d:8c:83:42
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5719-v1.31 NCSI v1.1.15.0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:57 memory:f6790000-f679ffff memory:f6780000-f678ffff memory:f6770000-f677ffff memory:f4040000-f405ffff
  *-network:3 DISABLED
       description: Ethernet interface
       product: NetXtreme BCM5719 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0.3
       bus info: pci@0000:03:00.3
       logical name: eth7
       version: 01
       serial: ac:16:2d:8c:83:43
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5719-v1.31 NCSI v1.1.15.0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:129 memory:f6760000-f676ffff memory:f6750000-f675ffff memory:f6740000-f674ffff memory:f4060000-f407ffff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: eth8
       version: 02
       serial: 00:e0:4c:69:58:ab
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full ip=10.29.250.18 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:39 ioport:6000(size=256) memory:f7cf0000-f7cf0fff memory:f68f0000-f68fffff
  *-network DISABLED
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:0a:00.0
       logical name: eth1
       version: 02
       serial: 00:e0:4c:69:58:ac
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes
       resources: irq:24 ioport:7000(size=256) memory:f7df0000-f7df0fff memory:f69f0000-f69fffff
  *-network DISABLED
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:0b:00.0
       logical name: eth2
       version: 02
       serial: 00:e0:4c:69:58:ad
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes
       resources: irq:42 ioport:8000(size=256) memory:f7ef0000-f7ef0fff memory:f6af0000-f6afffff
  *-network DISABLED
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:0c:00.0
       logical name: eth3
       version: 02
       serial: 00:e0:4c:69:58:ae
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes
       resources: irq:38 ioport:9000(size=256) memory:f7ff0000-f7ff0fff memory:f6bf0000-f6bfffff
  *-network
       description: Ethernet interface
       physical id: 3
       logical name: bond-lan
       serial: fa:c7:fe:9b:92:cc
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=bonding driverversion=3.7.1 firmware=2 ip=10.30.142.69 link=no master=yes multicast=yes

在更新 grub 文件以反映 GRUB_CMDLINE_LINUX="net.ifnames=0" 并从 eth0 开始接口名称后,名称在 3 次重启后仍保留在每个 netplan 配置文件中,然后 MAC 地址开始在接口名称之间移动,从而阻止建立网络连接。我决定从头开始重新安装 Ubuntu,这次使用实时网络连接并为 dhcp 启用所有接口。以下是 netplan 配置文件和接口。

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
    eno3:
      dhcp4: true
    eno4:
      dhcp4: true
    ens2:
      dhcp4: true
    eth0:
      dhcp4: true
    eth2:
      dhcp4: true
    eth3:
      dhcp4: true
  version: 2

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether ac:16:2d:8c:83:40 brd ff:ff:ff:ff:ff:ff
    inet 10.29.250.18/29 brd 10.29.250.23 scope global dynamic eno1
       valid_lft 3317sec preferred_lft 3317sec
    inet6 fe80::ae16:2dff:fe8c:8340/64 scope link
       valid_lft forever preferred_lft forever
3: eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether ac:16:2d:8c:83:41 brd ff:ff:ff:ff:ff:ff
4: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether ac:16:2d:8c:83:42 brd ff:ff:ff:ff:ff:ff
5: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether ac:16:2d:8c:83:43 brd ff:ff:ff:ff:ff:ff
6: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ab brd ff:ff:ff:ff:ff:ff
7: ens2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ac brd ff:ff:ff:ff:ff:ff
8: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ad brd ff:ff:ff:ff:ff:ff
9: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ae brd ff:ff:ff:ff:ff:ff

然后我继续将配置文件更改为我想要的样子。

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: no
    eno2:
      dhcp4: true
    eno3:
      dhcp4: true
    eno4:
      dhcp4: true
    ens2:
      dhcp4: true
    eth0:
      dhcp4: true
    eth2:
      dhcp4: true
    eth3:
      dhcp4: no
      optional: true
  bonds:
    bond-lan:
      interfaces: [eno1, eth3]
      addresses: [ipaddress]
      gateway4: gatewayip
      nameservers:
        search: [domain]
        addresses: [name-serversip]
      parameters:
        mode: active-backup 
  version: 2

重启两次后一切都很好,然后就出现了

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    eno1: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond-lan state DOWN group default qlen 1000
        link/ether 3a:88:89:a5:3f:7e brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 00:e0:4c:69:58:ab brd ff:ff:ff:ff:ff:ff
    4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 00:e0:4c:69:58:ac brd ff:ff:ff:ff:ff:ff
    5: ens2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
        link/ether 00:e0:4c:69:58:ad brd ff:ff:ff:ff:ff:ff
    6: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether ac:16:2d:8c:83:41 brd ff:ff:ff:ff:ff:ff
        inet 10.29.250.21/29 brd 10.29.250.23 scope global dynamic eno2
           valid_lft 3463sec preferred_lft 3463sec
        inet6 fe80::ae16:2dff:fe8c:8341/64 scope link
           valid_lft forever preferred_lft forever
    7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 2e:da:df:ac:3b:3e brd ff:ff:ff:ff:ff:ff
    8: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether ac:16:2d:8c:83:42 brd ff:ff:ff:ff:ff:ff
    9: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether ac:16:2d:8c:83:43 brd ff:ff:ff:ff:ff:ff
10: bond-lan: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 3a:88:89:a5:3f:7e brd ff:ff:ff:ff:ff:ff
    inet 10.30.142.69/24 brd 10.30.142.255 scope global bond-lan
       valid_lft forever preferred_lft forever
    inet6 fe80::3888:89ff:fea5:3f7e/64 scope link
       valid_lft forever preferred_lft forever
  1. eth0 变成了 eth1
  2. ens2 的 MAC 原本是 58:ac,现在 MAC 变成了 58:ad
  3. eth2 的 MAC 原为 58:ad,现在为 58:ac
  4. eth3 的 MAC 为 00:e0:4c:69:58:ae,现在消失了,我有一个新的接口 eth5 和一个全新的 MAC 2e:da:df:ac:3b:3e,但物理接口是相同的。

再次重启后,它再次改变

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond-lan state DOWN group default qlen 1000
    link/ether 3a:88:89:a5:3f:7e brd ff:ff:ff:ff:ff:ff
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether ac:16:2d:8c:83:41 brd ff:ff:ff:ff:ff:ff
    inet 10.29.250.21/29 brd 10.29.250.23 scope global dynamic eno2
       valid_lft 3406sec preferred_lft 3406sec
    inet6 fe80::ae16:2dff:fe8c:8341/64 scope link
       valid_lft forever preferred_lft forever
4: ens2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ab brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ac brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:e0:4c:69:58:ad brd ff:ff:ff:ff:ff:ff
7: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether ac:16:2d:8c:83:42 brd ff:ff:ff:ff:ff:ff
8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 2e:da:df:ac:3b:3e brd ff:ff:ff:ff:ff:ff
9: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether ac:16:2d:8c:83:43 brd ff:ff:ff:ff:ff:ff
10: bond-lan: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 3a:88:89:a5:3f:7e brd ff:ff:ff:ff:ff:ff
    inet 10.30.142.69/24 brd 10.30.142.255 scope global bond-lan
       valid_lft forever preferred_lft forever
    inet6 fe80::3888:89ff:fea5:3f7e/64 scope link
       valid_lft forever preferred_lft forever

主板的物理接口似乎运行良好,问题似乎只发生在 PCI 插槽接口上。此时我得出的结论是 PCI 网卡有问题,正在寻找替代品。

答案1

你的/etc/default/grub是不正确的。

sudo pico /etc/default/grub

这一行:

GRUB_CMDLINE_LINUX="GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0""

看起来应该是这样的:

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

然而,在现实生活中,我建议这样做:

GRUB_CMDLINE_LINUX=""

sudo update-grub

reboot

sudo lshw -C network# 将此更新编辑成您的问题

更新#1:

主板上有 4 个以太网端口,插槽中有 1 个带 4 个端口的以太网卡。

看来 Realtek PCI 卡无法正常工作,或者它位于错误的速度插槽中,或者 BIOS 为该插槽设置了错误的速度。另外请检查卡的固件更新。

相关内容