安装 16.04LTS 后无网络连接

安装 16.04LTS 后无网络连接

在全新安装的双启动 win7/16.04LTS 上。互联网在 Windows 上工作正常,但在 ubuntu 上没有有线或无线连接。它只会尝试永远连接。我无法 ping 通谷歌,我甚至无法通过 192.168.0.1 上的浏览​​器连接到我的路由器

所以我将其添加到 /etc/network/interface

auto enp5s0
iface enp5s0 inet static
address 192.168.0.105
netmask 255.255.255.0
gateway 192.168.0.1
dns‐nameservers 8.8.8.8 8.8.4.4

然后它显示了一个 IP,我运行了这些

ifconfig=

enp5s0    Link encap:Ethernet  HWaddr 74:d4:35:9f:13:bd  
          inet addr:192.168.0.105  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::76d4:35ff:fe9f:13bd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 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:78 (78.0 B)  TX bytes:0 (0.0 B)

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:673 errors:0 dropped:0 overruns:0 frame:0
          TX packets:673 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:52344 (52.3 KB)  TX bytes:52344 (52.3 KB)

lshw-类网络=

 *-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:05:00.0
       logical name: enp5s0
       version: 06
       serial: 74:d4:35:9f:13:bd
       size: 1Gbit/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=192.168.0.105 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:27 ioport:b000(size=256) memory:fe100000-fe100fff memory:da100000-da103fff

iwconfig =

enp5s0    no wireless extensions.

lo        no wireless extensions.

IP 链接 =

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 74:d4:35:9f:13:bd brd ff:ff:ff:ff:ff:ff

任何帮助都将不胜感激谢谢

答案1

问题是我的以太网适配器根本没有被驱动。我发现 realtek 网站只提供适用于 Linux 内核 3.x 或更早版本的驱动程序,所以我安装了 14.04 并安装了驱动程序,现在它在线了。

相关内容