iwconfig用来操作VAP接口
radio层不支持iwconfig命令
~ # iwconfig --help
Usage: iwconfig [interface]
interface essid {NNN|any|on|off}
interface mode {managed|ad-hoc|master|...}
interface freq N.NNN[k|M|G]
interface channel N
interface bit {N[k|M|G]|auto|fixed}
interface rate {N[k|M|G]|auto|fixed}
interface enc {NNNN-NNNN|off}
interface key {NNNN-NNNN|off}
interface power {period N|timeout N|saving N|off}
interface nickname NNN
interface nwid {NN|on|off}
interface ap {N|off|auto}
interface txpower {NmW|NdBm|off|auto}
interface sens N
interface retry {limit N|lifetime N}
interface rts {N|auto|fixed|off}
interface frag {N|auto|fixed|off}
interface modulation {11g|11a|CCK|OFDMg|...}
interface commit
Check man pages for more details.
~ # iwconfig
ath0 IEEE 802.11na ESSID:"ssidname"
Mode:Master Frequency:5.745 GHz Access Point: 00:03:0F:AA:EE:00
Bit Rate:144.4 Mb/s Tx-Power:23 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=94/94 Signal level=-96 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
~ # iwconfig ath0
ath0 IEEE 802.11ng ESSID:"ssidname"
Mode:Master Frequency:2.412 GHz Access Point: 00:03:0F:AA:EE:00
Bit Rate:144.4 Mb/s Tx-Power:23 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=94/94 Signal level=-96 dBm Noise level=-95 dBm
Rx invalid nwid:2 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
iwconfig ath0 freq 1
iwconfig ath0 channel 1
iwconfig ath0 channel auto
单位dBm
iwconfig ath0 txpower 20
enc和key是同义词,索引从1到4
ascii格式
iwconfig ath0 key [1] s:passw
hex格式
iwconfig ath0 key [1] 0000-0000-00
关闭WEP
iwconfig ath0 key off
选择使用哪一个key
iwconfig ath0 key [1]
对于WEP64(40),密码长度5个字节
对于WEP128(108),密码长度13个字节
iwconfig eth0 mode Ad-Hoc
iwconfig eth0 mode Managed
iwconfig eth0 mode Master
iwconfig eth0 mode Repeater
iwconfig eth0 mode Secondary
iwconfig eth0 mode Monitor
iwconfig ath0 rate auto
iwconfig ath0 ap 00:AA:BB:CC:DD:00
iwconfig ath0 rts 256
设置为2346关闭
iwconfig ath0 rts 2346
iwconfig ath0 frag 256
设置为2346关闭
iwconfig ath0 frag 2346