|
|

楼主 |
发表于 2009-3-26 23:06:39
|
显示全部楼层
wiki:
如果只有无线连接
软件包wireless_tools已经放在安装包的base-devel。
1.Identify your interface and appropriate module:
# hwdetect --show-net
or
# lshwd
or
# lspci | grep -i net
2.Ensure the module is loaded with lsmod | grep <name_or_part_of_name_of_module> e.g.:
# lsmod | grep ath
3.Ensure the driver has created a usable interface:
# iwconfig
4.Bring the interface up with ifconfig <interface> up. e.g.:
# ifconfig ath0 up
(Optional) Scan for available access points:
# iwlist ath0 scan | less
4.Specify the id of the wireless network with iwconfig <interface> essid "<youressid>". Or,
if using WEP;
iwconfig <interface> essid "<youressid>" key <yourwepkey>(give the essid (the 'network name') of the network in quotes), e.g.:
# iwconfig ath0 essid "linksys" key 0241baf34c
If your WEP key is ASCII, prefix with s:, e.g.:
# iwconfig ath0 essid linksys key s:mywepkey
Request an IP address with dhcpcd <interface>. e.g.:
# dhcpcd ath0
Ensure you can route:
$ ping -c 3 www.google.com
软件包 wireless_tools 提供的程序是建立一个无线连接的基础工具。如果你需要使用WPA/WPA2 encryption, 您还需要软件包wpa_supplicant。 These powerful userspace console tools work extremely well and allow complete, manual control from the shell.
1. (可选,可能需要) 一些无线网卡在使用wireless_tools前需要激活kernel interface:
# ifconfig wlan0 up
2. (可选,可能需要) See what access points are available:
# iwlist wlan0 scan
We assume you want to use the essid named MyEssid.
3. Depending on the encryption, you need to associate your wireless device with the access point to use and pass the encryption key.
No encryption
# iwconfig wlan0 essid "MyEssid"
WEP
using an hexadecimal key:
# iwconfig wlan0 essid "MyEssid" key 1234567890
using an ascii key:
# iwconfig wlan0 essid "MyEssid" key s:asciikey
WPA/WPA2
You need to edit the /etc/wpa_supplicant.conf file as described in WPA_Supplicant. Then, issue this command:
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
This is assuming your device uses the wext driver. If this does not work, you may need to adjust these options. Check WPA_Supplicant for more information and troubleshooting.
4. Finally, provide an IP address to the network interface. Simple examples are:
# dhcpcd wlan0
for DHCP, or
# ifconfig wlan0 192.168.0.2
# route add default gw 192.168.0.1
for static IP.
Note: Although the manual configuration method will help troubleshoot wireless problems, you will have to retype every command each time you reboot. |
|