Wireless Interfaces

From VyOS Wiki
Jump to: navigation, search

Warning! VyOS 1.2 Only!

This has only been tested on VyOS 1.2, which is currently under active development and has not yet been released!

If you wish to try this, it may work on earlier versions, but has only been validated on VyOS 1.2. You can download the latest Daily Build of 1.2 directly from the daily build server. This may not be suitable for production use.

Certain Wireless Devices (TODO: Add list of supported devices) are configurable via VyOS. If your device is configurable, it will appear as a 'wlan' device in 'show interfaces'

vyos@example.com:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             10.20.30.1/24                     u/u
eth1             -                                 u/D
eth2             -                                 u/D
eth3             10.40.1.1/24                      u/u
eth3.20          -                                 u/u
eth3.30          192.168.5.10/24                   u/u
eth3.40          203.1.2.1/24                      u/u
eth3.60          203.2.3.1/24                      u/u
eth3.100         192.168.15.2/24                   u/u
lo               127.0.0.1/8                       u/u
                 ::1/128
pppoe0           203.4.5.6                         u/u
wlan0            -                                 u/u
vyos@example.com:~$

You can configure these interfaces under 'set interface wireless'. An example configuration as an access point is below.

wireless wlan0 {
    address 192.168.99.1/24
    channel 1
    mode g
    security {
        wpa {
            mode wpa2
            passphrase "Your WPA Password Goes Here"
        }
    }
    ssid "Your SSID Goes Here"
    type access-point
}

Note that hw-id and physical-device will be automatically propagated and do not need to be configured.

To set a regulatory domain use the following command and adjust country code as required.

set system wifi-regulatory-domain DE

You should also set up a DHCP server to work with that network

shared-network-name wifi {
    authoritative enable
    subnet 192.168.99.0/24 {
        default-router 192.168.99.1
        dns-server 8.8.8.8
        lease 86400
        start 192.168.99.20 {
            stop 192.168.99.190
        }
    }
}