1#! /bin/sh 2# 3# Setup a wireless extender/relay: extend a wireless network using 4# dwds. We create an ap vap and a station vap; then enable 5# dwds on the sta. The sta vap associates to another ap and passes 6# traffic from stations associated to the (local) ap. The sta 7# will follow it's peer ap, dragging the ap vap with it. 8# 9# $FreeBSD: src/tools/tools/net80211/scripts/setup.wdsrelay,v 1.1 2008/04/20 20:43:42 sam Exp $ 10# 11PATH=.:$PATH 12. config 13 14AP_SSID='freebsd+wdsrelay' 15WDS_SSID='freebsd+wdsmain' 16#WDS_SSID='WDS1' 17 18#mwldebug state+node+reset+xmit+recv+beacon+hal+hal2 19WLAN_AP=`ifconfig wlan create wlanmode hostap wlandev $WIRELESS` 20ifconfig $WLAN_AP ssid "$AP_SSID" mtu 1500 -apbridge 21wlandebug -i $WLAN_AP state+assoc+wds+11n 22 23WLAN_STA=`ifconfig wlan create wlanmode sta wlandev $WIRELESS -beacons` 24ifconfig $WLAN_STA ssid "$WDS_SSID" dwds -bgscan 25wlandebug -i $WLAN_STA state+assoc+auth+wds+scan+11n 26# no TSO in the bridge, no AMPDU until fw works right 27ifconfig $WLAN_STA -tso -ampdu 28 29BRIDGE=`ifconfig bridge create` 30ifconfig $BRIDGE addm $WLAN_AP addm $WLAN_STA up 31# NB: bring sta up first so it can locate it's AP 32ifconfig $WLAN_STA up 33ifconfig $WLAN_AP up 34 35#ifconfig $WIRED down delete 36