您好,昨天,我的服务器断电了,该服务器运行的是 Ubuntu Server 18.04.4 LTS。断电后,我意识到无法 ping 通任何东西,因此我立即检查了网络适配器,它使用 #lspci 出现在 ubuntu 上。我进入 BIOS 并注意到网络适配器在以太网电缆插入时闪烁,但当我启动 ubuntu 时它停止了。我已经尝试重置 BIOS,使用不同的端口和以太网电缆。互联网在其他地方运行良好。我一直在绞尽脑汁试图解决这个问题,所以任何关于如何修复它的建议都将不胜感激,谢谢!
我的网络拓扑是一台计算机连接到网络交换机,该交换机直接连接到路由器。交换机和电缆已被检查为故障点。
编辑:在同一硬件上启动 Ubuntu Home 时,互联网运行正常。
带有板载以太网
*-network DISABLED
description: Ethernet interface
product: I211 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:07:00.0
logical name: enp7s0
version: 03
serial: b4:2e:99:37:96:24
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.4.0-k firmware=0. 6-1 latency=0 link=no multicast=yes port=twisted pair
resources: irq:38 memory:f7400000-f741ffff ioport:f000(size=32) memory:f7420000-f7423fff
*-network:0
description: Ethernet interface
physical id: 1
logical name: veth8ccdf40
serial: 96:3c:c7:77:5b:8c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:1
description: Ethernet interface
physical id: 2
logical name: vethe78e395
serial: 8a:79:ec:c3:1f:3e
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:2
description: Ethernet interface
physical id: 3
logical name: veth5d2f953
serial: 96:42:dd:ae:ae:52
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:3
description: Ethernet interface
physical id: 4
logical name: veth4f8fb2c
serial: de:1d:a0:a5:de:a8
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:4
description: Ethernet interface
physical id: 5
logical name: docker0
serial: 02:42:2e:f0:65:e4
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=yes multicast=yes
*-network:5
description: Ethernet interface
physical id: 6
logical name: veth79ceca4
serial: a2:b9:77:11:57:7c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:6
description: Ethernet interface
physical id: 7
logical name: veth2ffa2a6
serial: d2:b6:bd:e0:a6:c0
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:7
description: Ethernet interface
physical id: 8
logical name: veth902f706
serial: 62:b7:aa:97:13:2c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:8
description: Ethernet interface
physical id: 9
logical name: vethf5875fa
serial: 9e:47:b1:e2:c6:c8
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
带有以太网适配器
*-network DISABLED
description: Ethernet interface
product: I211 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:07:00.0
logical name: enp7s0
version: 03
serial: b4:2e:99:37:96:24
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.4.0-k firmware=0. 6-1 latency=0 link=no multicast=yes port=twisted pair
resources: irq:38 memory:f7400000-f741ffff ioport:f000(size=32) memory:f7420000-f7423fff
*-network:0
description: Ethernet interface
physical id: 1
logical name: veth8ccdf40
serial: 96:3c:c7:77:5b:8c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:1 DISABLED
description: Ethernet interface
physical id: 2
logical name: enxa0cec819afb3
serial: a0:ce:c8:19:af:b3
size: 1Gbit/s
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v1.09.9 duplex=full link=no multicast=yes port=MII speed=1Gbit/s
*-network:2
description: Ethernet interface
physical id: 3
logical name: vethe78e395
serial: 8a:79:ec:c3:1f:3e
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:3
description: Ethernet interface
physical id: 4
logical name: veth5d2f953
serial: 96:42:dd:ae:ae:52
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:4
description: Ethernet interface
physical id: 5
logical name: veth322071d
serial: 66:3c:29:3d:31:6a
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:5
description: Ethernet interface
physical id: 6
logical name: docker0
serial: 02:42:2e:f0:65:e4
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=172.17.0.1 link=yes multicast=yes
*-network:6
description: Ethernet interface
physical id: 7
logical name: veth79ceca4
serial: a2:b9:77:11:57:7c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:7
description: Ethernet interface
physical id: 8
logical name: veth2ffa2a6
serial: d2:b6:bd:e0:a6:c0
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:8
description: Ethernet interface
physical id: 9
logical name: veth902f706
serial: 62:b7:aa:97:13:2c
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:9
description: Ethernet interface
physical id: a
logical name: vethf5875fa
serial: 9e:47:b1:e2:c6:c8
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
网络计划
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp6s0:
dhcp4: yes
答案1
我整理了一个 /etc/netplan/*.yaml 文件,它可以驱动板载以太网或 USB 以太网适配器。一次只能连接一个。先尝试板载以太网。如果愿意,可以尝试 USB 以太网适配器。现在两者都应该可以正常工作。
将您的 /etc/netplan/*.yaml 文件更改为此...保留缩进、间距,并且无制表符,与您所看到的那样...
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp7s0:
dhcp4: true
optional: true
enxa0cec819afb3:
dhcp4: true
optional: true
sudo netplan --debug generate
# 生成配置文件
sudo netplan apply
# 应用新配置
reboot
# 目前这是可选的,但我们稍后会做