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/WifiDocs/WirelessTroubleShootingGuide/Connections#IPv6_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.comSep 8 22:23:23 linux org.gnome.zeitgeist.SimpleIndexer[1254]: ** (zeitgeist-fts:2074): WARNING **: Unable to get info on
application://nautilus-autostart.desktopSep 8 22:23:41 linux whoopsie[813]: [22:23:41] Cannot reach:
https://daisy.ubuntu.comSep 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:~$