升级到 Ubuntu 16.04 后,我有线连接到 LAN,但没有互联网。无线连接工作正常。
ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:2a:72:be:81:8b
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:832 errors:0 dropped:0 overruns:0 frame:0
TX packets:612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:81397 (81.3 KB) TX bytes:50754 (50.7 KB)
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:298 errors:0 dropped:0 overruns:0 frame:0
TX packets:298 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:29634 (29.6 KB) TX bytes:29634 (29.6 KB)
wlan0 Link encap:Ethernet HWaddr 9c:ad:97:02:78:e7
inet addr:10.145.160.47 Bcast:10.145.255.255 Mask:255.255.128.0
inet6 addr: fe80::9ead:97ff:fe02:78e7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1093 errors:0 dropped:0 overruns:0 frame:0
TX packets:1097 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:758982 (758.9 KB) TX bytes:153922 (153.9 KB)
连接到有线连接后
ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:2a:72:be:81:8b
inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ba2a:72ff:febe:818b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:925 errors:0 dropped:0 overruns:0 frame:0
TX packets:724 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:92209 (92.2 KB) TX bytes:62148 (62.1 KB)
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:805 errors:0 dropped:0 overruns:0 frame:0
TX packets:805 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:104784 (104.7 KB) TX bytes:104784 (104.7 KB)
wlan0 Link encap:Ethernet HWaddr 9c:ad:97:02:78:e7
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:5832 errors:0 dropped:0 overruns:0 frame:0
TX packets:5546 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2508410 (2.5 MB) TX bytes:876197 (876.1 KB)
答案1
我遇到了完全相同的问题,发现就我而言,是内核需要更新。
首先下载软件包。这个适用于 64 位。
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-headers-4.9.0-040900rc2_4.9.0-040900rc2.201610232131_all.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-headers-4.9.0-040900rc2-generic_4.9.0-040900rc2.201610232131_amd64.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-image-4.9.0-040900rc2-generic_4.9.0-040900rc2.201610232131_amd64.deb
接下来,安装软件包。
$ sudo dpkg -i 'linux-headers-4.9*.deb' 'linux-image-4.9*.deb'
最后,重新启动。
sudo reboot
这是适用于 32 位机器的软件包。
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-headers-4.9.0-040900rc2_4.9.0-040900rc2.201610232131
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-headers-4.9.0-040900rc2-generic_4.9.0-040900rc2.201610232131_i386.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc2/linux-image-4.9.0-040900rc2-generic_4.9.0-040900rc2.201610232131_i386.deb
安装软件包。
$ sudo dpkg -i 'linux-headers-4.9*.deb' 'linux-image-4.9*.deb'
重启。
sudo reboot
如果这不起作用,您可以使用此代码卸载:
sudo apt-get remove 'linux-headers-4.9*' 'linux-image-4.9*'