MDS 05-6628A01, Rev. B
MDS Orbit MCR-4G Technical Manual
29
VLAN Operation
Understanding
Virtual Local Area Networks (VLANs) are generic interface types in the MCR-4G, and can be assigned
unique IP addresses. They are treated the same as any other interface type, but they offer a way to link traffic
between interface ports. As such, a VLAN device can be thought of as a “bridging device.”
Setup
To setup a VLAN, you must first create one or more VLAN interfaces. Two sample commands are shown
below for doing this; one with an ID of
99
and another with an ID of
300
:
set interfaces interface mgmt_vlan virtual-type vlan vlan-config vlan-id 99
set interfaces interface video_vlan virtual-type vlan vlan-config vlan-id 300
Operational Modes
VLAN interfaces can have three separate modes:
none
(default),
trunk
, or
access
. These modes are used to
set interface behavior, and examples of their use are provided below.
Trunk:
To add
ETH1
as a trunk (tagged) port in both defined VLANs above, the command is:
set interfaces interface ETH1 vlan-mode trunk vlans [ video_vlan mgmt_vlan ]
By issuing these commands, two bridges are created internally, which are background operations, hidden
from the user. (In this case, the two bridges are
br_vlan99
and
br_vlan300
).
When an interface is specified as a trunk member of the VLAN, the system creates a Linux VLAN interface
(
eth0.99 & eth0.300
) which strips off VLAN tags on ingress, and applies them on egress. This new device is
then added as a member of the
br_vlan99 & br_vlan300
bridges.
Access:
To set
ETH2
as an access port for
video_vlan
the command is:
set interfaces interface ETH2 vlan-mode access vlan video_vlan
This command adds the
ETH2
interface as a member of the
br_vlan300
bridge, although it is not outwardly
apparent to the user.
Native VLANs
A VLAN device may also be specified as a “native” VLAN, and this is set by the command:
set interfaces interface my_native_vlan virtual-type vlan vlan-config vlan-id 600 native-vlan true
As in the earlier examples, native VLANs are nothing more than a bridge, but they cannot have trunk ports.
It should also be understood that bridges cannot contain other bridges. For this reason, it is not possible to
assign a bridge interface to a VLAN. Also, VLANs serve as interfaces, so you can assign IP addresses to
them and treat them the same as any other interface type.