在我的 InternetServiceProvider 路由器上,我连接了一台 PC 和一台笔记本电脑,两台电脑都安装了 Ubuntu 20.04。昨天,PC 和笔记本电脑的以太网连接突然停止工作,并且与 ISP 一起发现 ISP 的路由器不再正常工作。今天,ISP 的技术人员过来更换了路由器,现在笔记本电脑上的以太网连接可以正常工作,而 PC 上的以太网连接仍然无法正常工作(PC 和笔记本电脑的 WIFI 连接都可以正常工作)。
/etc/netplan/01-network-manager-all.yaml
:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
(base) raphy@pc:~$ uname -v
#71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021
(基地)raphy@pc:~$
(base) raphy@pc:~$ ifconfig -a
enp3s0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 78:24:af:43:ef:5c txqueuelen 1000 (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
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 10296 bytes 725063 (725.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10296 bytes 725063 (725.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
minionebr: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.100.1 netmask 255.255.255.0 broadcast 172.16.100.255
inet6 fe80::f83b:14ff:fed4:d0a7 prefixlen 64 scopeid 0x20<link>
ether fa:3b:14:d4:d0:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 61 bytes 6611 (6.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
minionebr-nic: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500
ether fa:3b:14:d4:d0:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 61 bytes 6611 (6.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::14f5:1c04:21b0:97fe prefixlen 64 scopeid 0x20<link>
ether c0:4a:00:09:0e:80 txqueuelen 1000 (Ethernet)
RX packets 15275 bytes 12876925 (12.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13372 bytes 4435441 (4.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
(base) raphy@pc:~$ ip route
default via 192.168.1.1 dev wlp5s0 proto dhcp metric 600
169.254.0.0/16 dev wlp5s0 scope link metric 1000
172.16.100.0/24 dev minionebr proto kernel scope link src
172.16.100.1
192.168.1.0/24 dev wlp5s0 proto kernel scope link src 192.168.1.3
metric 600
如您所见,系统无法识别任何有线连接设置:
虽然它与WIFI连接设置有关:
(base) raphy@pc:~$ ip a
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: enp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
group default qlen 1000
link/ether 78:24:af:43:ef:5c brd ff:ff:ff:ff:ff:ff
3: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UP group default qlen 1000
link/ether c0:4a:00:09:0e:80 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic
noprefixroute wlp5s0
valid_lft 2664sec preferred_lft 2664sec
inet6 fe80::14f5:1c04:21b0:97fe/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: minionebr: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UP group default qlen 1000
link/ether fa:3b:14:d4:d0:a7 brd ff:ff:ff:ff:ff:ff
inet 172.16.100.1/24 brd 172.16.100.255 scope global
minionebr
valid_lft forever preferred_lft forever
inet6 fe80::f83b:14ff:fed4:d0a7/64 scope link
valid_lft forever preferred_lft forever
5: minionebr-nic: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc
noqueue master minionebr state UNKNOWN group default qlen 1000
link/ether fa:3b:14:d4:d0:a7 brd ff:ff:ff:ff:ff:ff
(base) raphy@pc:~$ lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor
DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen
Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family
USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series
Chipset Family ME Interface #1
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family
USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family
HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI
Express Root Port 1 (rev d0)
00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI
Express Root Port 3 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family
USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation H97 Chipset LPC Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset
Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus
Controller
01:00.0 VGA compatible controller: NVIDIA Corporation GK104
[GeForce GTX 770] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio
Controller (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev
11)
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to
PCI Bridge (rev 04)
05:00.0 Network controller: Qualcomm Atheros AR9227 Wireless
Network Adapter (rev 01)
为什么重启后enp3s0
不再检测到ifconfig
?:
(base) raphy@pc:~$ ifconfig
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 2097 bytes 174125 (174.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2097 bytes 174125 (174.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
0
minionebr: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.100.1 netmask 255.255.255.0 broadcast
172.16.100.255
inet6 fe80::f83b:14ff:fed4:d0a7 prefixlen 64 scopeid
0x20<link>
ether fa:3b:14:d4:d0:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 5300 (5.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
0
minionebr-nic: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500
ether fa:3b:14:d4:d0:a7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 5300 (5.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
0
wlp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.3 netmask 255.255.255.0 broadcast
192.168.1.255
inet6 fe80::14f5:1c04:21b0:97fe prefixlen 64 scopeid
0x20<link>
ether c0:4a:00:09:0e:80 txqueuelen 1000 (Ethernet)
RX packets 10074 bytes 10269894 (10.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7384 bytes 1746871 (1.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
0
更新1)
我惊讶地意识到,我什么也没做……地址里/etc/netplan/01-network-manage-all.yaml
没有enp3s0
这个。
添加后:
network:
version: 2
renderer: NetworkManager
ethernets:
enp3s0:
dhcp4: no
addresses: [192.168.1.7/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
应用修改并重新启动系统,我现在可以看到Network Unmanaged
::
但是,单击Connect
并不能使以太网连接工作,并且仍然Wired Settings
不会显示:
我还应该检查什么?如何解决这个问题?