12.04 或 11.10 版有线和无线均无互联网

12.04 或 11.10 版有线和无线均无互联网

我刚刚在一台新电脑上安装了 Kubuntu 12.04,这台电脑的主板是华硕的,带有板载网卡。板载网卡在 BIOS 中启用。我正好没有多余的网卡可以测试。互联网连接是通过 D-Link 路由器进行的,有线或无线连接,通过 T-Link USB 无线适配器。互联网连接对于网络上的其他计算机(2 台有线和 1 台无线)工作正常。我在这台电脑上尝试了多条已知良好的电缆和路由器端口。我也启动了 Kubuntu 11.10 LiveCD 进行测试,结果相同。

这台机器无法连接到互联网。在 12.04 中的有线连接上:

shelly@neptune:~$ sudo service networking status
networking stop/waiting
shelly@neptune:~$ sudo service networking restart
stop: Unknown instance:
networking stop/waiting
shelly@neptune:~$ ping google.com
ping: unknown host google.com
shelly@neptune:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.027 ms
64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.019 ms
64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.017 ms
64 bytes from 127.0.0.1: icmp_req=4 ttl=64 time=0.027 ms
64 bytes from 127.0.0.1: icmp_req=5 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_req=6 ttl=64 time=0.021 ms
64 bytes from 127.0.0.1: icmp_req=7 ttl=64 time=0.019 ms
^C
--- 127.0.0.1 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 5997ms
rtt min/avg/max/mdev = 0.017/0.021/0.027/0.004 ms
shelly@neptune:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:04:a6:82:6b:eb
          inet6 addr: fe80::5604:a6ff:fe82:6beb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:230 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:360 (360.0 B)  TX bytes:50506 (50.5 KB)
          Interrupt:46 Base address:0xe000

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:16436  Metric:1
          RX packets:134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:134 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10616 (10.6 KB)  TX bytes:10616 (10.6 KB)

shelly@neptune:~$ lshw -C network
WARNING: you should run this program as super-user.
  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: 06
       serial: 54:04:a6:82:6b:eb
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: 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 latency=0 multicast=yes port=MII speed=100Mbit/s
       resources: irq:46 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
shelly@neptune:~$ sudo lshw -C network
  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: 06
       serial: 54:04:a6:82:6b:eb
       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 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:46 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
shelly@neptune:~$ sudo service network-manager status
network-manager start/running, process 823
shelly@neptune:~$ sudo service network-manager restart
network-manager stop/waiting
network-manager start/running, process 1684
shelly@neptune:~$ lsmod | grep -i r8169
r8169                  62099  0
shelly@neptune:~$

编辑:事实证明,r8169该主板没有使用检测到的 LAN 卡,而是使用了8111E 正如在这里发现的。所以这就是解决方案。

答案1

让我们首先问几个问题来明确您的硬件配置。

  • NIC 如何配置运行 - 您是否将其设置为静态/手动或自动 DHCP?
  • NIC 上的 LED 是否亮起或闪烁?
  • 您使用哪种类型的路由器/调制解调器,并且您在这些设备上使用的是工厂固件还是其他固件?

关于上述打印输出的说明:

  • eth0(大概是您的 NIC)没有分配 IP 地址。

答案2

服务停止后为什么要重新启动?

尝试sudo networking start

另请配置 IP 地址(如果是静态的)。

答案3

问题在于 -23 内核中缺少此主板 NIC 的驱动程序。我进一步阐述了这个问题在相关问题的结论帖中

答案4

我在调整 sshd_config 文件并需要应用更改时遇到了同样的问题。只需使用旧的 /etc/init.d/ 脚本并传递“restart”即可

相关内容