Ubuntu 16.04 LTS 中以太网不工作

Ubuntu 16.04 LTS 中以太网不工作

正如标题所述,我的以太网在 Ubuntu 16.04 中无法工作。实际上,几周前它就停止工作了,当时我还在安装 14.04,我决定最终升级到 16.04,希望它能解决我的问题。

在我完成apt-get update/之后,问题就出现了apt-get upgrade,并且这个问题一直存在,即使升级到 16.04 之后也是如此。wifi 工作正常,但我需要以太网来工作。我搜索了 Google 并尝试了许多解决方案,但都无济于事。有人愿意帮助我吗?告诉我你需要什么信息。谢谢。

ifconfig

eth0      Link encap:Ethernet  HWaddr e0:db:55:a0:e8:1a  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7317 errors:0 dropped:6 overruns:0 frame:0
          TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:542027 (542.0 KB)  TX bytes:37278 (37.2 KB)
          Interrupt:25 Base address:0x6000

感谢大家的回复,很抱歉我花了一段时间才回复。经过更多的故障排除后,我觉得我的问题一定与我工作的路由器有关。在家里我可以正常连接 wifi 和以太网,但在工作中我似乎是唯一无法通过以太网的人。有什么想法可能导致这样的问题吗?如果您需要更多信息,请告诉我。再次感谢。

Listening on LPF/eth0/e0:db:55:a0:e8:1a
Sending on   LPF/eth0/e0:db:55:a0:e8:1a
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x177c1d32)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x177c1d32)
DHCPREQUEST of 192.168.2.13 on eth0 to 255.255.255.255 port 67 (xid=0x321d7c17)
DHCPOFFER of 192.168.2.13 from 192.168.2.1
DHCPNAK from 192.168.2.1 (xid=0x177c1d32)
DHCPREQUEST of 192.168.2.13 on eth0 to 255.255.255.255 port 67 (xid=0x321d7c17)
DHCPNAK from 192.168.2.1 (xid=0x177c1d32)
DHCPREQUEST of 192.168.2.13 on eth0 to 255.255.255.255 port 67 (xid=0x321d7c17)
DHCPNAK from 192.168.2.1 (xid=0x177c1d32)

路由器日志:

Aug 23 11:16:12 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:24 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:16:24 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:16:26 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:28 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:31 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:39 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:16:39 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:16:42 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:46 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:51 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:16:57 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:16:57 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:00 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:00 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:01 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:04 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:11 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:22 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:22 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:23 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:26 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:29 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:37 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:37 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:40 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:40 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:41 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:44 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:48 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:17:55 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:55 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:58 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:17:58 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:17:59 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:02 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:10 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:20 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a
Aug 23 11:18:20 [DHCP]: [SERVER]  DHCP_OFFER sent
Aug 23 11:18:22 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:25 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:30 [DHCP]: [SERVER] DHCPNAK on 192.168.2.13 to e0:db:55:a0:e8:1a via br0
Aug 23 11:18:45 [DHCP]: [SERVER] DHCPDISCOVER from e0:db:55:a0:e8:1a...

谢谢大家的帮助。显然很多电脑(和手机)都获得了相同的 IP。所以我们对路由器进行了刷新,一切又恢复正常了。再次感谢您的时间。

答案1

首先是基本的故障排除...我会确保以太网电缆插入的地方有正确的灯。如果是 10 英尺以下的短线,我会翻转电缆,以便将其插入 PC 的地方插入网络端口,反之亦然。如果可能,请尝试路由器/交换机/集线器/网络设备上的其他端口。如果可用,请使用不同的电缆。如果可用,请尝试不同的网络设备。但是......从听起来,您已经尝试了这些常见的故障排除步骤。

因此,我会尝试一些简单的方法,关闭所有以太网端口,然后使用以下命令重新启动它们:

sudo ifdown -a

然后

sudo ifup -a

如果这不起作用,请检查以确保您的接口配置正确。我已经看到了 eth0、p2p1 和 enp1s0 作为接口,因此我建议首先通过查看所有可用接口来收集信息:

ifconfig -a

然后我们可以查看和编辑配置文件,我使用vim:

sudo vi /etc/network/interfaces

确保有两行内容:

auto eth0
iface eth0 inet dhcp

如果您必须对文件进行更改以保存,ESC然后使用精彩的和命令:wq重新启动界面。甚至可能想要使用sudo ifdown -asudo ifup -ashutdown -r now

您可能还需要检查路由器/交换机/集线器/网络设备上的设置,因为这些可能是罪魁祸首,而不是您的 Ubuntu。

检查后,可能是您使用的硬件有问题。此时,我会连接一个备用 USB 以太网适配器,看看是否可以正常工作。祝您好运!

相关内容