OcNOS-DC : Layer 2 Guide : Layer 2 Configuration Guide : VLAN Configuration
VLAN Configuration
This chapter contains a complete VLAN configuration.
Configuring VLAN Tags
Topology
This shows configuring a VLAN bridge with VLAN tags on forwarding frames. Link between Bridge 1 and Bridge 2 is configured as VLAN 5 and link between Bridge 3 and Bridge 1 is configured as VLAN 10. Link between Bridge 2 and Bridge 3 is configured with VLAN 5 and VLAN 10.
VLAN Topology
Note: Run the switchport command on each port to change to Layer-2 mode.
Bridge 1
 
Bridge1#configure terminal
Enter configuration mode
Bridge1(config)#bridge 1 protocol ieee vlan-bridge
Specify VLAN for bridge 1.
Bridge1(config)#vlan database
Enter the VLAN configuration mode.
Bridge1(config-if)#vlan 5 bridge 1 state enable
Enable VLAN (5) on bridge 1.Specifying the enable state allows forwarding of frames on this VLAN-aware bridge.
Bridge1(config-if)#vlan 10 bridge 1 state enable
Enable VLAN (10) on bridge 1. Specifying the enable state allows forwarding of frames on this VLAN-aware bridge.
Bridge1(config-if)#commit
Commit candidate configuration to be running configuration
Bridge1(config-if)#exit
Exit the VLAN configuration mode.
Bridge1(config)#interface xe1/1
Enter interface mode.
Bridge1(config-if)#switchport
Configure port as L2.
Bridge1(config-if)#bridge-group 1
Associate the interface with bridge group 1.
Bridge1(config-if)#switchport mode access
Set the switching characteristics of this interface to access mode.
Bridge1(config-if)#switchport access vlan 5
Enable VLAN ID 5 on this port.
Bridge1(config-if)#commit
Commit candidate configuration to be running configuration
Bridge1(config-if)#exit
Exit from the interface mode and go config mode.
Bridge1(config)#interface xe2/1
Enter interface mode.
Bridge1(config-if)#switchport
Configure port as L2.
Bridge1(config-if)#bridge-group 1
Associate the interface with bridge group 1.
Bridge1(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge1(config-if)#switchport trunk allowed vlan add 10
Enable VLAN ID 10 on this port.
Bridge1(config-if)#commit
Commit candidate configuration to be running configuration
Bridge1(config-if)#exit
Exit from the interface mode and go config mode.
Bridge1(config)#interface xe4/1
Enter interface mode.
Bridge1(config-if)#switchport
Configure port as L2.
Bridge1(config-if)#bridge-group 1
Associate the interface with bridge group 1.
Bridge1(config-if)#switchport mode access
Set the switching characteristics of this interface to access mode.
Bridge1(config-if)#switchport access vlan 10
Enable VLAN ID 10 on this port.
Bridge1(config-if)#commit
Commit candidate configuration to be running configuration
Bridge1(config-if)#exit
Exit from the interface mode and go config mode.
Bridge1(config)#interface xe10/1
Enter interface mode.
Bridge1(config-if)#switchport
Configure port as L2.
Bridge1(config-if)#bridge-group 1
Associate the interface with bridge group 1.
Bridge1(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge1(config-if)#switchport trunk allowed vlan add 5
Enable VLAN ID 5 on this port.
Bridge1(config-if)#commit
Commit candidate configuration to be running configuration
Bridge1(config-if)#exit
Exit from the interface mode and go config mode.
Bridge 2
 
Bridge2#configure terminal
Enter configure mode.
Bridge2(config)#bridge 2 protocol ieee vlan-bridge
Specify VLAN for bridge 2.
Bridge2(config)#vlan database
Enter the VLAN configuration mode.
Bridge2(config-vlan)#vlan 5 bridge 2 state enable
Enable VLAN (5) on bridge 2. Specifying the enable state allows forwarding of frames on this VLAN-aware bridge.
Bridge2(config-vlan)#vlan 10 bridge 2 state enable
Specifying the enable state allows forwarding of frames on this VLAN-aware bridge.
Bridge2(config-vlan)#commit
Commit candidate configuration to be running configuration
Bridge2(config-vlan)#exit
Exit the VLAN configuration mode.
Bridge2(config)#interface ce10/1
Enter interface mode.
Bridge2(config-if)#switchport
 
Bridge2(config-if)#bridge-group 2
Associate the interface with bridge group 2.
Bridge2(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge2(config-if)#switchport access vlan 5
Enable VLAN port access by specifying the VLAN ID 5 on this interface.
Bridge2(config-if)#switchport trunk allowed vlan add 10
Enable VLAN ID 10 on this port.
Bridge2(config-if)#switchport
Configure port as L2.
Bridge2(config-if)#bridge-group 2
Associate the interface with bridge group 2.
Bridge2(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge2(config-if)#switchport trunk allowed vlan add 5
Enable VLAN ID 5 on this port.
Bridge2(config-if)#switchport trunk allowed vlan add 10
Enable VLAN ID 10 on this port.
Bridge2(config-if)#commit
Commit candidate configuration to be running configuration
Bridge2(config-if)#exit
Exit from the interface mode and go config mode.
Bridge2(config)#interface ce11/1
Enter interface mode.
Bridge2(config-if)#switchport
Configure port as L2.
Bridge2(config-if)#bridge-group 2
Associate the interface with bridge group 2.
Bridge2(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge2(config-if)#switchport trunk allowed vlan add 5
Enable VLAN ID 5 on this port.
Bridge2(config-if)#switchport trunk allowed vlan add 10
Enable VLAN ID 10 on this port.
Bridge2(config-if)#commit
Commit candidate configuration to be running configuration
Bridge2(config-if)#exit
Exit from the interface mode and go config mode.
Bridge 3
 
Bridge3#configure terminal
Enter configure mode.
Bridge3(config)#bridge 3 protocol ieee vlan-bridge
Specify VLAN for bridge 3.
Bridge3(config)#vlan database
Enter the VLAN configuration mode.
Bridge3(config-vlan)#vlan 5 bridge 3 state enable
Enable VLAN (5) on bridge 3. Specifying the enable state allows forwarding of frames on this VLAN-aware bridge.
Bridge3(config-vlan)#vlan 10 bridge 3 state
enable
Enable VLAN (10) on bridge 3. Specifying the enable
state allows forwarding of frames on this VLAN-aware
bridge.
Bridge3(config-vlan)#commit
Commit candidate configuration to be running configuration
Bridge3(config-vlan)#exit
Exit the VLAN configuration mode.
Bridge3(config)#interface xe1/1
Enter interface mode.
Bridge3(config-if)#switchport
Configure port as L2.
Bridge3(config-if)#bridge-group 3
Associate the interface with bridge group 3.
Bridge3(config-if)#switchport mode access
Set the switching characteristics of this interface to access mode.
Bridge3(config-if)#switchport access vlan 5
Enable VLAN ID 5 on this port.
Bridge3(config-if)#switchport access vlan 10
Enable VLAN ID 10 on this port.
Bridge3(config-if)#commit
Commit candidate configuration to be running configuration
Bridge3(config-if)#exit
Exit from the interface mode and go config mode.
Bridge3(config)#interface xe2/1
Enter interface mode.
Bridge3(config-if)#switchport
Configure port as L2.
Bridge3(config-if)#bridge-group 3
Associate the interface with bridge group 3.
Bridge3(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge3(config-if)#switchport trunk allowed vlan add 10
Enable VLAN ID 10 on this port.
Bridge3(config-if)#commit
Commit candidate configuration to be running configuration
Bridge3(config-if)#exit
Exit from the interface mode and go config mode.
Bridge3(config)#interface xe11/1
Enter interface mode.
Bridge3(config-if)#switchport
Configure port as L2.
Bridge3(config-if)#bridge-group 3
Associate the interface with bridge group 3.
Bridge3(config-if)#switchport mode trunk
Set the switching characteristics of this interface to trunk mode.
Bridge3(config-if)#switchport trunk allowed vlan add 5
Enable VLAN ID 5 on this port.
Bridge3(config-if)#commit
Commit candidate configuration to be running configuration
Bridge3(config-if)#exit
Exit from the interface mode and go config mode.
Validation
Bridge 1
Bridge1#show spanning-tree
% 1: Bridge up - Spanning Tree Enabled
% 1: Root Path Cost 1 - Priority 32768
% 1: Forward Delay 15 - Hello Time 2 - Max Age 20 - Transmit Hold Count 6 - Root port 909
% 1: Root Id 8000001823304db6
% 1: Bridge Id 8000001823305244
% 1: 6 topology changes - last topology change Fri Apr 19 12:32:26 2019
% 1: portfast bpdu-filter disabled
% 1: portfast bpdu-guard disabled
% 1: portfast errdisable timeout disabled
% 1: portfast errdisable timeout interval 300 sec
% xe1/1: Port Number 905 - Ifindex 5001 - Port Id 0x8389 - path cost 4 - designated cost 1
% xe1/1: Designated Port Id 0x8389 - state Forwarding -Priority 128
% xe1/1: Designated root 8000001823304db6
% xe1/1: Designated Bridge 8000001823305244
% xe1/1: Message Age 1 - Max Age 20
% xe1/1: Hello Time 2 - Forward Delay 15
% xe1/1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0 - topo change timer 0
% xe1/1: forward-transitions 1
% xe1/1: No portfast configured - Current portfast off
% xe1/1: bpdu-guard default - Current bpdu-guard off
% xe1/1: bpdu-filter default - Current bpdu-filter off
% xe1/1: no root guard configured - Current root guard off
%
% xe2/1: Port Number 909 - Ifindex 5005 - Port Id 0x838d - path cost 1 - designated cost 0
% xe2/1: Designated Port Id 0x838d - state Forwarding -Priority 128
% xe2/1: Designated root 8000001823304db6
% xe2/1: Designated Bridge 8000001823304db6
% xe2/1: Message Age 0 - Max Age 20
% xe2/1: Hello Time 2 - Forward Delay 15
% xe2/1: Forward Timer 0 - Msg Age Timer 19 - Hello Timer 0 - topo change timer 0
% xe2/1: forward-transitions 2
% xe2/1: No portfast configured - Current portfast off
% xe2/1: bpdu-guard default - Current bpdu-guard off
% xe2/1: bpdu-filter default - Current bpdu-filter off
% xe2/1: no root guard configured - Current root guard off
%
% xe4/1: Port Number 917 - Ifindex 5013 - Port Id 0x8395 - path cost 4 - designated cost 1
% xe4/1: Designated Port Id 0x8395 - state Forwarding -Priority 128
% xe4/1: Designated root 8000001823304db6
% xe4/1: Designated Bridge 8000001823305244
% xe4/1: Message Age 1 - Max Age 20
% xe4/1: Hello Time 2 - Forward Delay 15
% xe4/1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1 - topo change timer 0
% xe4/1: forward-transitions 1
% xe4/1: No portfast configured - Current portfast off
% xe4/1: bpdu-guard default - Current bpdu-guard off
% xe4/1: bpdu-filter default - Current bpdu-filter off
% xe4/1: no root guard configured - Current root guard off
%
% xe10/1: Port Number 941 - Ifindex 5037 - Port Id 0x83ad - path cost 2 - designated cost 1
% xe10/1: Designated Port Id 0x83ad - state Forwarding -Priority 128
% xe10/1: Designated root 8000001823304db6
% xe10/1: Designated Bridge 8000001823305244
% xe10/1: Message Age 1 - Max Age 20
% xe10/1: Hello Time 2 - Forward Delay 15
% xe10/1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0 - topo change timer 0
% xe10/1: forward-transitions 2
% xe10/1: No portfast configured - Current portfast off
% xe10/1: bpdu-guard default - Current bpdu-guard off
% xe10/1: bpdu-filter default - Current bpdu-filter off
% xe10/1: no root guard configured - Current root guard off
%
B1#show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
1 1 xe2/1 0018.23cb.fbbc 1 300
1 1 xe10/1 cc37.ab97.37d8 1 300
1 5 xe1/1 0000.11bc.5dec 1 300
1 10 xe4/1 0000.2d50.205c 1 300
Bridge1#
 
 
Bridge1#show vlan all bridge 1
Bridge VLAN ID Name State H/W Status Member ports
(u)-Untagged, (t)-Tagged
======= ======= ================ ======= ========== ==========================
1 1 default ACTIVE Success xe1/1(u) xe2/1(u) xe4/1(u)
xe10/1(u)
1 5 VLAN0005 ACTIVE Success xe1/1(t) xe10/1(t)
1 10 VLAN0010 ACTIVE Success xe2/1(t) xe4/1(t)
 
 
Bridge1#show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
1 1 xe2/1 0018.23cb.fbbc 1 300
1 1 xe10/1 cc37.ab97.37d8 1 300
1 5 xe1/1 0000.11bc.5dec 1 300
1 10 xe4/1 0000.2d50.205c 1 300
Bridge1#
Bridge 2
Bridge2#show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
2 1 ce10/1 0018.2326.166a 1 300
2 1 ce11/1 0018.23cb.fbe0 1 300
2 1 ce11/1 cc37.ab97.37d8 1 300
2 5 ce10/1 0000.11bc.5dec 1 300
 
 
Bridge2#show vlan all bridge 2
Bridge VLAN ID Name State H/W Status Member ports
(u)-Untagged, (t)-Tagged
======= ======= ================ ======= ========== ==========================
2 1 default ACTIVE Success ce10/1(u) ce11/1(u)
2 5 VLAN0005 ACTIVE Success ce10/1(t) ce11/1(t)
2 10 VLAN0010 ACTIVE Success ce10/1(t) ce11/1(t)
 
 
Bridge2#show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
2 1 ce10/1 0018.2326.166a 1 300
2 1 ce11/1 0018.23cb.fbe0 1 300
2 1 ce11/1 cc37.ab97.37d8 1 300
2 5 ce10/1 0000.11bc.5dec 1 300
Bridge 3
Bridge3# show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
3 1 xe2/1 cc37.ab97.37d8 1 300
3 5 xe11/1 0000.11bc.5dec 1 300
3 10 xe2/1 0000.2d50.205c 1 300
Bridge3#show vlan all bridge 3
Bridge VLAN ID Name State H/W Status Member ports
(u)-Untagged, (t)-Tagged
======= ======= ================ ======= ========== ==========================
3 1 default ACTIVE Success xe1/1(u) xe2/1(u) xe11/1(u)
3 5 VLAN0005 ACTIVE Success xe1/1(t) xe11/1(t)
3 10 VLAN0010 ACTIVE Success xe1/1(t) xe2/1(t)
 
 
Bridge3#show bridge
Ageout time is global and if something is configured for vxlan then it will be affected here also
Bridge CVLAN SVLAN BVLAN Port MAC Address FWD Time-out
---------+------+------+------+-----------+-----------------+-----+---------+
3 1 xe2/1 cc37.ab97.37d8 1 300
3 5 xe11/1 0000.11bc.5dec 1 300
3 10 xe2/1 0000.2d50.205c 1 300
Bridge3#