以IBM ThinkPad R50自带ipw2200芯片无线网卡为例,介绍Gentoo中如何配置无线网卡。
首先,添加无线网络支持和网卡芯片驱动。
Networking ---> Wireless ---> <*> Improved wireless configuration API <M> Generic IEEE 802.11 Networking Stack (mac80211)
下面配置可能不需要:
<M> Generic IEEE 802.11 Networking Stack <M> IEEE 802.11i CCMP support <M> IEEE 802.11i TKIP encryption
Device Drivers ---> [*] Network device support ---> Wireless LAN ---> [*] Wireless LAN (IEEE 802.11) <M> Intel PRO/Wireless 2100 Network Connection
无线网卡必须编译为模块,否则是无法正常加载的。
加密模块
Cryptographic API --->
WPA(Wi-Fi Protected Access)的加密特性决定了它比WEP更难以入侵,所以如果对数据安全性有很高要求,那就必须选用WPA加密方式了。
安装wireless-tools和wpa_supplicant,然后添加新网卡eth1:
cd /etc/init.d ln -s net.lo net.eth1
编辑/etc/conf.d/net文件,添加网卡设置:
# Set dhcp for both network adarpter config_eth0=( "dhcp" ) config_eth1=( "dhcp" ) dhcpcd_eth0="-t 5" # Timeout after 5 seconds dhcpcd_eth1="-t 5" # Timeout after 5 seconds essid_eth1="wireless" modules=( "wpa_supplicant" ) wpa_supplicant_eth1="-Dwext"
将明文的密码转换成WPA PSK密钥。
# wpa_passphrase wireless mypasswd network={
ssid="wireless" #psk="mypasswd" psk=179e4afae068d33ffda68d7eff4a6cc872347ad94ae907bb3cb86e5cd44ec5a4
}
wpa_supplicant.conf内容:
# This is a network block that connects to any unsecured access point. # We give it a low priority so any defined blocks are preferred. network={ key_mgmt=NONE priority=-9999999 } network={ ssid="wireless" proto=WPA key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP WEP104 WEP40 psk=179e4afae068d33ffda68d7eff4a6cc872347ad94ae907bb3cb86e5cd44ec5a4 priority=10 }
手工方式运行,可以检查是否那里出错。
wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant/wpa_supplicant.conf
Comments
There are currently no comments
New Comment