나는 며칠 동안 WPA 신청자들을 만지작거렸고 마침내 Google에서 새로운 단서를 찾을 수 없는 지점에 이르렀습니다. 그래서 질문은: 방금 debian wheezy를 실행하는 데스크탑 컴퓨터에 새로운 tp-link tl-wn881nd pci-e wifi 카드를 설치했습니다. wlan0
액세스 포인트에 연결되어 있다고 주장하고(정말입니까? 아래 참조) ifconfig
내가 할당한 올바른 고정 IP 주소를 보고하지만 액세스 포인트에 핑을 보낼 수 없고 syslog
핸드셰이크에 오류가 있다고 말합니다.
network-manager
첫째, 상황을 엉망으로 만들 수 있는 내용을 읽었습니다 . 나는 이것이 나에게 문제가 되지 않는다고 확신합니다.
$ which NetworkManager
##### blank #####
$ dpkg -l | grep -i network-manager
rc network-manager 0.9.4.0-10 amd-64 network management framework (daemon and userspace tools)
ii network-manager-openvpn 0.9.4.0-1 amd-64 network management framework (OpenVPN plugin core)
내 컴퓨터 사양은 다음과 같습니다.
$ uname -a
Linux mypc 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
$ sudo dmidecode | grep -iA3 '^system information'
System Information
Manufacturer: Dell Inc.
Product Name: OptiPlex 745
Version: Not Specified
무선 네트워크 카드 사양은 다음과 같습니다.
$ lspci | grep -i wireless
02:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
Wi-Fi 카드가 활성화되어 있는지 확인했습니다.
$ sudo ip link set wlan0 up
$ sudo ip link show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisk mq state DORMANT mode DORMANT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
카드가 내 ssid를 찾을 수 있습니다.
$ sudo iw wlan0 scan
BSS xx:xx:xx:xx:xx:xx (on wlan0) -- associated
TSF: 2639667559 ysec (0d, 00:43:59)
freq:2412
beacon interval: 100
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -56.00 dBm
last seen: 692 ms ago
Information elements from Probe Response frame:
SSID: aphanumeric_with_underscores
Supported rates: 1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0
DS Parameter set: channel 1
ERP: Use_Protection Barker_Preamble_Mode
Extended supported rates: 6.0 12.0 24.0 48.0
HT capabilities:
Capabilities: 0x106e
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT RX MCS rate indexes supported: 0-7, 32
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 1
* secondary channel offset: no secondary
* STA channel width 20MHz
* RIFS: 0
* HT protection: non-HT mixed
* non-GF present: 1
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
RSN:* Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: (0x0000)
WMM:* Parameter version 1
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: CW 3-7, AIFSN 2, TXOP 1504 usec
Extended capabilities: HT Information Exchange Supported
Country: AL Environment: Indoor/Outdoor
Channels [1 - 13] @ 15 dBm
나어딘가에서 읽어보세요wpa_supplicant 옵션을 에 넣을 수 있으므로 /etc/network/interfaces
여기에 내 것이 있습니다.
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# don't use `auto wlan0` since this will infinitely try to connect at
# boot time, and i will have to remove the hard drive, mount it on
# another pc and remove `auto wlan0` from this file just to get a
# command prompt again!
iface wlan0 inet static
wpa-ssid "aphanumeric_with_underscores"
wpa-psk "my wpa2 password"
wpa-ap-scan 1
wpa-proto WPA2
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
현재 파일이 없다는 점에 유의하세요 wpa_supplicant.conf
.
$ ls /etc/wpa_supplicant.conf
ls: cannot access /etc/wpa_supplicant.conf: No such file or directory
$ ls /etc/wpa_supplicant/*
action_wpa.sh functions.sh ifupdown.sh
wlan0
이제 인터페이스를 다시 시작하면 다음과 같습니다 .
$ sudo ifdown wlan0
$ sudo ifup wlan0
IP 주소가 올바르게 할당되었습니다.
$ ifconfig
lo ...
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr 192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::16cc:20ff:feea:4578/64 Scope:Link
UP BROADCAST MULTICAST NTU:1500 Metric:1
RX packets:3075 errors:0 dropped:0 overruns:0 frame:0
TX packets:4028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:347475 (339.3KiB) TX bytes:586219 (572.4KiB)
하지만 문제는 wlan0
인터페이스가 작동하는 것 같지만 인터넷에 액세스할 수 없거나 액세스 포인트에 핑을 보낼 수도 없다는 것입니다.
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.50 icmp_seq=2 Destination Host Unreachable
From 192.168.1.50 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 received, +2 errors, 100% packet loss, time 2015ms
살펴보면 /var/log/syslog
다음과 같은 불쾌한 오류가 표시됩니다.
Mar 18 01:23:11 mypc kernel: [ 148.242137] wlan0: authenticate with xx.xx.xx.xx.xx.xx (try 1)
Mar 18 01:23:11 mypc kernel: [ 148.244009] wlan0: authenticated
Mar 18 01:23:11 mypc kernel: [ 148.265967] wlan0: associate with xx.xx.xx.xx.xx.xx (try 1)
Mar 18 01:23:11 mypc kernel: [ 148.287770] wlan0: RX AssocResp from xx.xx.xx.xx.xx.xx (capab=0x411 status=0 aid=1)
Mar 18 01:23:11 mypc kernel: [ 148.287774] wlan0: associated
Mar 18 01:23:11 mypc kernel: [ 148.287774] wlan0: associated
Mar 18 01:23:11 mypc wpa_supplicant[4473]: wlan0: Associated with xx.xx.xx.xx.xx.xx
Mar 18 01:23:11 mypc kernel: [ 148.297421] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mar 18 01:23:11 mypc kernel: [ 148.297651] cfg80211: Calling CRDA for country AL
Mar 18 01:23:11 mypc kernel: [ 148.303008] cfg80211: Regulatory domain changed to country: AL
Mar 18 01:23:11 mypc kernel: [ 148.303013] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 18 01:23:11 mypc kernel: [ 148.303018] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 18 01:23:11 mypc kernel: [ 148.303022] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 01:23:11 mypc kernel: [ 148.303026] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 01:23:11 mypc kernel: [ 148.303029] cfg80211: (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2700 mBm)
Mar 18 01:23:19 mypc kernel: [ 155.819739] wlan0: deauthenticated from xx:xx:xx:xx:xx:xx (Reason: 15)
Mar 18 01:23:19 mypc wpa_supplicant[4473]: wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
Mar 18 01:23:19 mypc wpa_supplicant[4473]: wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=15
이 문제를 해결하고 액세스 포인트를 핑하는 방법을 아는 사람이 있습니까 wlan0
?
편집 1: 고정 IP 대신 DHCP를 사용해 보세요.
나는 /etc/network/interfaces
이것을 다음과 같이 바꾼다:
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# don't use `auto wlan0` since this will infinitely try to connect at
# boot time, and i will have to remove the hard drive, mount it on
# another pc and remove `auto wlan0` from this file just to get a
# command prompt again!
iface wlan0 inet dhcp
wpa-ssid "aphanumeric_with_underscores"
wpa-psk "my wpa2 password"
wpa-ap-scan 1
wpa-proto WPA2
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
( wpa_supplicant.conf
수정 1에는 여전히 존재하지 않습니다.) 이제 인터페이스를 시작하면 명령줄에 몇 가지 새로운 오류가 발생합니다.
$ sudo ifup wlan0
Operation failed.
Failed to bring up wlan0
시스템 로그에는 이전과 동일한 실패 메시지가 계속해서 표시됩니다.
Mar 18 08:59:01 mypc kernel: [ 2493.163777] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mar 18 08:59:02 mypc wpa_supplicant[6151]: wlan0: SME: Trying to authenticate with xx:xx:xx:xx:xx:xx (SSID='alphanumeric_with_underscores' freq=2412 MHz)
Mar 18 08:59:02 mypc kernel: [ 2493.974111] wlan0: authenticate with xx:xx:xx:xx:xx:xx (try 1)
Mar 18 08:59:02 mypc kernel: [ 2493.976083] wlan0: authenticated
Mar 18 08:59:02 mypc wpa_supplicant[6151]: wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='aphanumeric_with_underscores' freq=2412 MHz)
Mar 18 08:59:02 mypc kernel: [ 2493.998016] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1)
Mar 18 08:59:02 mypc kernel: [ 2494.019518] wlan0: RX ReassocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=2)
Mar 18 08:59:02 mypc kernel: [ 2494.019523] wlan0: associated
Mar 18 08:59:02 mypc wpa_supplicant[6151]: wlan0: Associated with xx:xx:xx:xx:xx:xx
Mar 18 08:59:02 mypc kernel: [ 2494.028721] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mar 18 08:59:02 mypc kernel: [ 2494.028873] cfg80211: Calling CRDA for country: AL
Mar 18 08:59:02 mypc kernel: [ 2494.033830] cfg80211: Regulatory domain changed to country: AL
Mar 18 08:59:02 mypc kernel: [ 2494.033835] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 18 08:59:02 mypc kernel: [ 2494.033839] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:02 mypc kernel: [ 2494.033843] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:02 mypc kernel: [ 2494.033846] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:02 mypc kernel: [ 2494.033849] cfg80211: (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2700 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.499716] wlan0: deauthenticated from xx:xx:xx:xx:xx:xx (Reason: 15)
Mar 18 08:59:09 mypc wpa_supplicant[6151]: wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
Mar 18 08:59:09 mypc wpa_supplicant[6151]: wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=15
Mar 18 08:59:09 mypc kernel: [ 2501.536289] cfg80211: Calling CRDA to update world regulatory domain
Mar 18 08:59:09 mypc kernel: [ 2501.541764] cfg80211: World regulatory domain updated:
Mar 18 08:59:09 mypc kernel: [ 2501.541770] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 18 08:59:09 mypc kernel: [ 2501.541775] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.541779] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.541782] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.541786] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.541790] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 08:59:09 mypc kernel: [ 2501.541794] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
Mar 18 08:59:10 mypc wpa_supplicant[6151]: wlan0: SME: Trying to authenticate with xx:xx:xx:xx:xx:xx (SSID='aphanumeric_with_underscores' freq=2412 MHz)
Mar 18 08:59:10 mypc kernel: [ 2502.434112] wlan0: authenticate with xx:xx:xx:xx:xx:xx (try 1)
Mar 18 08:59:10 mypc kernel: [ 2502.436071] wlan0: authenticated
etc
eth0은 dhcp와 잘 작동하므로 dhcp 자체에는 문제가 없습니다.
편집 2: wpa_passphrase에서 psk 해시를 사용해 보세요.
$ wpa_passphrase myssid mypassword
network={
ssid="myssid"
#psk="mypassword"
psk=xxxxxxxxxxxx...
}
이 새로운 psk를 다음에서 사용하세요 /etc/network/interfaces
:
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# don't use `auto wlan0` since this will infinitely try to connect at
# boot time, and i will have to remove the hard drive, mount it on
# another pc and remove `auto wlan0` from this file just to get a
# command prompt again!
iface wlan0 inet dhcp
wpa-ssid "aphanumeric_with_underscores"
wpa-psk xxxxxxxxxxxxxxxx
wpa-ap-scan 1
wpa-proto WPA2
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
다시 시도하십시오:
$ sudo iplink set wlan0 down
$ sudo iplink set wlan0 up
$ sudo ifup wlan0
cat: /var/run/wpa_supplicant.wlan0.pid: No such file or directory
Operation failed.
Failed to bring up wlan0.
글쎄요, 그건 재미있는 실수였어요. 조사:
$ sudo su
# cd /var/run/wpa_supplicant/
# ls -l
total 0
srwxrwx--- 1 root root 0 Mar 18 09:26 wlan0
# cat wlan0
cat: wlan0: No such device or address
/var/log/syslog
하지만 여전히 같은 오류가 표시됩니다.
수정 3: 매우 기본적인 ssid 및 비밀번호 설정
ssid를 abc
다음과 같이 설정했습니다 abcdefgh
.
$ wpa_passphrase abc abcdefgh
network={
ssid="abc"
#psk="abcdefgh"
psk=ba89407e92b8efec11c227e3cce9f25c8dcc4b3651fe2be02d91d9ebda96e913
}
그런데 어떤 사전 공유 키를 입력해도 결과는 수정 1, 수정 2와 같습니다./etc/network/interfaces
$ sudo ip link set wlan0 down
$ sudo ip link set wlan0 up
$ sudo ip link show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DORMANT mode DEFAULT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
$ sudo ifdown wlan0
ifdown: interface wlan0 not configured
$ sudo rm /var/run/wpa_supplicant/wlan0
$ sudo ifup wlan0
wpa_supplicant: ctrl_interface socket not found at /var/run/wpa_supplicant/wlan0
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Operation failed.
Failed to bring up wlan0.
수정 사항 4: 명령줄 디버그 모드에서 wpa_supplicant 사용
다음에서 모든 WPA 설정을 제거합니다 /etc/network/interfaces
.
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface wlan0 inet dhcp
이제 wpa_supplicant.conf
파일을 만듭니다.
$ sudo sh -c 'wpa_passphrase abc abcdefgh > /etc/wpa_supplicant/wpa_supplicant.conf'
다음 정보를 포함하도록 파일을 편집합니다.
ap_scan=1
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
proto=WPA2
pairwise=CCMP
group=CCMP
key_mgmt=WPA-PSK
ssid="abc"
#psk="abcdefgh"
psk=ba89407e92b8efec11c227e3cce9f25c8dcc4b3651fe2be02d91d9ebda96e913
}
직접 실행 wpa_supplicant
:
$ sudo ip link show wlan0
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
$ sudo ip link set wlan0 up
$ sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='abc' freq=2412 MHz)
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='abc' freq=2412 MHz)
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWSCAN]: Device or resource busy
wlan0: Failed to initiate AP scan
wlan0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='abc' freq=2412 MHz)
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
^Cwlan0: CTRL-EVENT-TERMINATING - signal 2 received
다시 한 번 좀 더 자세한 디버깅을 해보겠습니다.
$ sudo wpa_supplicant -d -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -f /tmp/wpa_supplicant.tl-wn881nd.errors
출력 보기여기.
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Wi-Fi 카드와 커널이 호환되지 않는 것 같은데요 ?그렇다면 이 문제를 어떻게 진단하고 해결합니까?
답변1
빌어먹을 Wi-Fi 카드가 PCI-Express 슬롯에 올바르게 연결되지 않았습니다! 꺼내서 슬롯에 붙은 먼지를 불어내고 이번에는 세게 밀어 넣었습니다. 이제 모든 것이 잘 작동합니다.
# the wifi led is not lit up on the outside of the pc case
$ sudo ip link show wlan0
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
$ sudo ip link set wlan0 up
# now the wifi led is lit up on the outside of the pc case
$ sudo ip link show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
$ sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with 00:60:64:4c:37:fc (SSID='abc' freq=2412 MHz)
wlan0: Associated with 00:60:64:4c:37:fc
wlan0: WPA: Key negotiation completed with 00:60:64:4c:37:fc [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 00:60:64:4c:37:fc completed (auth) [id=0 id_str=]
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:60:64:4c:37:fc reason=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with 00:60:64:4c:37:fc (SSID='abc' freq=2412 MHz)
wlan0: Associated with 00:60:64:4c:37:fc
wlan0: WPA: Key negotiation completed with 00:60:64:4c:37:fc [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 00:60:64:4c:37:fc completed (reauth) [id=0 id_str=]
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=254 time=0.510 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=254 time=0.578 ms
^C
--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.510/0.544/0.578/0.034 ms
올바른 것은 /var/log/syslog
다음과 같습니다.
Mar 18 13:38:19 mypc kernel: [ 542.538613] wlan0: authenticate with 00:60:64:4c:37:fc (try 1)
Mar 18 13:38:19 mypc kernel: [ 542.540517] wlan0: authenticated
Mar 18 13:38:19 mypc kernel: [ 542.540553] wlan0: associate with 00:60:64:4c:37:fc (try 1)
Mar 18 13:38:19 mypc kernel: [ 542.563331] wlan0: RX AssocResp from 00:60:64:4c:37:fc (capab=0x411 status=0 aid=3)
Mar 18 13:38:19 mypc kernel: [ 542.563336] wlan0: associated
Mar 18 13:38:19 mypc kernel: [ 542.573034] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mar 18 13:38:19 mypc kernel: [ 542.573220] cfg80211: Calling CRDA for country: AL
Mar 18 13:38:19 mypc kernel: [ 542.578955] cfg80211: Regulatory domain changed to country: AL
Mar 18 13:38:19 mypc kernel: [ 542.578960] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 18 13:38:19 mypc kernel: [ 542.578965] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 18 13:38:19 mypc kernel: [ 542.578969] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 13:38:19 mypc kernel: [ 542.578972] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 18 13:38:19 mypc kernel: [ 542.578976] cfg80211: (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2700 mBm)
이 줄은 한 번만 나타나며 더 이상 반복되지 않습니다.syslog
:)
wpa_supplicant.conf
파일을 삭제하고 모든 내용을 파일에 넣으면 이제 잘 작동합니다 /etc/network/interfaces
.
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# don't use `auto wlan0` since this will infinitely try to connect at
# boot time, and i will have to remove the hard drive, mount it on
# another pc and remove `auto wlan0` from this file just to get a
# command prompt again!
iface wlan0 inet static
wpa-ssid "aphanumeric_with_underscores"
# both the plaintext password and the ascii-hex hash from
# wpa_passphrase work fine for me here:
wpa-psk "my wpa2 password"
wpa-ap-scan 1
wpa-proto WPA2
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
and note that there is currently no wpa_supplicant.conf file:
$ ls /etc/wpa_supplicant.conf
ls: cannot access /etc/wpa_supplicant.conf: No such file or directory
$ ls /etc/wpa_supplicant/*
action_wpa.sh functions.sh ifupdown.sh
답변2
다음을 기반으로 wpa_supplicant를 사용해 보겠습니다.우분투 사용자 위키.
즉, 모든 wpa 콘텐츠를 넣고 /etc/wpa_supplicant/wpa_supplicant.conf
다음 내용 /etc/network/interfaces
만 포함하도록 수정합니다.
...
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
...
추가로 wpa_supplicant( wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -d
)를 수동으로 시작합니다. wpa_supplicant에 문제가 있으면 표시되어야 합니다.
편집: @casey의 의견에 추가로 동의합니다. 키에 일부 오류가 있을 수 있습니다.