难道真的不能上网了吗?麻烦大神们看看

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
断狱丹阳
帖子: 3
注册时间: 2014-10-18 23:05

难道真的不能上网了吗?麻烦大神们看看

#1

帖子 断狱丹阳 »

首先,网络是校园局域网,同时我是把ubuntu14.04安装在移动硬盘里的,设置了IP地址后,有线无线都能连接上,但死活打不开网页,提示出错,找了好久,估摸着是网卡驱动或者DNS出问题,于是依次执行了以下几条命令:

uname -a
lspci
sudo lshw -C network
ifconfig
ping 192.168.1.1 -c 4
tail /var/log/syslog -n 20
sudo ls -al /etc/resolv.conf
sudo cat /etc/resolv.conf

获得结果如下:
lkyong@lkyong:~$ uname -a
Linux lkyong 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux


lkyong@lkyong:~$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.7 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 IDE interface: Intel Corporation 7 Series Chipset Family 4-port SATA Controller [IDE mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
00:1f.5 IDE interface: Intel Corporation 7 Series Chipset Family 2-port SATA Controller [IDE mode] (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 630M] (rev a1)
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)
04:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0a)
09:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)


lkyong@lkyong:~$ sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0.2
bus info: pci@0000:04:00.2
logical name: eth0
version: 0a
serial: 04:7d:7b:d0:69:5f
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=rtl8411-1_0.0.3 06/18/12 ip=192.168.4.64 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:43 ioport:2000(size=256) memory:d2404000-d2404fff memory:d2400000-d2403fff
*-network
description: Wireless interface
product: AR9485 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:09:00.0
logical name: wlan0
version: 01
serial: 84:4b:f5:47:0b:1b
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=192.168.23.143 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:19 memory:d2500000-d257ffff memory:9fb00000-9fb0ffff

lkyong@lkyong:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 04:7d:7b:d0:69:5f
inet addr:192.168.4.64 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::67d:7bff:fed0:695f/64 Scope:Link
inet6 addr: 2001:4::67d:7bff:fed0:695f/64 Scope:Global
inet6 addr: 2001:4::fcdc:26ab:849:fa11/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12329 errors:0 dropped:7 overruns:0 frame:0
TX packets:168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1023732 (1.0 MB) TX bytes:20431 (20.4 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:172 errors:0 dropped:0 overruns:0 frame:0
TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12625 (12.6 KB) TX bytes:12625 (12.6 KB)

wlan0 Link encap:Ethernet HWaddr 84:4b:f5:47:0b:1b
inet addr:192.168.23.143 Bcast:192.168.23.255 Mask:255.255.255.0
inet6 addr: fe80::864b:f5ff:fe47:b1b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:53 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7112 (7.1 KB) TX bytes:16631 (16.6 KB)


lkyong@lkyong:~$ ping 192.168.1.1 -c 4
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms


lkyong@lkyong:~$ tail /var/log/syslog -n 20
Oct 18 22:22:26 lkyong wpa_supplicant[721]: wlan0: CTRL-EVENT-SCAN-STARTED
Oct 18 22:22:28 lkyong wpa_supplicant[721]: nl80211: send_and_recv->nl_recvmsgs failed: -33
Oct 18 22:22:28 lkyong NetworkManager[706]: <warn> (wlan0): DHCPv6 request timed out.
Oct 18 22:22:28 lkyong NetworkManager[706]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 1576
Oct 18 22:22:28 lkyong NetworkManager[706]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Oct 18 22:22:28 lkyong NetworkManager[706]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) started...
Oct 18 22:22:28 lkyong NetworkManager[706]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Oct 18 22:23:09 lkyong wpa_supplicant[721]: wlan0: CTRL-EVENT-SCAN-STARTED
Oct 18 22:23:11 lkyong wpa_supplicant[721]: nl80211: send_and_recv->nl_recvmsgs failed: -33
Oct 18 22:24:12 lkyong wpa_supplicant[721]: wlan0: CTRL-EVENT-SCAN-STARTED
Oct 18 22:24:14 lkyong wpa_supplicant[721]: nl80211: send_and_recv->nl_recvmsgs failed: -33
Oct 18 22:24:33 lkyong avahi-daemon[685]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::67d:7bff:fed0:695f.
Oct 18 22:24:33 lkyong avahi-daemon[685]: Joining mDNS multicast group on interface eth0.IPv6 with address 2001:4::fcdc:26ab:849:fa11.
Oct 18 22:24:33 lkyong avahi-daemon[685]: Registering new address record for 2001:4::fcdc:26ab:849:fa11 on eth0.*.
Oct 18 22:24:33 lkyong avahi-daemon[685]: Withdrawing address record for fe80::67d:7bff:fed0:695f on eth0.
Oct 18 22:24:33 lkyong avahi-daemon[685]: Registering new address record for 2001:4::67d:7bff:fed0:695f on eth0.*.
Oct 18 22:24:47 lkyong whoopsie[1129]: offline
Oct 18 22:25:35 lkyong wpa_supplicant[721]: wlan0: CTRL-EVENT-SCAN-STARTED
Oct 18 22:27:18 lkyong wpa_supplicant[721]: wlan0: CTRL-EVENT-SCAN-STARTED
Oct 18 22:27:20 lkyong wpa_supplicant[721]: nl80211: send_and_recv->nl_recvmsgs failed: -33


