有线网络断开后,无线网络也跟着断开是怎么回事?

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
永恒不永恒
帖子: 124
注册时间: 2007-03-17 18:57
来自: 广东广州

有线网络断开后,无线网络也跟着断开是怎么回事?

#1

帖子 永恒不永恒 »

我的无线网卡的型号是LINKSYS WPC54GX4,使用的是ubuntu server 11.10,没有安装桌面,纯命令行操作。
由于这个型号的无线网卡没有linux下的原生驱动,就通过ndiswrapper来挂载windows驱动。在根据网上众多的ndiswrapper教程,辛苦了一个通宵,终于安装好了,但是在使用wpa_supplicant的时候,却总是发现无法连接上wpa加密的路由,请问应该怎样呢?


下面是我的配置文件与一些相关的配置信息:

代码: 全选

gzxzw@HP510:~$ cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
#iface eth1 inet dhcp
iface eth1 inet static
address 192.168.0.51
netmask 255.255.255.0
gateway 192.168.0.1

auto wlan0
iface wlan0 inet static
address 192.168.0.52
netmask 255.255.255.0
gateway 192.168.0.1

代码: 全选

gzxzw@HP510:~$ ifconfig
eth1      Link encap:Ethernet  HWaddr 00:00:00:00:d7:78  
          inet addr:192.168.0.51  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:d778/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:90 errors:0 dropped:0 overruns:0 frame:0
          TX packets:169 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:11993 (11.9 KB)  TX bytes:27470 (27.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:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:16:b6:62:85:80  
          inet addr:192.168.0.52  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:10 Memory:34000000-34080000 

代码: 全选

gzxzw@HP510:~$ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:off/any  
          Mode:Managed  Channel:0  Access Point: Not-Associated   
          Bit Rate:240 Mb/s   
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
下面是ndiswrapper的相关信息:

代码: 全选

gzxzw@HP510:~$ ndiswrapper -v
utils version: '1.9', utils version needed by module: '1.9'
module details:
filename:       /lib/modules/3.0.0-12-generic-pae/kernel/ubuntu/ndiswrapper/ndiswrapper.ko
version:        1.56
vermagic:       3.0.0-12-generic-pae SMP mod_unload modversions 686 

代码: 全选

gzxzw@HP510:~$ ndiswrapper -l
tmimo3p : driver installed
	device (17CB:0002) present

代码: 全选

gzxzw@HP510:~$ cat /etc/wpa_supplicant.conf
network={
        ssid="Tenda"
	proto=RSN
	key_mgmt=WPA-PSK    #WPA2/WPA共用WPA-PSK
	pairwise=CCMP TKIP  #wpa_supplicant尚未支持AES
	group=CCMP TKIP
        #psk="secretpassphrase"
        psk=7b271c9a7c8a6ac07d12403a1f0792d7d92b5957ff8dfd56481ced43ec6a6515        
}
使用iwlist和iwconfig已经能看到相关的驱动信息:

代码: 全选

gzxzw@HP510:~$ iwlist scanning
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

eth1      Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: C8:3A:35:4A:89:D0
                    ESSID:"Tenda"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.427 GHz (Channel 4)
                    Quality:53/100  Signal level:-62 dBm  Noise level:-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
当我要连接的时候是这样的:

代码: 全选

gzxzw@HP510:~$ wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
[sudo] password for gzxzw: 
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Trying to associate with c8:3a:35:4a:89:d0 (SSID='Tenda' freq=2427 MHz)
Association request to the driver failed
Associated with c8:3a:35:4a:89:d0
Associated with c8:3a:35:4a:89:d0
WPA: Key negotiation completed with c8:3a:35:4a:89:d0 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to c8:3a:35:4a:89:d0 completed (auth) [id=0 id_str=]
Associated with c8:3a:35:4a:89:d0
WPA: Key negotiation completed with c8:3a:35:4a:89:d0 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to c8:3a:35:4a:89:d0 completed (reauth) [id=0 id_str=]

代码: 全选

sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -d
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Priority group 0
   id=0 ssid='Tenda'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf flags 0x0
netlink: Operstate: linkmode=1, operstate=5
Own MAC address: 00:16:b6:62:85:80
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_countermeasures
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): 72 32 c6 2e 20 49 58 47 94 b1 9f ab 05 af 75 d1
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b1a len=40
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 5 seconds
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
Scan timeout - try to get results
Received 514 bytes of scan results (2 BSSes)
BSS: Start scan result update 1
BSS: Add new id 0 BSSID c8:3a:35:4a:89:d0 SSID 'Tenda'
BSS: Add new id 1 BSSID 1c:1d:67:82:41:74 SSID 'CU_yHNR'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: c8:3a:35:4a:89:d0 ssid='Tenda' wpa_ie_len=26 rsn_ie_len=24 caps=0x11
   selected based on RSN IE
   selected WPA AP c8:3a:35:4a:89:d0 ssid='Tenda'
