WLAN Access Point (TP-Link TL-WN822N) mit FreeBSD

Aus Port23Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 116: Zeile 116:
 
groups: bridge
 
groups: bridge
 
nd6 options=9<PERFORMNUD,IFDISABLED>
 
nd6 options=9<PERFORMNUD,IFDISABLED>
  +
  +
Verbunden Stationen abfragen
  +
  +
root@fbsd-ap:~ # hostapd_cli list_sta
  +
Selected interface 'wlan0'
  +
18:f4:aa:aa:aa:0f

Version vom 15. November 2023, 14:31 Uhr

Konfiguration von FreeBSD als WLAN Access Point

Wichtig: Ein von FreeBSD unterstützter WLAN Adapter (auch als Host AP). In diesem Fall ein TP-Link TL-WN822N V4, dieser hat einen Realtek RTL8192EU WLAN-Controller.

root@fbsd-ap:~ # usbconfig
ugen2.2: <Realtek 802.11n NIC> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

Der HOSTAP Modus wird unterstützt:

root@fbsd-ap:~ # ifconfig wlan0 list caps
drivercaps=591c541<STA,FF,IBSS,HOSTAP,SHSLOT,SHPREAMBLE,MONITOR,WPA1,WPA2,WME>
cryptocaps=b<WEP,TKIP,AES_CCM>
htcaps=7002c<SHORTGI20>

Auszug aus /etc/rc.conf fuer WLAN:

# WLAN
if_rtwn_usb_load="YES"
wlans_rtwn0="wlan0"
create_args_wlan0="wlanmode hostap"
hostapd_enable="YES"
ifconfig_wlan0="ssid freebsd-ap country DE mode 11ng"
# Bridge
cloned_interfaces="br0"
ifconfig_br0="addm re0 addm wlan0 up"

Installation des Pakets hostapd mit "pkg install hostapd"

Auszug aus der Datei /etc/hostapd.conf

interface=wlan0
driver=bsd
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=fbsd-ap
country_code=DE
ieee80211d=1

hw_mode=g
channel=1

beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=-1
fragm_threshold=-1
macaddr_acl=0
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1

wpa=2
wpa_passphrase=geheim
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP


wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   ether 50:91:aa:aa:aa:ae
   groups: wlan
   ssid fbsd-ap channel 2 (2417 MHz 11g ht/20) bssid 50:91:e3:d3:74:ae
   regdomain ETSI country DE authmode WPA2/802.11i privacy MIXED
   deftxkey 2 AES-CCM 2:128-bit txpower 30 scanvalid 60 protmode CTS ht20
   ampdulimit 64k ampdudensity 16 shortgi -stbc -ldpc -uapsd wme
   dtimperiod 1 -dfs
   parent interface: rtwn0
   media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng <hostap>
   status: running
   nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether 58:aa:aa:00:36:1a
  id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
  maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
  root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
  member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
    ifmaxaddr 0 port 1 priority 128 path cost 20000
  member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
    ifmaxaddr 0 port 3 priority 128 path cost 69204
  groups: bridge
  nd6 options=9<PERFORMNUD,IFDISABLED>

Verbunden Stationen abfragen

root@fbsd-ap:~ # hostapd_cli list_sta
Selected interface 'wlan0'
18:f4:aa:aa:aa:0f
Meine Werkzeuge