Configure VLAN interface (802.1Q)

We can use one mBox to support multiple VLANs on one physical interface using standard 802.1Q, which is the networking standard that supports virtual LANs (VLANs) on an Ethernet network.

In other words, we can “split” a physical interface into multiple logical interface and assign/tag each logical interface into a virtual network (VLAN). Each logical VLAN interface is also called sub-interface.

When configuring bridging interfaces, following conditions apply:

    • Each VLAN interface is a layer 3 logical interface, assign IP address to VLAN interface.
    • By default physical interface is in VLAN 1
    • Connected peer (eg. switch port) must be enabled with 802.1q trunking and the configured VLANs must be allowed by the switch trunk port

CONFIGURATION STEPS

    • enable physical interface (to be splitted)
    • configure and each VLAN interface
    • configuration interface settings for each interface

SUMMARY STEPS

enableconfigureinterface eth ethernet_port_umberinterface vlan ethernet_port_number vlan_idip address ip_address/prefix (no ip address ip_address/prefix)

CONFIGURATION EXAMPLES

mbox> enablembox#mbox# configurembox(config-if)# interface eth1mbox(config-if)# enablembox(config-if)# exitmbox(config)#mbox(config-if)# interface vlan 1 20mbox(config-if)# enablembox(config-if)# ip address 20.20.20.254/24mbox(config-if)# exitmbox(config)#mbox(config-if)# interface vlan 1 30mbox(config-if)# enablembox(config-if)# ip address 30.30.30.254/24mbox(config-if)# exitmbox(config)#mbox(config-if)# interface vlan 1 40mbox(config-if)# enablembox(config-if)# ip address 40.40.40.254/24mbox(config-if)# exitmbox(config)# exitmbox# show interface bridge 0 ::::::::::::::vlan20::::::::::::::vlan20 VID: 20 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 1040301492 total bytes received 165514203278 Broadcast/Multicast Rcvd 8051501 total frames transmitted 1269343075 total bytes transmitted 1424771774634Device: eth1INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0EGRESS priority mappings:::::::::::::::vlan30::::::::::::::vlan30 VID: 30 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 68183057 total bytes received 13575428876 Broadcast/Multicast Rcvd 1042707 total frames transmitted 56711123 total bytes transmitted 3067186418Device: eth1INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0EGRESS priority mappings:::::::::::::::vlan40::::::::::::::vlan40 VID: 40 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 33654959 total bytes received 3658452458 Broadcast/Multicast Rcvd 8299469 total frames transmitted 4620100 total bytes transmitted 888000713Device: eth1INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0EGRESS priority mappings:

Attached sample config showing vlans on bonding interfaces

  • eth2 & eth3 are placed into a bonding group 1, running LACP with core switch
  • VLAN900 & 901 are tagged to bond1
  • VLAN900 runs hotspot services, bandwidth control is done within hotspot instance
  • VLAN901 provides direct connection, bandwidth control is done by firewall-limit rules