已解决 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

已解决 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#1

帖子 Leo_jun » 2015-09-06 20:55

已解决 15.04,有线可以上网, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普
上次由 Leo_jun 在 2015-09-10 21:15,总共编辑 2 次。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#2

帖子 vickycq » 2015-09-06 21:53

连接wifi

代码: 全选

lshw -C network
sudo ifconfig -a
sudo iwconfig
sudo route -nv
cat /etc/resolv.conf
结果发上来

断开wifi,另外打开一个终端

代码: 全选

sudo tail -f /var/log/syslog
执行一次 连接wifi
等连接完成后,把新产生的输出贴上来

参考:viewtopic.php?t=463441
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#3

帖子 Leo_jun » 2015-09-07 21:25

WARNING: you should run this program as super-user.
*-network
description: Wireless interface
product: AR9485 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlan0
version: 01
serial: 24:fd:52:79:bc:70
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.19.0-26-generic firmware=N/A ip=192.168.31.142 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:18 memory:f7900000-f797ffff memory:f7980000-f798ffff
*-network
description: Ethernet interface
product: QCA8171 Gigabit Ethernet
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:04:00.0
logical name: eth0
version: 10
serial: 74:d0:2b:c4:6b:5a
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=alx ip=192.168.31.154 latency=0 link=no multicast=yes port=twisted pair
resources: irq:34 memory:f7800000-f783ffff ioport:d000(size=128)
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.


juning@linux:/etc$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 74:d0:2b:c4:6b:5a
inet 地址:192.168.31.154 广播:192.168.31.255 掩码:255.255.255.0
inet6 地址: fe80::76d0:2bff:fec4:6b5a/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:432 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:668 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:242948 (242.9 KB) 发送字节:67010 (67.0 KB)
中断:19

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:3196 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:3196 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:268337 (268.3 KB) 发送字节:268337 (268.3 KB)

wlan0 Link encap:以太网 硬件地址 24:fd:52:79:bc:70
inet 地址:192.168.31.142 广播:192.168.31.255 掩码:255.255.255.0
inet6 地址: fe80::26fd:52ff:fe79:bc70/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:682 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:200 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:147002 (147.0 KB) 发送字节:28389 (28.3 KB)

juning@linux:/etc$

juning@linux:/etc$ sudo iwconfig
eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"qizongzui"
Mode:Managed Frequency:2.427 GHz Access Point: 64:09:80:13:3E:C1
Bit Rate=43.3 Mb/s Tx-Power=15 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-36 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:55 Missed beacon:0

lo no wireless extensions.

juning@linux:/etc$


juning@linux:~$ sudo route -nv
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 192.168.31.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 192.168.31.1 0.0.0.0 UG 1024 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
192.168.31.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.31.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
juning@linux:~$

juning@linux:~$ 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 192.168.31.1
nameserver 127.0.1.1
juning@linux:~$
vickycq 写了:连接wifi

代码: 全选

lshw -C network
sudo ifconfig -a
sudo iwconfig
sudo route -nv
cat /etc/resolv.conf
结果发上来

断开wifi,另外打开一个终端

代码: 全选

sudo tail -f /var/log/syslog
执行一次 连接wifi
等连接完成后,把新产生的输出贴上来

参考:viewtopic.php?t=463441
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#4

帖子 vickycq » 2015-09-08 9:53

0. 折腾无线网时,把有线网断掉。

1. 看你获取的ip地址是 192.168.31.142 ,你连接的不是自家的路由器,而是 办公室 / 学校 / 其它公共场所 的热点。是么? 手机做一个热点能否连接上网?

2. 断开wifi,另外打开一个终端

代码: 全选

sudo tail -f /var/log/syslog
执行一次 连接wifi
等连接完成后,把新产生的输出贴上来

3.

代码: 全选

nmcli dev show wlan0
ping -c 5 192.168.31.1
ping -c 5 114.114.114.114
ping -c 5 mirrors.163.com
结果贴上来

