VLAN tagging in CDRouter

CDRouter supports 802.1Q VLAN tagging on both WAN and LAN interfaces. Additionally, WAN interfaces can be configured with “stacked” VLANs by inserting an 802.1ad tag or two 802.1Q (“QinQ”) tags.

When VLAN tagging is enabled on an interface, CDRouter will insert the configured VLAN tags into all frames that it sends, and will only process frames received with the corresponding tag(s). Any untagged frames, or frames tagged with a different VLAN ID will be dropped.

802.1Q VLANs

Typical VLANs are configured with a single 802.1Q tag to indicate which VLAN a packet belongs to and its Quality of Service (QoS) priority.

  • LAN Interface
testvar lanVlanId                        200
testvar lanVlanPriority                  0
  • WAN Interface
testvar wanVlanId                        100
testvar wanVlanPriority                  0

Stacked VLANs

When stacked VLAN support is enabled within CDRouter, a maximum of one outer tag (S-tag or service tag) and one inner tag (C-tag or customer tag) can be configured. In addition, priorities can be set for both the outer and inner tags.

By default, CDRouter follows the 802.1ad standard of VLAN stacking, setting the TPID (Tag Protocol ID) of the S-tag to 0x88a8. The C-tag is an 802.1Q VLAN tag with TPID 0x8100.

802.1ad tagging

testvar enableVlanStacking               yes

testvar wanInnerVlanId                   100
testvar wanInnerVlanPriority             0

testvar wanOuterVlanId                   200
testvar wanOuterVlanPriority             0
testvar wanOuterVlanQinQ                 no

802.1Q “QinQ” tagging

Some older devices support “QinQ” style VLAN stacking, using 802.1q VLAN tags (0x8100) for both the outer and inner tags. Setting the wanOuterVlanQinQ testvar is set to “yes” will cause CDRouter to use “QinQ” style VLAN stacking when working with these devices.

testvar enableVlanStacking               yes

testvar wanInnerVlanId                   100
testvar wanInnerVlanPriority             0

testvar wanOuterVlanId                   200
testvar wanOuterVlanPriority             0
testvar wanOuterVlanQinQ                 yes

When stacked VLANs are enabled the testvars wanVlanId and wanVlanPriority are ignored, and any packets that are received on the WAN without the specified outer and inner tags will be dropped.