COMPANY CONFIDENTIAL
69
3.3 VLAN Configuration
The Linux utility “vconfig” is provided to enable IEEE 802.1QVLAN support. A VLAN is a “virtual” network that
coexists over an actual physical interface, but only stations that are configured to interface to the VLAN participate in
network traffic on the VLAN. Normally VLANs have a DHCP server that provides an IP address for the VLAN
interface. Typically, some sort of security is required to start participation on a VLAN, but this is the responsibility of
higher layers (such as the DHCP server).
The APUP script is can configure the AP with VLANS in mBSSID mode. To configure VLANS, AP_STARTMODE
need to be set to
multivlan
and variables
AP_VLAN, AP_VLAN_2, AP_VLAN_3
and
AP_VLAN_4
need to be set to
corresponding VLAN tag values. For security support AP_SECMODE and AP_SECFILE variables need to be set and
corresponding security feature will be activated on tagged interface.
# export AP_STARTMODE=multivlan
# export AP_SSID=FirstSSID
# export AP_VLAN=2
# export AP_SSID_2=SecondSSID
# export AP_VLAN=3
# export AP_SSID_3=ThirdSSID
# export AP_SECMODE_3=WPA
# export AP_SECFILE_3=wpa2-psk.conf
# export AP_SSID_4=FourthSSID
# export AP_VLAN_4=10
# export AP_SECMODE_4=WPA
# export AP_SECFILE_4=wpa2EAP.conf
# apup
After “apup” necessary bridges with names br2 , br3, br4 and br5 will be configured with corresponding tagged
athx.
tag
,
eth0.
tag
and
eth1.
tag
interfaces. The remainder of this section explains Linux commands to
configure singe VLAN interface on AP.
The vconfig command is quite straightforward. The following commands are used (taken from the Linux MAN pages).
Note the added # to indicate the command prompt:
To Add an interface to a VLAN
#vconfig add [interface-name] [vlan-id]
creates a vlan-device on [interface-name] (typically ath0 or ath1 in our scenarios). The
resulting vlan-device will be called according to the naming convention set.
To remove a VLANinterface
#vconfig rem [vlan-device]
Removes the named vlan-device
To configure the VLANinterface
#vconfig set_flag [vlan-device] 0 | 1
When 1, Ethernet header reorders are turned on. Dumping the device will appear as a common Ethernet device
without VLANs. When 0(default) however, Ethernet headers are not reordered, which results in vlan tagged
packets when dumping the device. Usually the default gives no problems, but some packet filtering programs
might have problems with it
#vconfig set_egress_map [vlan-device] [skb-priority] [vlan-qos]
This flags that outbound packets with a particular skb-priority should be tagged with the particular vlan priority
vlan-qos. The default vlan priority is 0.
#vconfig set_ingress_map [vlan-device] [skb-priority] [vlan-qos]
This flags that inbound packets with the particular vlan priority vlan-qos should be queued with a particular
skb-priority. The default skb-priority is 0.
#vconfig set_name_type VLAN_PLUS_VID | VLAN_PLUS_VID_NO_PAD | DEV_PLUS_VID | DEV_PLUS_VID_NO_PAD
Sets the way vlan-device names are created. Use vconfig without arguments to see the different formats.
Additional description of VLAN configuration can be found at the URL:
http://www.linuxjournal.com/article/7268