前置き

WPAだと,iwconfigだけでは接続できなくて,wpa_suppliantが必要だった.

手間取ったので,メモを残しておく.

参考

WPA supplicant – ArchWiki

やったことなど.

無線LANの機械には

WPA-PSK(AES)

と書いてあった.

設定ファイルの作成.

# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original
# wpa_passphrase <essid> <password> > /etc/wpa_supplicant.conf

/etc/wpa_supplicant.conf に以下を追加.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=network

無線を有効にする.

# ifconfig wlan0 up
# iwconfig wlan0 essid <ssid>
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
# dhcpd wlan0
dhcpcd: version 5.1.4 starting
dhcpcd: wlan0: broadcasting for a lease
dhcpcd: wlan0: offered 192.168.0.10 from 192.168.0.1
dhcpcd: wlan0: acknowledged 192.168.0.10 from 192.168.0.1
dhcpcd: wlan0: checking for 192.168.0.10
dhcpcd: wlan0: leased 192.168.0.10 for 86400 seconds
dhcpcd: forking to background

確認.

# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:1F:E1:5C:59:0E
inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1771 errors:0 dropped:0 overruns:0 frame:0
TX packets:1924 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:613480 (599.1 Kb)  TX bytes:380595 (371.6 Kb)

ipアドレスが割り当てられているのが確認できる.