4. https://help.ubuntu.com/community/WifiD ... Pv6_Issues
如果用不到ipv6,尝试禁用ipv6

@poloshiao @taohunter
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#5

帖子 Leo_jun » 2015-09-08 22:28

vickycq 写了:0. 折腾无线网时,把有线网断掉。

1. 看你获取的ip地址是 192.168.31.142 ,你连接的不是自家的路由器,而是 办公室 / 学校 / 其它公共场所 的热点。是么? 手机做一个热点能否连接上网?

2. 断开wifi,另外打开一个终端

代码: 全选

sudo tail -f /var/log/syslog
执行一次 连接wifi
等连接完成后,把新产生的输出贴上来

3.

代码: 全选

nmcli dev show wlan0
ping -c 5 192.168.31.1
ping -c 5 114.114.114.114
ping -c 5 mirrors.163.com
结果贴上来

4. https://help.ubuntu.com/community/WifiD ... Pv6_Issues
如果用不到ipv6,尝试禁用ipv6

@poloshiao @taohunter
juning@linux:~$ ifconfig
eth0 Link encap:以太网 硬件地址 74:d0:2b:c4:6b:5a
inet 地址:192.168.31.154 广播:192.168.31.255 掩码:255.255.255.0
inet6 地址: fe80::76d0:2bff:fec4:6b5a/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:539 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:340 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:139857 (139.8 KB) 发送字节:32123 (32.1 KB)
中断:19

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:472 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:472 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:41404 (41.4 KB) 发送字节:41404 (41.4 KB)

wlan0 Link encap:以太网 硬件地址 24:fd:52:79:bc:70
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:2881 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:66 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:1200102 (1.2 MB) 发送字节:11204 (11.2 KB)

juning@linux:~$




