我的作業系統是Ubuntu 16.04。我想我過去做錯了什麼。我一直使用 WLAN 連接互聯網,一切都很好。今天我想使用LAN,但它不能正常工作。
首先,對於 Firefox 中的許多網站,我得到:「無法連接」。 Google 可以運作,但許多其他網站卻不能(例如 speedtest.net)。
其次,在我的終端機中,我無法 ping 通任何內容。例如ping www.google.com
。我明白了connect: Network is unreachable
同樣,WLAN 工作正常,但 LAN 不行。
如果配置:
eth0 Link encap:Ethernet HWaddr f0:de:f1:00:02:54
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2420 errors:0 dropped:0 overruns:0 frame:0
TX packets:1439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2686690 (2.6 MB) TX bytes:207739 (207.7 KB)
Interrupt:20 Memory:f2500000-f2520000
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:1399 errors:0 dropped:0 overruns:0 frame:0
TX packets:1399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:129446 (129.4 KB) TX bytes:129446 (129.4 KB)
wlan0 Link encap:Ethernet HWaddr 00:26:c7:54:99:0a
inet addr:192.168.178.40 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::226:c7ff:fe54:990a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2370 errors:0 dropped:0 overruns:0 frame:0
TX packets:2734 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1117949 (1.1 MB) TX bytes:433103 (433.1 KB)
ip位址:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether f0:de:f1:00:02:54 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:26:c7:54:99:0a brd ff:ff:ff:ff:ff:ff
inet 192.168.178.40/24 brd 192.168.178.255 scope global dynamic wlan0
valid_lft 863788sec preferred_lft 863788sec
inet6 fe80::226:c7ff:fe54:990a/64 scope link
valid_lft forever preferred_lft forever
IP路由:
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.1 metric 100
ip -6 路由:
2a02:908:1473:3b20::/64 dev eth0 proto kernel metric 256 expires 7111sec pref medium
2a02:908:1473:3b20::/59 via fe80::ca0e:14ff:fe91:4c8b dev eth0 proto ra metric 100 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::ca0e:14ff:fe91:4c8b dev eth0 proto static metric 100 pref medium
ping6 www.google.com:
PING www.google.com(ams17s01-in-x04.1e100.net) 56 data bytes
64 bytes from ams17s01-in-x04.1e100.net: icmp_seq=1 ttl=51 time=35.1 ms
64 bytes from ams17s01-in-x04.1e100.net: icmp_seq=2 ttl=51 time=33.7 ms
64 bytes from ams17s01-in-x04.1e100.net: icmp_seq=3 ttl=51 time=24.9 ms