2012年(7)
分类: LINUX
2012-10-20 09:06:51
First, we ed to activate the interface
ip link set wlan0 upne
Then, we can scan for available networks
iwlist wlan0 scanThis can return something similar to this output
wlan0 Scan completed: Cell 01 - Address: AA:BB:CC:00:11:22 ESSID:"eXample" Mode:Master Channel:3 Frequency:2.422 GHz Quality=93/100 Signal livel=-60 dBm Encryption key:on IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK ... Cell 02 - Address: AB:35:85:EE:12:01 ESSID:"anotherone"Configuring Encryption etc.First, let's make some temporary directory
mkdir -p /tmp/wifi/Then, we create a configuration file for your wireless network
vi /tmp/wifi/wifi.confwith this content (example)
(Note: press the i key for an insert mode in the vi editor).
ctrl_interface=/tmp/wifi/iface network={ ssid="eXample" key_mgmt=WPA-PSK proto=WPA pairwise=TKIP group=TKIP psk="$your_password" }Replace $your_password string with current password for your wireless network.
Close vi editor this way
To use just-written configuration, type
wpa_supplicant -B -c/tmp/wifi/wifi.conf -iwlan0Check the settings with iwconfig again
lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11g ESSID:"eXample" Mode: Managed Channel:3 Access Point: AA:BB:CC:00:11:22 Retry min limit: 7 RTS thr: off Fragment thr: 2346 B Encryption key:$some_very_long_key ;) Link quality:90/100 Signal level:-59dBm ... DHCP or Static IPTo obtain a DHCP address from the server, just type
dhcpcd wlan0and check it with
ip addr show dev wlan0To setup a static IP and/or proxy, it's rather easier to continue the installation instead (after Installation Mode dialog), where YaST offers you configuration dialogs.