juning@linux:~$ sudo tail -f /var/log/syslog
[sudo] password for juning:
Sep 8 22:23:20 linux systemd[1]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda2 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda5
Sep 8 22:23:20 linux systemd[1]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda2 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda7
Sep 8 22:23:20 linux systemd[1141]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda4 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda7
Sep 8 22:23:20 linux systemd[1141]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda4 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda6
Sep 8 22:23:20 linux systemd[1]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda2 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda6
Sep 8 22:23:20 linux systemd[1141]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda4 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda8
Sep 8 22:23:20 linux systemd[1]: Device dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda2 and /sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sda/sda8
Sep 8 22:23:21 linux whoopsie[813]: [22:23:21] Cannot reach: https://daisy.ubuntu.com
Sep 8 22:23:23 linux org.gnome.zeitgeist.SimpleIndexer[1254]: ** (zeitgeist-fts:2074): WARNING **: Unable to get info on application://nautilus-autostart.desktop
Sep 8 22:23:41 linux whoopsie[813]: [22:23:41] Cannot reach: https://daisy.ubuntu.com
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) starting connection 'qizongzui'
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0/wireless): access point 'qizongzui' has security, but secrets are required.
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): device state change: need-auth -> prepare (reason 'none') [60 40 0]
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0/wireless): connection 'qizongzui' has security, and secrets exist. No new secrets needed.
Sep 8 22:24:52 linux NetworkManager[817]: <info> Config: added 'ssid' value 'qizongzui'
Sep 8 22:24:52 linux NetworkManager[817]: <info> Config: added 'scan_ssid' value '1'
Sep 8 22:24:52 linux NetworkManager[817]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Sep 8 22:24:52 linux NetworkManager[817]: <info> Config: added 'psk' value '<omitted>'
Sep 8 22:24:52 linux NetworkManager[817]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Sep 8 22:24:52 linux NetworkManager[817]: <info> Config: set interface ap_scan to 1
Sep 8 22:24:52 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: disconnected -> scanning
Sep 8 22:24:52 linux wpa_supplicant[900]: message repeated 5 times: [ wlan0: CTRL-EVENT-SCAN-STARTED]
Sep 8 22:24:53 linux wpa_supplicant[900]: wlan0: SME: Trying to authenticate with 64:09:80:13:3e:c1 (SSID='qizongzui' freq=2427 MHz)
Sep 8 22:24:53 linux kernel: [ 1819.343774] wlan0: authenticate with 64:09:80:13:3e:c1
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: scanning -> authenticating
Sep 8 22:24:53 linux kernel: [ 1819.365182] wlan0: send auth to 64:09:80:13:3e:c1 (try 1/3)
Sep 8 22:24:53 linux wpa_supplicant[900]: wlan0: Trying to associate with 64:09:80:13:3e:c1 (SSID='qizongzui' freq=2427 MHz)
Sep 8 22:24:53 linux kernel: [ 1819.367159] wlan0: authenticated
Sep 8 22:24:53 linux kernel: [ 1819.370634] wlan0: associate with 64:09:80:13:3e:c1 (try 1/3)
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: authenticating -> associating
Sep 8 22:24:53 linux wpa_supplicant[900]: wlan0: Associated with 64:09:80:13:3e:c1
Sep 8 22:24:53 linux kernel: [ 1819.374938] wlan0: RX AssocResp from 64:09:80:13:3e:c1 (capab=0xc11 status=0 aid=5)
Sep 8 22:24:53 linux kernel: [ 1819.375091] wlan0: associated
Sep 8 22:24:53 linux kernel: [ 1819.375263] cfg80211: Calling CRDA for country: CN
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: associating -> associated
Sep 8 22:24:53 linux kernel: [ 1819.411223] ath: EEPROM regdomain: 0x809c
Sep 8 22:24:53 linux kernel: [ 1819.411226] ath: EEPROM indicates we should expect a country code
Sep 8 22:24:53 linux kernel: [ 1819.411227] ath: doing EEPROM country->regdmn map search
Sep 8 22:24:53 linux kernel: [ 1819.411228] ath: country maps to regdmn code: 0x52
Sep 8 22:24:53 linux kernel: [ 1819.411229] ath: Country alpha2 being used: CN
Sep 8 22:24:53 linux kernel: [ 1819.411230] ath: Regpair used: 0x52
Sep 8 22:24:53 linux kernel: [ 1819.411231] ath: regdomain 0x809c dynamically updated by country IE
Sep 8 22:24:53 linux kernel: [ 1819.411252] cfg80211: Regulatory domain changed to country: CN
Sep 8 22:24:53 linux kernel: [ 1819.411253] cfg80211: DFS Master region: FCC
Sep 8 22:24:53 linux kernel: [ 1819.411254] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Sep 8 22:24:53 linux kernel: [ 1819.411256] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Sep 8 22:24:53 linux kernel: [ 1819.411258] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (N/A)
Sep 8 22:24:53 linux kernel: [ 1819.411260] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
Sep 8 22:24:53 linux kernel: [ 1819.411261] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
Sep 8 22:24:53 linux kernel: [ 1819.411262] cfg80211: (57240000 KHz - 59400000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
Sep 8 22:24:53 linux kernel: [ 1819.411263] cfg80211: (59400000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4400 mBm), (N/A)
Sep 8 22:24:53 linux kernel: [ 1819.411264] cfg80211: (63720000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: associated -> 4-way handshake
Sep 8 22:24:53 linux wpa_supplicant[900]: wlan0: WPA: Key negotiation completed with 64:09:80:13:3e:c1 [PTK=CCMP GTK=TKIP]
Sep 8 22:24:53 linux wpa_supplicant[900]: wlan0: CTRL-EVENT-CONNECTED - Connection to 64:09:80:13:3e:c1 completed [id=0 id_str=]
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful. Connected to wireless network 'qizongzui'.
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0]
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds)
Sep 8 22:24:53 linux NetworkManager[817]: <info> dhclient started with pid 9118
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): DHCPv4 state changed nbi -> preinit
Sep 8 22:24:53 linux dhclient: DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x3262963f)
Sep 8 22:24:53 linux dhclient: DHCPACK of 192.168.31.142 from 192.168.31.1
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): DHCPv4 state changed preinit -> reboot
Sep 8 22:24:53 linux NetworkManager[817]: <info> address 192.168.31.142
Sep 8 22:24:53 linux NetworkManager[817]: <info> plen 24 (255.255.255.0)
Sep 8 22:24:53 linux NetworkManager[817]: <info> gateway 192.168.31.1
Sep 8 22:24:53 linux NetworkManager[817]: <info> server identifier 192.168.31.1
Sep 8 22:24:53 linux NetworkManager[817]: <info> lease time 43200
Sep 8 22:24:53 linux NetworkManager[817]: <info> hostname 'MiWiFi-R1CM'
Sep 8 22:24:53 linux NetworkManager[817]: <info> nameserver '192.168.31.1'
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) started...
Sep 8 22:24:53 linux avahi-daemon[798]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.31.142.
Sep 8 22:24:53 linux avahi-daemon[798]: New relevant interface wlan0.IPv4 for mDNS.
Sep 8 22:24:53 linux avahi-daemon[798]: Registering new address record for 192.168.31.142 on wlan0.IPv4.
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) complete.
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Sep 8 22:24:53 linux NetworkManager[817]: <info> (wlan0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Sep 8 22:24:53 linux dhclient: bound to 192.168.31.142 -- renewal in 18374 seconds.
Sep 8 22:24:53 linux NetworkManager[817]: <info> Policy set 'qizongzui' (wlan0) as default for IPv4 routing and DNS.
Sep 8 22:24:53 linux NetworkManager[817]: <info> Writing DNS information to /sbin/resolvconf
Sep 8 22:24:53 linux dnsmasq[1624]: setting upstream servers from DBus
Sep 8 22:24:53 linux dnsmasq[1624]: using nameserver 192.168.31.1#53
Sep 8 22:24:53 linux NetworkManager[817]: <info> Activation (wlan0) successful, device activated.
Sep 8 22:24:53 linux dbus[827]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Sep 8 22:24:53 linux systemd[1]: Starting Network Manager Script Dispatcher Service...
Sep 8 22:24:53 linux dbus[827]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Sep 8 22:24:53 linux systemd[1]: Started Network Manager Script Dispatcher Service.
Sep 8 22:24:53 linux nm-dispatcher: Dispatching action 'up' for wlan0
Sep 8 22:24:54 linux avahi-daemon[798]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::26fd:52ff:fe79:bc70.
Sep 8 22:24:54 linux avahi-daemon[798]: New relevant interface wlan0.IPv6 for mDNS.
Sep 8 22:24:54 linux avahi-daemon[798]: Registering new address record for fe80::26fd:52ff:fe79:bc70 on wlan0.*.
Sep 8 22:24:54 linux avahi-daemon[798]: Invalid response packet from host fe80::1922:3a67:3343:905a.



juning@linux:~$ nmcli dev show wlan0
GENERAL.设备: wlan0
GENERAL.类型: wifi
GENERAL.HWADDR: 24:FD:52:79:BC:70
GENERAL.MTU: 1500
GENERAL.状态: 100 (已连接)
GENERAL.CONNECTION: qizongzui
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
IP4.ADDRESS[1]: ip = 192.168.31.142/24, gw = 192.168.31.1
IP4.DNS[1]: 192.168.31.1
IP6.ADDRESS[1]: ip = fe80::26fd:52ff:fe79:bc70/64, gw = ::
juning@linux:~$

juning@linux:~$ nmcli dev show wlan0
GENERAL.设备: wlan0
GENERAL.类型: wifi
GENERAL.HWADDR: 24:FD:52:79:BC:70
GENERAL.MTU: 1500
GENERAL.状态: 100 (已连接)
GENERAL.CONNECTION: qizongzui
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
IP4.ADDRESS[1]: ip = 192.168.31.142/24, gw = 192.168.31.1
IP4.DNS[1]: 192.168.31.1
IP6.ADDRESS[1]: ip = fe80::26fd:52ff:fe79:bc70/64, gw = ::
juning@linux:~$
juning@linux:~$
juning@linux:~$
juning@linux:~$
juning@linux:~$ ping -c 5 192.168.31.1
PING 192.168.31.1 (192.168.31.1) 56(84) bytes of data.
From 192.168.31.154 icmp_seq=1 Destination Host Unreachable
From 192.168.31.154 icmp_seq=2 Destination Host Unreachable
From 192.168.31.154 icmp_seq=3 Destination Host Unreachable
From 192.168.31.154 icmp_seq=4 Destination Host Unreachable
From 192.168.31.154 icmp_seq=5 Destination Host Unreachable

--- 192.168.31.1 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4024ms
pipe 3
juning@linux:~$
juning@linux:~$ ping -c 5 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
From 192.168.31.154 icmp_seq=1 Destination Host Unreachable
From 192.168.31.154 icmp_seq=2 Destination Host Unreachable
From 192.168.31.154 icmp_seq=3 Destination Host Unreachable
From 192.168.31.154 icmp_seq=4 Destination Host Unreachable
From 192.168.31.154 icmp_seq=5 Destination Host Unreachable

--- 114.114.114.114 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4024ms
pipe 3
juning@linux:~$
juning@linux:~$ ping -c 5 mirrors.163.com
ping: unknown host mirrors.163.com
juning@linux:~$
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#6

帖子 Leo_jun » 2015-09-08 22:38

用的联通的宽带, 小米路由啊, 这是合租的弄得
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#7

帖子 vickycq » 2015-09-08 23:37

小米路由啊, 这是合租的弄得

代码: 全选

Sep 8 22:24:53 linux dhclient: DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x3262963f)
Sep 8 22:24:53 linux dhclient: DHCPACK of 192.168.31.142 from 192.168.31.1
你这个log,DHCPREQUEST 一行很奇怪。合租按理说没几个人,怎么会分配这样一个ip? 而且刚开始DHCPREQUEST,还没收到DHCPOFFER,就已经自作主张定了192.168.31.142 这个ip。

