有线连接不工作,以太网电缆工作正常

有线连接不工作,以太网电缆工作正常

我刚刚在我的 HP 工作站上全新安装了 Ubuntu 20.04,但是有线以太网连接不起作用,即使以太网电缆工作正常(在另一个工作站上测试并且工作正常)并且 Ubuntu 确实说我已连接到互联网(有线连接,但是以太网图标上有一个问号)。

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
Fron 192.168.0.51 icmp seq=1 Destination Host Unreachable
From 192.168.0.51 icmp seq=2 Destination Host Unreachable
From 192.168.0.51 icmp seq=3 Destination Host Unreachable
Fron 192.168.0.51 icmp seq=4 Destination Host Unreachable
Fron 192.168.0.51 icmp seq=5 Destination Host Unreachable
^C
8.8.8.8 ping statistics
6 packets transmitted, 0 received, +5 errors, 100% packet loss, time 5047ns
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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
  link/ether a0:d3:c1:0d:96:ae brd ff:ff:ff:ff:ff:ff
  inet 192.168.0.51/24 brd 192.168.0.255 scope global dynamic noprefixroute eno1
    valid_lft 86233sec preferred_lft 86233sec
  inet6 fe80::8bed:df85:c0cf:f771/64 scope link noprefixroute
    valid_lft forever preferred_lft forever
sudo nano /etc/netplan/01-network-manager-all.yanl

network:
  version: 2
  renderer: NetworkManager

sudo nano /etc/resolv.conf

nameserver 127.0.0.53
options edns0

不幸的是,工作站没有 wifi 卡,我也无法获得 USB 加密狗 wifi 卡,如能得到任何帮助我将不胜感激,谢谢!

编辑1

ip route

default via 192.168.0.1 dev eno1 proto dhcp metric 20100
169.254.0.0/16 dev eno1 scope link metric 1000
192.168.0.0/24 dev eno1 proto kernel scope link src 192.168.0.51 metric 100
service NetworkManager status
NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/systen/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-03-07 21:44:00 GMT: 49min ago
Docs: man:NetworkManager(8)
Main PID: 614 (NetworkManager)
Tasks: 3 (limit: 19017)
Memory: 14.8M
CGroup: /system.slice/NetworkManager.service
L614 /usr/sbin/NetworkManager --no-daemon
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.1866] dhcp4 (eno1): option routers
=> '192.168.0.1'
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.1866] dhcp4 (eno1): option subnet_mask
=> '255.255.255.0'
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.1866] dhcp4 (eno1): state changed unknown -> bound
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.1920] device (eno1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Mar 07 22:25:39 js-HP-EllteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2034] device (eno1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: "managed')
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2036] device (eno1): state change: secondariles -> activated (reason 'none', sys-iface-state: 'managed')
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2040] manager: NetworkManager state is now CONNECTED_LOCAL
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2046] manager: NetworkManager state is now CONNECTED_SITE
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2046] policy: set 'Wired connection 1' (eno1) as default for IPv4 routing and DNS
Mar 07 22:25:39 js-HP-EliteDesk-800-G1-SFF NetworkManager[614]: <info> [1678227939.2049] device (eno1): Activation: successful, device activated.
ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.51 icmp_seq=1 Destination Host Unreachable
From 192.168.0.51 icmp_seq-2 Destination Host Unreachable
From 192.168.0.51 icmp_seq=3 Destination Host Unreachable
From 192.168.0.51 icmp_seq=4 Destination Host Unreachable
^C
192.168.0.1 ping statistics
5 packets transmitted, 6 received, +4 errors, 100% packet loss, tine 4041ns

答案1

问题是您的网关无法访问。这与 Ubuntu 无关。

您可以尝试重新启动路由器。另外,尝试将以太网电缆插入路由器上的另一个端口。您是否将其插入了 WAN(ISP)端,而不是 LAN 端?

相关内容