Difference between revisions of "Configuring wireless interfaces"
From Notes_Wiki
(Created page with "=Configuring wireless interfaces= To configure wireless interfaces in Linux one can use combination of '<tt>ifconfig</tt>', '<tt>iwconfig</tt>' and '<tt>iwlist</tt>' commands...") |
m |
||
Line 1: | Line 1: | ||
<yambe:breadcrumb>Network interface configuration|Interface configuration</yambe:breadcrumb> | |||
=Configuring wireless interfaces= | =Configuring wireless interfaces= | ||
Revision as of 11:53, 2 December 2012
<yambe:breadcrumb>Network interface configuration|Interface configuration</yambe:breadcrumb>
Configuring wireless interfaces
To configure wireless interfaces in Linux one can use combination of 'ifconfig', 'iwconfig' and 'iwlist' commands. 'ifconfig' or 'dhclient' can be used to configure IP address for interface or to make interface up so that we can use 'iwconfig' or 'iwlist' command for given interface. 'iwconfig' command can be used to configure frequency/channel, power, ssid, encryption key etc. for wireless interface. 'iwlist' helps in scanning for available networks and also helps in listing supported frequencies and channels of available network adapters.
Example script used to configure wireless interface at staff quarters is:
#!/bin/bash sudo ifconfig wlan0 up sudo iwconfig wlan0 essid <SSID> sudo iwconfig wlan0 key <KEY> sudo iwlist scanning wlan0 sudo iwconfig wlan0 channel 5 sudo iwconfig ap 00:0D:54:98:7C:85 sudo dhclient -v wlan0
Note:
- Channel, essid, key, ap, etc. values will change as per scenario and most of these (except key offcourse) can be found using 'iwlist scanning' command.
- 128-bit hex Key should be written in following format 'aaaa-bbbb-cccc-dddd-eeee-ffff-gg'