Thursday, March 18, 2010

Using iwconfig linux tools

You use iwconfig to configure a wireless network interface. If you’re familiar
with the ifconfig command, the iwconfig command is similar but works
only with wireless interfaces. You use iwconfig to set the network interface
parameters, such as frequency. As well, you can use iwconfig to set the
wireless parameters and display statistics. The syntax is as follows:
iwconfig interface [essid X] [nwid N] [freq F] [channel C]
[sens S] [mode M] [ap A] [nick NN]
[rate R] [rts RT] [frag FT] [txpower T]
[enc E] [key K] [power P] [retry R]
[commit]
iwconfig --help
iwconfig --version
Let’s look at each one of the parameters.
essid: Use the ESSID parameter to specify the ESSID or Network Name.
For example, the following specifies that you want to set the ESSID for
the wireless adapter to ANY for wardriving.
iwconfig eth0 essid any
nwid/domain: Use the Network ID parameter to specify the network ID
or Domain ID. For example, the following specifies that you want to disable
Network ID checking.
iwconfig eth0 nwid off
freq/channel: Use this parameter to set the operating frequency or
channel. A value below 1,000 represents the channel number, while a
value over is the frequency in Hz. For example, the following specifies
that you want to set the frequency to 2.422 GHz.
iwconfig eth0 freq 2.422G
Or for example, the following specifies that you want to use
channel three.
iwconfig eth0 channel 3
sens: Use this parameter to set the sensitivity threshold. For example,
the following specifies the level as 80 dBm.
iwconfig eth0 sens -80
mode: Use this parameter to set the operating mode of the device. The
operating mode is one of the following:
• Ad-hoc: no Access Point.
• Managed: more than one Access Point, with roaming.
• Master: synchronization master or an Access Point.
• Repeater: node forwards packets between other wireless nodes.
• Secondary: node acts as a backup master or repeater.
• Monitor: the node acts as a passive monitor and only receives
packets.
• Auto: self-explanatory.
For example, the following specifies that the network is infrastructure
mode.
iwconfig eth0 mode managed
ap: Use this parameter to force the card to register to the Access Point
given by the address. Use off to re-enable automatic mode without
changing the current Access Point, or use any or auto to force the card
to re-associate with the current best Access Point. For example, the following
forces association with the access point with the hardware
address of 00:60:1D:01:23:45.
iwconfig eth0 ap 00:60:1D:01:23:45
nick[name]: Use this parameter to set the nickname or station name.
For example, the following sets the nickname to Peter Node.
iwconfig eth0 nickname Peter Node
rate/bit[rate]: Use this parameter to set the bit-rate in bits per
second for cards supporting multiple bit rates. For example, the following
sets the bit rate to 11 Mbps.
iwconfig eth0 rate 11M
rts[_threshold]: Use this parameter to turn RTS/CTS on or off. For
example, the following turns RTS/CTS off.
iwconfig eth0 rts off
frag[mentation_threshold]: Use this parameter to turn fragmentation
on or off. For example, the following specifies a maximum fragment
size of 512K.
iwconfig eth0 frag 512
key/enc[ryption]: Use this parameter to turn encryption or scrambling
keys on or off and to set the encryption mode. For example, the following
specifies an encryption key.
iwconfig eth0 key 0123-4567-89
power: Use this parameter to set the power management scheme and
mode. For example, the following disables power management.
iwconfig eth0 power off
txpower: Use this parameter to set the transmit power in dBm for cards
supporting multiple transmit powers. For example, the following set the
transmit power to 15 dBm.
iwconfig eth0 txpower 15
If you are unfamiliar with dBM as a measurement, refer to www.atis.org/
tg2k/_dbm.html for a definition.
retry: Use this parameter to set the maximum number of MAC retransmission
retries. For example, the following specifies to retry 16 times.
iwconfig eth0 retry 16
commit: Use this parameter to force the card to apply all pending
changes rather than waiting for the issuance of an ifconfig command.
For example, the following specifies to commit the changes.
iwconfig eth0 commit
Link quality: Use this parameter to display the quality of the link.
Signal level: Use this parameter to show the received signal strength.
Noise level: Use this parameter to display the background noise level.
invalid nwid: Use this parameter to detect configuration problems or
the existence of an adjacent network.
invalid crypt: Use this parameter to display the number of packets
that the hardware couldn’t decrypt.
invalid misc: Use this parameter to display other packets lost in relation
with specific wireless operations.
There you have it. Remember you can get more information by using the
man command.

No comments:

Post a Comment

 
[URL=http://s06.flagcounter.com/more/6xL][IMG]http://s06.flagcounter.com/count/6xL/bg=FFFFFF/txt=000000/border=CCCCCC/columns=3/maxflags=20/viewers=0/labels=0/[/IMG][/URL] Locations of visitors to this page