Wireless (WLAN/WiFi) Interfaces in VyOS
Wireless interfaces in VyOS let you create access points (Access Point) or connect to existing wireless networks (Station mode).
Overview
VyOS supports the following wireless interface operating modes:
- Access Point (WAP) - provide wireless access to client devices
- Station (Client) - connect to an existing wireless network
- Monitor - passively monitor wireless traffic
Supported standards:
- IEEE 802.11a (5 GHz)
- IEEE 802.11b/g (2.4 GHz)
- IEEE 802.11n (2.4/5 GHz)
- IEEE 802.11ac (5 GHz)
- IEEE 802.11ax (2.4/5/6 GHz, WiFi 6)
Security:
- WPA/WPA2-Personal (PSK)
- WPA3-Personal (SAE)
- WPA/WPA2-Enterprise (802.1X RADIUS)
- Management Frame Protection (IEEE 802.11w)
Regulatory domain
IMPORTANT: Before configuring wireless interfaces, you must set the country code (regulatory domain).
Setting the country code
set system wireless country-code ru
commitCountry codes (ISO 3166-1 alpha-2):
ru- Russiaus- United Statesde- Germanygb- United Kingdomfr- Francejp- Japancn- China
The country code determines:
- Allowed frequencies and channels
- Maximum transmit power
- DFS (Dynamic Frequency Selection) requirements
- Allowed standards (802.11d)
Access Point mode
Basic configuration
A simple access point with WPA2:
set system wireless country-code ru
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 192.168.10.1/24
set interfaces wireless wlan0 ssid 'MyNetwork'
set interfaces wireless wlan0 channel 6
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'SecurePassword123'
commitSSID
Setting the network name:
set interfaces wireless wlan0 ssid 'Office-WiFi'
commitParameters:
- Maximum length: 32 characters
- May contain spaces (use quotes)
- UTF-8 encoding is supported
Hidden SSID (not advertised in beacons):
set interfaces wireless wlan0 security wpa disable-ssid-broadcast
commitChannel selection
2.4 GHz (802.11b/g/n):
set interfaces wireless wlan0 channel 1
commitAvailable 2.4 GHz channels:
1-14(depending on the regulatory domain)- Recommended non-overlapping: 1, 6, 11
5 GHz (802.11a/n/ac/ax):
set interfaces wireless wlan0 channel 36
commitAvailable 5 GHz channels:
36, 40, 44, 48- UNII-1 (indoor)52, 56, 60, 64- UNII-2 (indoor, requires DFS)100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144- UNII-2 Extended (requires DFS)149, 153, 157, 161, 165- UNII-3 (outdoor)
6 GHz (802.11ax, WiFi 6E):
set interfaces wireless wlan0 channel 1
commit6 GHz channels: 1-233
Automatic channel selection (ACS):
set interfaces wireless wlan0 channel 0
commitWireless standard
802.11b (2.4 GHz, up to 11 Mbps):
set interfaces wireless wlan0 physical-device phy0
set interfaces wireless wlan0 mode b
commit802.11g (2.4 GHz, up to 54 Mbps):
set interfaces wireless wlan0 mode g
commit802.11n (2.4/5 GHz, up to 600 Mbps):
set interfaces wireless wlan0 mode n
commit802.11ac (5 GHz, up to 6.9 Gbps):
set interfaces wireless wlan0 mode ac
commit802.11ax (2.4/5/6 GHz, WiFi 6):
set interfaces wireless wlan0 mode ax
commitMixed mode (b/g):
set interfaces wireless wlan0 mode g
commitChannel width
20 MHz (default):
set interfaces wireless wlan0 channel-width 20
commit40 MHz (802.11n):
set interfaces wireless wlan0 channel-width 40
commit80 MHz (802.11ac):
set interfaces wireless wlan0 channel-width 80
commit160 MHz (802.11ac/ax):
set interfaces wireless wlan0 channel-width 160
commitTransmit power
Reducing power (in dBm):
set interfaces wireless wlan0 reduce-transmit-power 5
commitThe value specifies how many dBm to reduce power from the maximum allowed by the regulatory domain.
Client isolation
Preventing direct communication between wireless clients:
set interfaces wireless wlan0 isolate-stations
commitUseful for guest networks and public WiFi.
Maximum Stations
Limiting the number of simultaneous connections:
set interfaces wireless wlan0 max-stations 50
commitMAC filtering
Allowed MAC addresses:
set interfaces wireless wlan0 security station-address 00:11:22:33:44:55
set interfaces wireless wlan0 security station-address aa:bb:cc:dd:ee:ff
commitMAC filtering mode:
set interfaces wireless wlan0 security mac-mode allow
commitModes:
allow- allow only the listed MACsdeny- deny the listed MACs
Station mode (client)
Connecting to a WPA2 network
Basic client configuration:
set system wireless country-code ru
set interfaces wireless wlan0 type station
set interfaces wireless wlan0 address dhcp
set interfaces wireless wlan0 ssid 'ExistingNetwork'
set interfaces wireless wlan0 security wpa passphrase 'NetworkPassword'
commitStatic IP address
set interfaces wireless wlan0 type station
set interfaces wireless wlan0 address 192.168.1.100/24
set interfaces wireless wlan0 ssid 'Office-WiFi'
set interfaces wireless wlan0 security wpa passphrase 'SecurePass123'
commitMultiple addresses
set interfaces wireless wlan0 address 192.168.1.100/24
set interfaces wireless wlan0 address 2001:db8::100/64
commitWPA security
WPA2-Personal (PSK)
Recommended configuration:
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'StrongPassword123!'
commitParameters:
mode- WPA version (wpa, wpa2, wpa3, both)cipher- encryption (CCMP, TKIP, CCMP+TKIP)passphrase- password (8-63 characters)
WPA3-Personal (SAE)
The most secure option:
set interfaces wireless wlan0 security wpa mode wpa3
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'VeryStrongPassword123!'
commitWPA3 provides:
- Protection against offline dictionary attacks
- Forward secrecy
- Stronger encryption
WPA2/WPA3 Mixed Mode
Compatibility with older devices:
set interfaces wireless wlan0 security wpa mode both
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'SecurePassword123'
commitManagement Frame Protection
Protecting management frames (IEEE 802.11w):
set interfaces wireless wlan0 security wpa mgmt-frame-protection required
commitModes:
disabled- disabledoptional- optional (default for WPA2)required- required (default for WPA3)
WPA2-Enterprise (802.1X)
Authentication via a RADIUS server:
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa radius server 192.168.1.10 key 'RadiusSecret'
set interfaces wireless wlan0 security wpa radius server 192.168.1.10 port 1812
commitBackup RADIUS server:
set interfaces wireless wlan0 security wpa radius server 192.168.1.11 key 'RadiusSecret'
set interfaces wireless wlan0 security wpa radius server 192.168.1.11 port 1812
commitRADIUS accounting:
set interfaces wireless wlan0 security wpa radius accounting-server 192.168.1.10 key 'RadiusSecret'
set interfaces wireless wlan0 security wpa radius accounting-server 192.168.1.10 port 1813
commitVLAN support
VLAN sub-interfaces
Creating VLAN interfaces:
set interfaces wireless wlan0 vif 10 address 192.168.10.1/24
set interfaces wireless wlan0 vif 10 description 'Guest WiFi'
set interfaces wireless wlan0 vif 20 address 192.168.20.1/24
set interfaces wireless wlan0 vif 20 description 'Corporate WiFi'
commitDynamic VLAN (802.1X)
The RADIUS server assigns a VLAN based on the credentials:
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa radius server 192.168.1.10 key 'RadiusSecret'
set interfaces wireless wlan0 security wpa dynamic-vlan
commitRADIUS attributes for Dynamic VLAN:
Tunnel-Type = VLANTunnel-Medium-Type = IEEE-802Tunnel-Private-Group-Id = <VLAN-ID>
Multiple SSIDs
Creating several virtual wireless interfaces:
# Primary SSID
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 ssid 'Corporate'
set interfaces wireless wlan0 address 192.168.10.1/24
set interfaces wireless wlan0 channel 36
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa passphrase 'CorpPassword'
# Guest SSID (virtual interface)
set interfaces wireless wlan0-1 type access-point
set interfaces wireless wlan0-1 ssid 'Guest'
set interfaces wireless wlan0-1 address 192.168.20.1/24
set interfaces wireless wlan0-1 isolate-stations
set interfaces wireless wlan0-1 security wpa mode wpa2
set interfaces wireless wlan0-1 security wpa passphrase 'GuestPassword'
commitAdvanced parameters
Beacon interval
Interval for sending beacon frames (in milliseconds):
set interfaces wireless wlan0 beacon-interval 100
commitDefault: 100 ms. Range: 15-65535.
DTIM period
Delivery Traffic Indication Message:
set interfaces wireless wlan0 dtim-period 2
commitDetermines how often to send buffered multicast/broadcast traffic to sleeping clients.
RTS/CTS threshold
Request to Send / Clear to Send for collision avoidance:
set interfaces wireless wlan0 rts-threshold 2347
commitValues:
0- disabled1-2347- packet size in bytes at which RTS/CTS is triggered
Fragmentation threshold
Packet fragmentation threshold:
set interfaces wireless wlan0 fragmentation-threshold 2346
commitPackets larger than the specified size will be fragmented.
Short preamble
Short preamble (802.11b/g only):
set interfaces wireless wlan0 short-preamble
commitCan improve performance with devices that support it.
WMM (WiFi Multimedia)
QoS for wireless networks:
set interfaces wireless wlan0 wmm
commitPrioritizes voice, video, best-effort, and background traffic.
Configuration examples
Home WiFi access point
set system wireless country-code ru
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 192.168.1.1/24
set interfaces wireless wlan0 ssid 'HomeNetwork'
set interfaces wireless wlan0 channel 6
set interfaces wireless wlan0 mode n
set interfaces wireless wlan0 channel-width 40
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'MyHomePassword123'
commitCorporate access point with RADIUS
set system wireless country-code ru
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 10.0.10.1/24
set interfaces wireless wlan0 ssid 'Corp-Enterprise'
set interfaces wireless wlan0 channel 36
set interfaces wireless wlan0 mode ac
set interfaces wireless wlan0 channel-width 80
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa radius server 10.0.0.100 key 'RadiusSharedSecret'
set interfaces wireless wlan0 security wpa radius server 10.0.0.101 key 'RadiusSharedSecret'
set interfaces wireless wlan0 security wpa mgmt-frame-protection required
commitGuest WiFi with isolation
set system wireless country-code ru
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 172.16.100.1/24
set interfaces wireless wlan0 ssid 'Guest-WiFi'
set interfaces wireless wlan0 channel 11
set interfaces wireless wlan0 mode n
set interfaces wireless wlan0 isolate-stations
set interfaces wireless wlan0 max-stations 100
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'GuestAccess2024'
commitDual-band access point
2.4 GHz:
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 192.168.10.1/24
set interfaces wireless wlan0 ssid 'MyNetwork-2.4G'
set interfaces wireless wlan0 channel 6
set interfaces wireless wlan0 mode n
set interfaces wireless wlan0 security wpa mode wpa2
set interfaces wireless wlan0 security wpa cipher CCMP
set interfaces wireless wlan0 security wpa passphrase 'Password123'
commit5 GHz:
set interfaces wireless wlan1 type access-point
set interfaces wireless wlan1 address 192.168.11.1/24
set interfaces wireless wlan1 ssid 'MyNetwork-5G'
set interfaces wireless wlan1 channel 36
set interfaces wireless wlan1 mode ac
set interfaces wireless wlan1 channel-width 80
set interfaces wireless wlan1 security wpa mode wpa2
set interfaces wireless wlan1 security wpa cipher CCMP
set interfaces wireless wlan1 security wpa passphrase 'Password123'
commitWiFi client with a backup route
set system wireless country-code ru
set interfaces wireless wlan0 type station
set interfaces wireless wlan0 address dhcp
set interfaces wireless wlan0 ssid 'MainNetwork'
set interfaces wireless wlan0 security wpa passphrase 'MainPassword'
set interfaces wireless wlan0 dhcp-options default-route-distance 10
commitCaptive Portal integration
set system wireless country-code ru
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 address 10.99.0.1/24
set interfaces wireless wlan0 ssid 'Public-WiFi'
set interfaces wireless wlan0 channel 6
# Open network (no WPA)
# Authentication via web portal
set service dns forwarding listen-address 10.99.0.1
# Redirect to the captive portal
set nat destination rule 100 inbound-interface name wlan0
set nat destination rule 100 protocol tcp
set nat destination rule 100 destination port 80
set nat destination rule 100 translation address 10.99.0.1
set nat destination rule 100 translation port 8080
commitWiFi bridge for network extension
# Connect to an existing WiFi
set interfaces wireless wlan0 type station
set interfaces wireless wlan0 ssid 'MainRouter'
set interfaces wireless wlan0 security wpa passphrase 'MainPassword'
# Create a bridge with Ethernet
set interfaces bridge br0 member interface wlan0
set interfaces bridge br0 member interface eth0
set interfaces bridge br0 address dhcp
commitOperational commands
Viewing interface status
show interfaces wireless wlan0Example output:
wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/24 brd 192.168.10.255 scope global wlan0
RX: bytes packets errors dropped overrun mcast
1234567 12345 0 0 0 123
TX: bytes packets errors dropped carrier collisions
7654321 54321 0 0 0 0Wireless interface information
show interfaces wireless wlan0 infoShows:
- SSID
- Frequency/Channel
- Mode (AP/Station)
- Signal level (for Station mode)
- Connected clients (for AP mode)
List of connected clients
show interfaces wireless wlan0 stationExample output:
Station Signal RX Rate TX Rate Connected
aa:bb:cc:dd:ee:ff -45 dBm 866 Mbps 866 Mbps 00:15:23
11:22:33:44:55:66 -52 dBm 433 Mbps 433 Mbps 01:23:45Scanning available networks
show interfaces wireless wlan0 scanShows:
- SSID
- BSSID
- Channel
- Signal level
- Security (WPA/WPA2/Open)
Physical capabilities
show interfaces wireless wlan0 capabilitiesOutput:
- Supported standards (802.11a/b/g/n/ac/ax)
- Supported frequencies
- Maximum power
- HT/VHT capabilities
Statistics
show interfaces wireless wlan0 statisticsTraffic monitoring
monitor interfaces wireless wlan0 trafficClearing counters
clear interfaces wireless wlan0 countersTroubleshooting
WiFi interface does not come up
Check the regulatory domain:
show system wireless country-codeSet it if missing:
set system wireless country-code ru
commitCheck the status:
show interfaces wireless wlan0Check dmesg for driver errors:
show log | grep wlan0Clients cannot connect
Check the SSID and channel:
show interfaces wireless wlan0 infoCheck the security configuration:
show configuration interfaces wireless wlan0 securityReview the hostapd logs:
show log | grep hostapdMake sure the channel is available in the regulatory domain:
show interfaces wireless wlan0 capabilitiesPoor performance
Check the clients’ signal level:
show interfaces wireless wlan0 stationTry a different channel (check neighboring networks):
show interfaces wireless wlan0 scanReduce the channel width:
set interfaces wireless wlan0 channel-width 20
commitDisable WMM if there are problems:
delete interfaces wireless wlan0 wmm
commitInterference
Scan available networks:
show interfaces wireless wlan0 scanChoose a less congested channel:
- 2.4 GHz: use 1, 6, or 11
- 5 GHz: pick channels away from neighboring networks
Reduce the transmit power:
set interfaces wireless wlan0 reduce-transmit-power 3
commitWPA3 incompatibility
Use mixed mode:
set interfaces wireless wlan0 security wpa mode both
commitOr switch to WPA2:
set interfaces wireless wlan0 security wpa mode wpa2
commitRADIUS authentication does not work
Check RADIUS server reachability:
ping 192.168.1.10Check the shared secret:
show configuration interfaces wireless wlan0 security wpa radiusCheck the logs on the RADIUS server.
Test with radtest (if available):
radtest user password 192.168.1.10 0 RadiusSecretFrequent client disconnects
Increase the beacon interval:
set interfaces wireless wlan0 beacon-interval 200
commitCheck for interference:
show interfaces wireless wlan0 scanDisable power saving on the clients.
Integration with other services
DHCP server
set service dhcp-server shared-network-name WIFI subnet 192.168.10.0/24 range 0 start 192.168.10.100
set service dhcp-server shared-network-name WIFI subnet 192.168.10.0/24 range 0 stop 192.168.10.200
set service dhcp-server shared-network-name WIFI subnet 192.168.10.0/24 option default-router 192.168.10.1
set service dhcp-server shared-network-name WIFI subnet 192.168.10.0/24 option name-server 8.8.8.8
set interfaces wireless wlan0 address 192.168.10.1/24
commitDNS Forwarding
set service dns forwarding listen-address 192.168.10.1
set service dns forwarding allow-from 192.168.10.0/24
commitNAT (Internet access)
set nat source rule 100 outbound-interface name eth0
set nat source rule 100 source address 192.168.10.0/24
set nat source rule 100 translation address masquerade
commitFirewall
Restricting Guest WiFi:
# Allow only Internet, block the local network
set firewall ipv4 name GUEST-OUT default-action drop
set firewall ipv4 name GUEST-OUT rule 10 action accept
set firewall ipv4 name GUEST-OUT rule 10 state established
set firewall ipv4 name GUEST-OUT rule 10 state related
set firewall ipv4 name GUEST-OUT rule 20 action accept
set firewall ipv4 name GUEST-OUT rule 20 destination address !192.168.0.0/16
set firewall interface wlan0 out name GUEST-OUT
commitQoS for VoIP
set traffic-policy shaper WIFI-QOS bandwidth 100mbit
set traffic-policy shaper WIFI-QOS class 10 bandwidth 30%
set traffic-policy shaper WIFI-QOS class 10 priority 1
set traffic-policy shaper WIFI-QOS class 10 match VOIP ip dscp ef
set interfaces wireless wlan0 traffic-policy out WIFI-QOS
commitVLAN for multiple SSIDs
# Corporate SSID - VLAN 10
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 ssid 'Corporate'
set interfaces wireless wlan0 vif 10 address 10.0.10.1/24
# Guest SSID - VLAN 20
set interfaces wireless wlan0-1 type access-point
set interfaces wireless wlan0-1 ssid 'Guest'
set interfaces wireless wlan0-1 vif 20 address 10.0.20.1/24
commitMonitoring and diagnostics
Continuous monitoring
monitor interfaces wireless wlan0 trafficCapturing WiFi traffic
monitor traffic interface wlan0With a filter:
monitor traffic interface wlan0 filter 'port 80 or port 443'Collecting statistics
Script for monitoring clients:
#!/bin/bash
while true; do
clear
echo "WiFi Clients - $(date)"
echo "================================"
/opt/vyatta/bin/vyatta-op-cmd-wrapper show interfaces wireless wlan0 station
sleep 5
doneSecurity
Recommendations
- Use WPA3 if all clients support it
- WPA2-Enterprise for corporate networks
- Isolate Guest WiFi from the main network
- Disable WPS (not supported in VyOS)
- Hide the SSID for additional security
- MAC filtering as an extra layer
- Change passwords regularly
- Enable Management Frame Protection
- Limit the maximum number of clients
- Monitor connected devices
Guest network isolation
# Guest WiFi
set interfaces wireless wlan0 type access-point
set interfaces wireless wlan0 ssid 'Guest'
set interfaces wireless wlan0 address 172.16.99.1/24
set interfaces wireless wlan0 isolate-stations
# Firewall - Internet only
set firewall ipv4 name GUEST-TO-LAN default-action drop
set firewall zone guest from local firewall name GUEST-TO-LAN
set firewall zone guest interface wlan0
# NAT for Internet
set nat source rule 200 outbound-interface name eth0
set nat source rule 200 source address 172.16.99.0/24
set nat source rule 200 translation address masquerade
commitPerformance
Optimization for high load
set interfaces wireless wlan0 wmm
set interfaces wireless wlan0 max-stations 100
set interfaces wireless wlan0 beacon-interval 100
set interfaces wireless wlan0 dtim-period 1
# For 802.11ac/ax
set interfaces wireless wlan0 mode ac
set interfaces wireless wlan0 channel-width 80
commitPerformance monitoring
show interfaces wireless wlan0 statistics
show interfaces wireless wlan0 stationBest practices
Channel planning
- Use 1, 6, 11 for 2.4 GHz
- Avoid overlap with neighboring networks
- 5 GHz is preferable for high performance
Security
- WPA2 minimum, WPA3 preferred
- Enterprise (RADIUS) for business
- Guest network isolation
Performance
- 5 GHz for high speed
- 80/160 MHz channels for 802.11ac/ax
- WMM for QoS
- Limiting the number of clients
Reliability
- Backup RADIUS servers
- Monitoring connected clients
- Event logging
Documentation
- Description of all SSIDs
- Coverage map
- List of MAC addresses (if filtering is used)
Regulatory compliance
- Correct country code
- Compliance with transmit power limits
- DFS for 5 GHz channels
Limitations
- Performance depends on the WiFi adapter
- Not all adapters support AP mode
- WPA3 requires modern hardware
- DFS channels may switch when radar is detected
- The number of simultaneous SSIDs is limited by the hardware
- Monitor mode may not be supported by all adapters
Hardware compatibility check
List of supported adapters:
show interfaces wirelessChecking capabilities:
show interfaces wireless wlan0 capabilitiesLinux drivers with good AP mode support:
- ath9k (Atheros)
- ath10k (Atheros)
- iwlwifi (Intel)
- rt2800 (Ralink)
- rtl8xxxu (Realtek)
Next steps
- Firewall - protecting the wireless network
- DHCP Server - automatic client configuration
- NAT - providing Internet access
- QoS - traffic prioritization
- VPN - secure remote access