ubnt 无线网桥M5 repeater模式原理分析

最近在做点对点产品的项目,竞品是ubnt的M5,由于时间很紧,也没有把一些经验进行总结。


    ubnt的无线网桥M5支持ap、station、repeater模式。ap与station模式很容易理解,ap模式就是相当于无线发射点,终端(手机、电脑等)通过wifi连上该设备,而station模式下的设备也就相当于客户端了,用于去连ap。repeater模式是通过wds实现的,即无线分发系统。多个设备通过wds连在一起,就像布成一个网络,各个设备都是对等的,客户端可以连上任意一个设备。

    配置页面


repeater模式可以配置成auto模式和手动模式,在auto模式下会根据ssid查询mac周边设备,自动桥接。而如果手动输入mac地址,则会将mac加入到wds列表,最多支持6个mac桥接。

    在配置repeater模式后,通过ssh登入到m5后台,查看无线接口信息,发现是通过nawds实现repeater的。

XW.v5.6.3# cat /etc/sysinit/wireless.conf 

plugin_start() {

if [ -f /proc/sys/dev/rssi-leds/thresholds ]; then

echo 94 87 80 72 65 65 65 65  > /proc/sys/dev/rssi-leds/thresholds

echo 300 > /proc/sys/dev/rssi-leds/timer

echo 1 > /proc/sys/dev/rssi-leds/enable

fi

if [ -f /tmp/.wifi_ath0 ]; then

80211debug -i ath0 0x0

iwconfig "ath0" essid "ubnt2"

iwpriv "ath0" authmode 1

iwpriv "ath0" htweptkip 1

iwpriv "ath0" wmm 1

iwpriv "ath0" hostroaming 1

iwpriv "ath0" addmtikie 1

iwpriv "ath0" wds 1

iwpriv "ath0" autowds 0

/sbin/wlanconfig "ath0" nawds mode 1 > /dev/null 2>&1

/sbin/wlanconfig "ath0" nawds add-repeater 12:01:f0:c0:af:01 9 > /dev/null 2>&1

/sbin/wlanconfig "ath0" nawds add-repeater 12:01:f0:c0:af:03 9 > /dev/null 2>&1

/sbin/wlanconfig "ath0" nawds add-repeater 12:01:f0:c0:af:02 9 > /dev/null 2>&1

iwpriv "ath0" mcastenhance 2

iwconfig "ath0" sens 0

iwpriv "ath0" ignore11d 1

iwpriv "ath0" disablecoext 1

iwpriv "ath0" bgscan 0

athchans -i ath0 0

iwpriv "ath0" hide_ssid "0"

iwpriv "ath0" ap_bridge "1"

iwpriv "ath0" maccmd 3

iwpriv "ath0" maccmd 0

iwpriv "ath0" protmode 1

iwpriv "ath0" htprot 0

iwconfig "ath0" key off open

fi

true

}


于是通过命令在我们的两台设备上进行操作,实现了两台设备的桥接。过程中应该注意的问题是,信道、频宽、ssid、加密方式必须设置为一样,加密方式ubnt的只支持wep加密。

执行以下操作:

设备1

iwconfig  ath1 channel 36

iwconfig "ath1" essid "wds-test"

iwpriv "ath1" authmode 1

iwpriv "ath1" wds 1

wlanconfig "ath1" nawds mode 1 

wlanconfig "ath1" nawds add-repeater 00:00:00:00:00:25 9

设备2

iwconfig  ath1 channel 36

iwconfig "ath1" essid "wds-test"

iwpriv "ath1" authmode 1

iwpriv "ath1" wds 1

wlanconfig "ath1" nawds mode 1 

wlanconfig "ath1" nawds add-repeater 00:00:00:00:00:30 9


查看是否桥接成功

首先通过命令

wlanconfig   ath1 nawds list

查看是否有对端的mac地址

然后通过 wlanconfig ath1 list sta查看是否有对端设备信息,如果桥接成功,在两边都会看到对端信息的。


更多wifi相关文章,微信请关注:wifi开发者,定期发布开发相关总结。



猜你喜欢

转载自blog.csdn.net/dxt1107/article/details/52494117