给你看一个正常DHCP方式连接的log:

代码: 全选

Sep 08 23:19:15 localhost dhclient[1768]: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Sep 08 23:19:16 localhost dhclient[1768]: DHCPACK from 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    address 192.168.1.106
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    plen 24 (255.255.255.0)
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    gateway 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    server identifier 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    lease time 172800
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    nameserver '192.168.1.1'
尝试:

1. 检查一下 系统托盘网络图标 - ‘编辑连接’ 中 ‘ipv4’ 选项卡,是否设置为DHCP,有无填写ip。拿手机连接合租的wifi,看获取的ip是什么?

2. 可能是 dhclient 配置问题。有没有动过 /etc/dhcp/dhclient.conf ?
把 /etc/dhcp/dhclient.conf 的内容贴到 http://paste.ubuntu.com/ ,把地址(http://paste.ubuntu.com/xxxxxxxxx/)贴上来

2-1. 尝试:
断开wlan0的连接

代码: 全选

sudo dhclient -v wlan0
把结果全部复制,贴上来。

参考:http://unix.stackexchange.com/questions ... ome-router
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#8

帖子 Leo_jun » 2015-09-09 23:37

vickycq 写了:
小米路由啊, 这是合租的弄得

代码: 全选

Sep 8 22:24:53 linux dhclient: DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x3262963f)
Sep 8 22:24:53 linux dhclient: DHCPACK of 192.168.31.142 from 192.168.31.1
你这个log,DHCPREQUEST 一行很奇怪。合租按理说没几个人,怎么会分配这样一个ip? 而且刚开始DHCPREQUEST,还没收到DHCPOFFER,就已经自作主张定了192.168.31.142 这个ip。

