网络问题:所有 Ubuntu 设备均无法接收数据

网络问题:所有 Ubuntu 设备均无法接收数据

以下是我的问题:使用我的两个 Ubuntu 设备,我无法从互联网获取数据。我可以成功 ping 我的路由器,但 ping 其他 IP(如 8.8.8.8)不起作用。我通过 LAN 连接。

问题只出现在我目前使用的网络上,在其他网络上则一切正常。此外,在当前网络中,所有其他设备(Windows、Android)都可以连接到互联网。

您知道问题可能出在哪里吗?这两台设备的 Ubuntu 版本分别为 16 和 18。

以下是来自我的 ubuntu 16 设备的一些信息:


gnoasti@jetson-flashing-machine:~$ nmcli device show
GENERAL.DEVICE:                         enp2s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         E8:03:9A:0E:DC:2C
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wired connection 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/0
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         169.254.0.29/24
IP4.GATEWAY:                            169.254.0.1
IP4.DNS[1]:                             169.254.0.1
IP6.ADDRESS[1]:                         fe80::e06d:31c0:adc3:a8e5/64
IP6.GATEWAY:                            

GENERAL.DEVICE:                         wlp1s0
GENERAL.TYPE:                           wifi
GENERAL.HWADDR:                         C4:85:08:68:8E:4A
GENERAL.MTU:                            0
GENERAL.STATE:                          30 (disconnected)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            
gnoasti@jetson-flashing-machine:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         169.254.0.1     0.0.0.0         UG    100    0        0 enp2s0
169.254.0.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0
gnoasti@jetson-flashing-machine:~$ ping 169.254.0.1
PING 169.254.0.1 (169.254.0.1) 56(84) bytes of data.
64 bytes from 169.254.0.1: icmp_seq=1 ttl=64 time=0.721 ms
64 bytes from 169.254.0.1: icmp_seq=2 ttl=64 time=0.650 ms
^C
--- 169.254.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1026ms
rtt min/avg/max/mdev = 0.650/0.685/0.721/0.044 ms
gnoasti@jetson-flashing-machine:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2040ms

编辑:输出sudo lshw -C network

gnoasti@jetson-flashing-machine:~$ sudo lshw -C network
sudo: unable to resolve host jetson-flashing-machine
  *-network               
       description: Wireless interface
       product: Centrino Advanced-N 6235
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: wlp1s0
       version: 24
       serial: c4:85:08:68:8e:4a
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-88-generic firmware=18.168.6.1 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:29 memory:f0500000-f0501fff
  *-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:02:00.0
       logical name: enp2s0
       version: 06
       serial: e8:03:9a:0e:dc:2c
       size: 100Mbit/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 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=169.254.0.29 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:19 ioport:2000(size=256) memory:f0404000-f0404fff memory:f0400000-f0403fff

提前谢谢您!

答案1

您显示的 IP 地址 (169.254.0.29) 是“链路本地地址”即“仅对主机所连接的网段或广播域内的通信有效”。

所以它永远不会被路由到您当前的网络段之外。

确保您的界面符合以下任一要求:

  • 具有有效的网络 IP 地址和网关
  • 或者配置为使用 DHCP,并且路由器或网络上的其他设备具有提供 IP 地址的 DHCP 服务器。

相关内容