WiFi基本参数

BeaconInterval

间隔调高有助于无线网络效能 client 端省电,

间隔调低可以加快wireless client 链接上去速度

Beacon传送频繁frame会比较占用无线带宽资源

Beacon 单位通常以微秒 millsecond 为单位( 1/1000 秒) 一般默认值为100

 

DTIM (delivery traffic information message) period (range 1..255):

number of beacons between DTIMs (1 = everybeacon includes DTIM element)

(default: 2)

高=因为wireless client 睡觉时间比较长一点比较省电缺点在于效能 ( latency throughput )可能变差

低 =提升效能,降低基地台buffer frame负担,对wireless clinet 比较不省电

 

max_num_sta

Maximum number of stations allowed instation table. New stations will be

rejected after the station table is full.IEEE 802.11 has a limit of 2007

different association IDs, so this numbershould not be larger than that.

(default: 2007)

 

RTSthreshold

RTS/CTS threshold; -1 = disabled (default);range -1..65535

If this field is not included inhostapd.conf, hostapd will not control

RTS threshold and 'iwconfig wlan# rts<val>' can be used to set it.

RTS /CTS功用跟一般有线网络的CSMA/CA载波侦测类似

假设有2个wireless client 同时跟一个基地台做数据传输,2个wireless client 之间又有距离无法知道对方也在抢着讲话,这时候会产生碰撞状况.

因为大封包比较会有碰撞可能所以基地台和wireless client 可以设定多少大小frame ,才使用rts/cts功能。

 

1.rts/cts 如非必要 不要用 会影响到效能 .因为wlan frame 最大2304+8wepbyte=

2312 所以订2312 -到2346等于是"不启用"RTS/ CTS

 

2.用到状况是 wireless client端很散乱分布..rf频谱干扰严重

 

3.RTS Length (RTS Threshold)

RTS 高(2312 -到2346)=不启动用于无干扰网络状态下,client 单纯

RTS 低 =client 之间距离长,client 处于运动模式.rf 干扰大.

 

IEEE802.11提供了如下解决方案。在参数配置中,若使用RTS/CTS协议,同时设置传送上限字节数----一旦待传送的数据大于此上限值时,即启动RTS/CTS握手协议:首先,A向B发送RTS信号,表明A要向B发送若干数据,B收到RTS后,向所有基站发出CTS信号,表明已准备就绪,A可以发送,而其余欲向B发送数据的基站则暂停发送;双方在成功交换RTS/CTS信号(即完成握手)后才开始真正的数据传递,保证了多个互不可见的发送站点同时向同一接收站点发送信号时,实际只能是收到接收站点回应CTS的那个站点能够进行发送,避免了冲突发生。即使有冲突发生,也只是在发送RTS时,这种情况下,由于收不到接收站点的CTS消息,大家再回头用DCF提供的竞争机制,分配一个随机退守定时值,等待下一次介质空闲DIFS后竞争发送RTS,直到成功为止。

 

fragm_threshold

Fragmentation threshold; -1 = disabled(default); range -1, 256..2346

If this field is not included inhostapd.conf, hostapd will not control

fragmentation threshold and 'iwconfig wlan#frag <val>' can be used to set it.

表示一个package的分片阈值。我们可以设置分片大小,当发送的数据包超过这个阈值之后,802.11协议会自动对这个数据包进行分割。如果设置的这个分片值越小,那么整个数据包越容易传输成功(因为如果出错,那么只需要传送一个片段而不是整个包,无线wifi网络中数据传输时出错的概率比有线的以太网要大的多的多),当然开销也越大(因为需要额外的信息标记每个分片,以及各个分片传输成功之后涉及到的重组问题)。

 

wpa_group_rekey

Time interval for rekeying GTK(broadcast/multicast encryption keys) in

seconds. (dot11RSNAConfigGroupRekeyTime)

相关bug: wifi自动断线

自己解决了

修改/etc/config/wireless

       option 'encryption' 'psk2'

       option 'wpa_group_rekey' '0'

默认的'wpa_group_rekey'是600秒,就是10分钟更新一次组**,所以差不多10分钟手机WIFI就掉线重连,可能手机和一些老客户端不支持组**更新。而TPLINK无线路由默认的组**更新周期都是0所以没有问题。

 

关于WIFI的组**,相关资料上的描述如下:

802.11i的**分为两类:成对**(用于客户端和AP之间的单播)和小组**(用于所有客户端和AP之间组播或者多播);

成对**:通过四次握手完成;

组**:通过两次握手完成;当工作站离开网络,不论是使用完毕或者被踢出网络,网络系统即可更新组**。当组**更新后,每个工作站都必须再进行一次组**交换。

组**通常由AP主导更新,不过工作站也可以主动发送确认消息来要求更新组**。

在Ralink AP上组**的更新策略,目前观察到的情况是:

3600秒,组**更新一次;

某个客户端离开AP,或者新的客户端加入AP都不会更新组**。

 

APIsolation

AP 隔离(Isolation),AP隔离指的是开启之后,各个连接的电脑不能互相访问,起到隔离的作用,来保障不同用户的安全。

 

ShortGI

GI:(Guard Interval)中文:保护间隔。它是802.11n针对802.11a/g所做的改进。本代码是基于OFDM系统的一种转换域估计算法,有整个OFDM系统及改进的信道估计算法仿真。包括LS、MMSE、LMMSE、DFT及改进后的DCT算法。

 

射频芯片在使用OFDM调制方式发送数据时,整个帧是被划分成不同的数据块进行发送的,为了数据传输的可靠性,数据块之间会有GI,用以保证接收侧能够正确的解析出各个数据块。无线信号在空间传输会因多径等因素在接收侧形成时延,如果后续数据块发送过快,会和前一个数据块形成干扰,而GI就是用来规避这个干扰的。11a/g的GI时长为800ns,而Short GI时长为400ns,在使用Short GI的情况下,可提高10%的速率。另外,Short GI与带宽无关,支持20MHz、40MHz带宽。

 

 

BasicRate Set and Transmit Rate setting

http://www.tomshardware.com/forum/20446-43-wireless-networking-general

 

    *What does the Basic Rate setting in an access point or wireless router do andhow does it differ from the Transmit Rate setting?

 

The Basic Rate set is therates that all clients that want to associate with a given access point mustsupport. For 802.11b WLANs, these will be 1, 2, 5.5 and11Mbps. This information is transmitted by an access point as mandatory ratesin the Supported Rates element of various management frames.Allcurrent-generation 802.11b products support the 1,2,5.5 and 11Mbps basic rateset. However some very old 802.11b clients may only be able to associate withAPs advertising a 1, 2Mbps basic rate set. This is why some APs allow you tochange this setting.The Transmit Rate setting is usedto set the fastest rate that an AP or wireless router will send data. Itcan be used to force a lower rate in order to trade off speed for more reliableconnection in WLANs where many clients are operating at low signal levels.

We recommend Matthew Gast'shttp://www.oreilly.com/catalog/802dot112/ 802.11Wireless

WiFi基本参数