给你看一个正常DHCP方式连接的log:

代码: 全选

Sep 08 23:19:15 localhost dhclient[1768]: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Sep 08 23:19:16 localhost dhclient[1768]: DHCPACK from 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    address 192.168.1.106
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    plen 24 (255.255.255.0)
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    gateway 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    server identifier 192.168.1.1
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    lease time 172800
Sep 08 23:19:16 localhost NetworkManager[601]: <info>    nameserver '192.168.1.1'
尝试:

1. 检查一下 系统托盘网络图标 - ‘编辑连接’ 中 ‘ipv4’ 选项卡,是否设置为DHCP,有无填写ip。拿手机连接合租的wifi,看获取的ip是什么?

2. 可能是 dhclient 配置问题。有没有动过 /etc/dhcp/dhclient.conf ?
把 /etc/dhcp/dhclient.conf 的内容贴到 http://paste.ubuntu.com/ ,把地址(http://paste.ubuntu.com/xxxxxxxxx/)贴上来

2-1. 尝试:
断开wlan0的连接

代码: 全选

sudo dhclient -v wlan0
把结果全部复制,贴上来。

参考:http://unix.stackexchange.com/questions ... ome-router
[sudo] password for juning:
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/24:fd:52:79:bc:70
Sending on LPF/wlan0/24:fd:52:79:bc:70
Sending on Socket/fallback
DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x4c4655e6)
DHCPACK of 192.168.31.142 from 192.168.31.1
RTNETLINK answers: File exists
bound to 192.168.31.142 -- renewal in 19277 seconds.
juning@linux:~$
是设置的dhcp, 没有设置IP
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#9

