Setting Up Devices
First you will need to find the device for you wireless, this can generally be found with:
You will need this to create a psuedo device for wlan0. This can be achieved with the following:
ifconfig wlan0 create wlandev device_name
Where device_name is the device from ifconfig.
Setting Up Wep
Setting up wep can be done using ifconfig directly, and is fairly straight forward.
ifconfig wlan0 ssid SSID_NAME wepmode on wepkey 0xHEX_KEY weptxkey 1
When using wep, remember to keep the 0x infront of the wep key; for example, if you wep key was "1234567890" and SSID was "Wireless" use:
ifconfig wlan0 ssid Wireless wepmode on wepkey 0x1234567890 weptxkey 1
Setting Up Wpa
For using wpa encryption make sure to have a /etc/wpa_supplicant.conf setup.
psk="router wpa key"
After you've configured the device and setup the encryption method, you will need to bring the device up befor eusing dhclient:
ifconfig wlan0 up
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Then you can proceed to use dhclient:
Maybe there's something wrong with link to net, you should add