Trying to associate with c8:3a:35:4a:89:d0 (SSID='Tenda' freq=2427 MHz)
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2 proto 2
WPA: set AP WPA IE - hexdump(len=28): dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 02 00 50 f2 04 01 00 00 50 f2 02
WPA: set AP RSN IE - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK TKIP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_psk
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b1a len=13
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8c07 len=32
AssocReq IE wireless event - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8c08 len=34
AssocResp IE wireless event - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: c8:3a:35:4a:89:d0
Association info event
req_ies - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
resp_ies - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: set own WPA/RSN IE - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
RSN: PMKID from assoc IE not found from PMKSA cache
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
State: ASSOCIATING -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=c8:3a:35:4a:89:d0
No keys have been configured - skip key clearing
Associated with c8:3a:35:4a:89:d0
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8c07 len=32
AssocReq IE wireless event - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8c08 len=34
AssocResp IE wireless event - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: c8:3a:35:4a:89:d0
Association info event
req_ies - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
resp_ies - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 02 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: set own WPA/RSN IE - hexdump(len=24): 30 16 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 00 00
RSN: PMKID from assoc IE not found from PMKSA cache
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
上次由 永恒不永恒 在 2012-02-24 11:31,总共编辑 1 次。
我用ubuntu 6.06,gnome桌面~
结果装个qBittorrent搞不定,
然后就换到ubuntu 7.04了..同样是gnome桌面~
定制才是王道!
永恒不永恒
帖子: 124
注册时间: 2007-03-17 18:57
来自: 广东广州

Re: 无线网卡总是无法连接上wpa2加密的路由

#2

帖子 永恒不永恒 »

当我使用命令“sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -d”的时候,然后另外putty一个窗口看,就可以看到这样的结果:

代码: 全选

gzxzw@HP510:~$ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:"Tenda"
          Mode:Managed  Frequency:2.427 GHz  Access Point: C8:3A:35:4A:89:D0
          Bit Rate=54 Mb/s
          Power Management:off
          Link Quality:23/100  Signal level:-81 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
这个时候,我是同时使用有线网络和无线网络的连接到同一台路由上的。上述的所有命令都是通过putty和有线网络在另外一台机器上远程实现的。在另外一台机器上,ping无线网卡的ip是正常的。

代码: 全选

C:\>ping 192.168.0.52

Pinging 192.168.0.52 with 32 bytes of data:

Reply from 192.168.0.52: bytes=32 time=6ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64

Ping statistics for 192.168.0.52:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 6ms, Average = 3ms
如果我在这个时候扒开有线网络的网线,那么无线网络也会断掉,不知道是怎么回事。

代码: 全选

C:\>ping 192.168.0.52 -t

Pinging 192.168.0.52 with 32 bytes of data:

Reply from 192.168.0.52: bytes=32 time=6ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64
Reply from 192.168.0.52: bytes=32 time=3ms TTL=64
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
我这样的操作,无线网卡到底连上了路由没有啊,按照“ iwconfig wlan0”命令返回的结果,应该是连上了无线路由的啊,在路由的管理界面也可以看到这个无线网卡的地址了。但是为什么一拔开有线网卡的网线,无线网络就会断掉呢?
我用ubuntu 6.06,gnome桌面~
结果装个qBittorrent搞不定,
然后就换到ubuntu 7.04了..同样是gnome桌面~
定制才是王道!
回复