iwconfig命令

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

 

设置WEP密钥

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

 

关联到指定mac的AP

iwconfig ath0 ap 00:AA:BB:CC:DD:00

 

设置rts阈值

iwconfig ath0 rts 256
设置为2346关闭
iwconfig ath0 rts 2346

 

设置frag阈值

iwconfig ath0 frag 256
设置为2346关闭
iwconfig ath0 frag 2346

 

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值