This howto is intended for those who are not afraid of the inner workings of their operating system. Establishing a network connection is a simple process involving these steps:
- bring the physical network interface up
- chose a security system if required
- assign an IP address
The Procedure:
- To bring up an iterface use:
- Code: Select all
ifconfig interface up
Where interface can be wlan0, wlan1, wlan2, etc. It can also be a wired interface like eth0, eth1, eth2, ... The new naming scheme should make no difference, although I did not them. - In the case of a WiFi, associate the interface with a hotspot as follows:
- Code: Select all
iwconfig interface essid mywifihotspot
- If you want security start the required daemon. In our case, we will use wpa_supplicant. If one want something else one can attempt to use it, but again, I did not do any such tests apart from using wpa_supplicant.
To use wpa_supplicant we need to create a .conf file which will hold the essid and password for our hotspot. The required contents as as follows:- Code: Select all
network={
ssid="mywifihotspot"
psk="myverylongpassword"
}
I will assume the .conf file above is save as wpa_supp1.conf. Start the wpa_supplicant daemon as follows:- Code: Select all
wpa_supplicant -i interface -B -c wpa_supp.conf
- Assign an IP address or use dhclient. In the case of wpa_supplicant I did not do any tests of assigning an IP directly without dhclient. Using dhclient worked as follows:
- Code: Select all
dhclient interface