互联网连接定期失败

互联网连接定期失败

我在新电脑上安装了 Ubuntu 14.04 桌面版。我的互联网连接(以太网)有问题。实际上,我的互联网工作了 20 秒,然后停止了 40 到 60 秒。这个循环不断重复,让我很难工作。

我尝试编辑/etc/reolv.conf来自

nameserver 127.0.0.1

nameserver 127.0.0.1   
nameserver 8.8.8.8   
nameserver 8.8.4.4   

但问题并没有解决。

以下是ifconfig输出(我使用 eth0)

eth0:     Link encap:Ethernet  HWaddr f0:79:59:39:ae:80  
          inet addr:115.145.183.44  Bcast:115.145.183.255  Mask:255.255.255.0
          inet6 addr: fe80::f279:59ff:fe39:ae80/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:195975 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:32299713 (32.2 MB)  TX bytes:2260481 (2.2 MB)
          Memory:fb300000-fb37ffff 

eth1:       Link encap:Ethernet  HWaddr f0:79:59:39:ae:7f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:fb700000-fb720000 

lo:         Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3647 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3647 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:350955 (350.9 KB)  TX bytes:350955 (350.9 KB)

以下是输出sudo lshw -C network

*-network               
       description: Ethernet interface
       product: Ethernet Connection (2) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth1
       version: 05
       serial: f0:79:59:39:ae:7f
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=2.3.2-k firmware=0.1-4 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:97 memory:fb700000-fb71ffff memory:fb739000-fb739fff ioport:f020(size=32)




  *-network
       description: Ethernet interface
       product: I210 Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:0f:00.0
       logical name: eth0
       version: 03
       serial: f0:79:59:39:ae:80
       size: 100Mbit/s
       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.2.13-k duplex=full firmware=3.25, 0x800005cf ip=115.145.183.44 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:16 memory:fb300000-fb37ffff ioport:c000(size=32) memory:fb380000-fb383fff

答案1

在打开的终端中运行以下命令。

首先,运行以下命令将 resolv.conf 文件清零:

echo "# Generated by NetworkManager" | sudo tee /etc/resolv.conf

然后,重新启动网络管理器:

sudo service network-manager restart

您可能需要单击面板上的网络管理器图标,然后可能需要从下拉菜单中选择网络,或者尝试拔下并重新插入以太网电缆(如果需要)。如果问题已解决,则无需继续。如果没有解决,您可能需要通过运行以下命令清除现有的网络配置:

首先,创建一个文件来备份现有的配置,然后将文件移动到这里:

sudo mkdir /etc/NetworkManager/backupconnections
sudo mv /etc/NetworkManager/system-connections/* /etc/NetworkManager/backupconnections/

现在,重新启动网络管理器:

sudo service network-manager restart

您可能需要拔下以太网电缆并重新插入。

相关内容