帖子 Leo_jun » 2015-09-09 23:42

没有动过/etc/dhcp/dhclient.conf
dhclient.conf 内容如下:
http://paste.ubuntu.com/12321542/
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#10

帖子 Leo_jun » 2015-09-09 23:58

手机的IP 是192.168.31.31
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#11

帖子 Leo_jun » 2015-09-10 0:03

00:02@linux:/etc/network$ sudo cat interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#add by tangyj 20150905
#auto eth0
#iface eth0 inet dhcp
00:03@linux:/etc/network$
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#12

帖子 Leo_jun » 2015-09-10 0:05

Leo_jun 写了:00:02@linux:/etc/network$ sudo cat interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#add by tangyj 20150905
#auto eth0
#iface eth0 inet dhcp
00:03@linux:/etc/network$
我之前添加了 auto eth0 这块 , 大神auto etho 这块是什么意思,起了什么作用, wlan0 需不需要在这设置啊 ???
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#13

帖子 Leo_jun » 2015-09-10 0:11

我修改了下 /etc/networ/ interfaces, 注释 了auto eth0 后居然wlan 可上网了 :em05
Leo_jun
帖子: 15
注册时间: 2015-09-06 19:59
系统: ubuntu

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#14

帖子 Leo_jun » 2015-09-10 0:11

00:08 @linux:~$ sudo dhclient -v wlan0
[sudo] password for juning:
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/24:fd:52:79:bc:70
Sending on LPF/wlan0/24:fd:52:79:bc:70
Sending on Socket/fallback
DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x4393537c)
DHCPACK of 192.168.31.142 from 192.168.31.1
RTNETLINK answers: File exists
bound to 192.168.31.142 -- renewal in 20812 seconds.
00:08 @linux:~$
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 15.04, wifi 能连上, 但是上不了网,ping 不同百度,求大神科普

#15

帖子 vickycq » 2015-09-10 0:16

Leo_jun 写了: DHCPREQUEST of 192.168.31.142 on wlan0 to 255.255.255.255 port 67 (xid=0x4c4655e6)
DHCPACK of 192.168.31.142 from 192.168.31.1
是设置的dhcp, 没有设置IP


编辑 /etc/dhcp/dhclient.conf ,把

代码: 全选

#require subnet-mask, domain-name-servers;
一行前面的 # 去掉,再断开wlan0的连接并 sudo dhclient -v wlan0[/o][/s][/u]
上次由 vickycq 在 2015-09-10 0:21,总共编辑 3 次。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
回复