lkyong@lkyong:~$sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Oct 17 19:46 /etc/resolv.conf -> ../run/resolvconf/resolv.conf


lkyong@lkyong:~$ sudo cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search mshome.net

对着这堆东西看了好一会,实在不懂,只能求救了,难道安装在移动硬盘里的ubuntu的网功能就不能用了?麻烦大神们解救解救...
:em01 :em01
xep007
帖子: 871
注册时间: 2006-01-03 20:44

Re: 难道真的不能上网了吗?麻烦大神们看看

#2

帖子 xep007 »

太长了,懒得看。能获得IP,但不能上网。gateway和dns设置了吗?
头像
xzc8825745
帖子: 622
注册时间: 2011-06-04 20:24
联系:

Re: 难道真的不能上网了吗?麻烦大神们看看

#3

帖子 xzc8825745 »

我想说的是,你的ping命令ip地址打错了,有线应该ping192.168.4.1,无线ping 192.168.23.1
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 难道真的不能上网了吗?麻烦大神们看看

#4

帖子 poloshiao »

把下述指令複製到終端執行
1. ping -c 3 127.0.0.1
2. ping -c 3 192.168.4.64
3. ping -c 3 192.168.23.143
4. ping -c 3 192.157.242.155
5. ping -c 3 forum.ubuntu.org.cn
6. sudo route -nv
把結果直接複製貼上來
断狱丹阳
帖子: 3
注册时间: 2014-10-18 23:05

Re:这是那几个ping -c 3 的结果

#5

帖子 断狱丹阳 »

lkyong@lkyong:~$ ping -c 3 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_seq=1 ttl=64 time=0.027 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.040 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.036 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.027/0.034/0.040/0.007 ms


lkyong@lkyong:~$ ping -c 3 192.168.4.64
PING 192.168.4.64 (192.168.4.64) 56(84) bytes of data.

--- 192.168.4.64 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms


lkyong@lkyong:~$ ping -c 3 192.168.23.143
PING 192.168.23.143 (192.168.23.143) 56(84) bytes of data.

--- 192.168.23.143 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms


lkyong@lkyong:~$ ping -c 3 192.157.242.155
PING 192.157.242.155 (192.157.242.155) 56(84) bytes of data.
64 bytes from 192.157.242.155: icmp_seq=1 ttl=49 time=181 ms
64 bytes from 192.157.242.155: icmp_seq=2 ttl=49 time=180 ms
64 bytes from 192.157.242.155: icmp_seq=3 ttl=49 time=181 ms

--- 192.157.242.155 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 180.184/181.169/181.779/0.858 ms


lkyong@lkyong:~$ ping -c 3 forum.ubuntu.org.cn
PING forum.ubuntu.org.cn (198.71.86.201) 56(84) bytes of data.
64 bytes from 198.71.86.201: icmp_seq=1 ttl=49 time=183 ms
64 bytes from 198.71.86.201: icmp_seq=2 ttl=49 time=196 ms
64 bytes from 198.71.86.201: icmp_seq=3 ttl=49 time=184 ms

--- forum.ubuntu.org.cn ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 11196ms
rtt min/avg/max/mdev = 183.902/188.259/196.831/6.061 ms



lkyong@lkyong:~$ sudo route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.22.1 0.0.0.0 UG 0 0 0 wlan0
192.168.22.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 难道真的不能上网了吗?麻烦大神们看看

#6

帖子 poloshiao »

ifconfig
inet addr:192.168.4.64 Bcast:192.168.4.255 Mask:255.255.255.0
inet addr:192.168.23.143 Bcast:192.168.23.255 Mask:255.255.255.0
ping -c 3 192.168.4.64
PING 192.168.4.64 (192.168.4.64) 56(84) bytes of data.
--- 192.168.4.64 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
ping -c 3 192.168.23.143
PING 192.168.23.143 (192.168.23.143) 56(84) bytes of data.
--- 192.168.23.143 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
sudo route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.22.1 0.0.0.0 UG 0 0 0 wlan0
192.168.22.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
為何你的 Gateway 是 192.168.22.1 ?
而不是
192.168.4.1
192.168.23.1
断狱丹阳
帖子: 3
注册时间: 2014-10-18 23:05

Re: 难道真的不能上网了吗?麻烦大神们看看

#7

帖子 断狱丹阳 »

poloshiao 写了:
ifconfig
inet addr:192.168.4.64 Bcast:192.168.4.255 Mask:255.255.255.0
inet addr:192.168.23.143 Bcast:192.168.23.255 Mask:255.255.255.0
ping -c 3 192.168.4.64
PING 192.168.4.64 (192.168.4.64) 56(84) bytes of data.
--- 192.168.4.64 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
ping -c 3 192.168.23.143
PING 192.168.23.143 (192.168.23.143) 56(84) bytes of data.
--- 192.168.23.143 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
sudo route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.22.1 0.0.0.0 UG 0 0 0 wlan0
192.168.22.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
為何你的 Gateway 是 192.168.22.1 ?
而不是
192.168.4.1
192.168.23.1

这样子,我真不知道了,有解决办法么?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 难道真的不能上网了吗?麻烦大神们看看

#8

帖子 poloshiao »

我真不知道了
檢查
eth0
wlan0
wlan1
的連線設定
回复