Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

VLAN tagging (IEEE 802.1Q) is a networking standard that defines the VLAN. You can configure a port as either a trunk or an access port. With the native VLAN ID, you can add the port (in trunk mode) to more than one VLAN. Access ports belong to native VLANs, while trunk ports belong to more than one VLAN, including the native VLAN.

Configure the Access/Trunk Mode

admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode trunk
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus# 

Configure the Native VLAN ID

The native VLAN ID is the ID of the default VLAN (usually vlan-id 1) in which the port belongs. Every port should be included in at least one VLAN.

admin@XorPlus# set vlans vlan-id 5
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 5
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus# run show vlans vlan-id 5
VLAN ID: 5
VLAN Name: default 
Description: 
vlan-interface: 
Number of member ports: 1 
Tagged port: None
Untagged port: ge-1/1/1, 
admin@XorPlus# 

 Add a Port to a VLAN with Tagged Packet

admin@XorPlus# set vlans vlan-id 5
admin@XorPlus# set vlans vlan-id 6
admin@XorPlus# set vlans vlan-id 7
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 5
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 6
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 7
admin@XorPlus# commit 
Commit OK.
Save done.

admin@XorPlus# run show vlans 
VlanID   Tag        Interfaces 
------   --------   ------------------------------------------------------ 
1        untagged   ge-1/1/1, ge-1/1/2, ge-1/1/3, ge-1/1/4, ge-1/1/5                     
		    ge-1/1/6, ge-1/1/7, ge-1/1/8, ge-1/1/9, ge-1/1/10                     
                    ge-1/1/11, ge-1/1/12, ge-1/1/13, ge-1/1/14, ge-1/1/15                     
                    ge-1/1/16, ge-1/1/17, ge-1/1/18, ge-1/1/19, ge-1/1/20                     
                    ge-1/1/21, ge-1/1/22, ge-1/1/23, ge-1/1/24, te-1/1/25                     
                    te-1/1/26, te-1/1/27, te-1/1/28, te-1/1/29, te-1/1/30          
         tagged     
5        untagged             
         tagged     ge-1/1/2
6        untagged             
         tagged     ge-1/1/2
7        untagged             
         tagged     ge-1/1/2

 Add a Port to a VLAN with Untagged Packet

 

admin@XorPlus# set vlans vlan-id 5 
admin@XorPlus# set vlans vlan-id 6 
admin@XorPlus# set vlans vlan-id 7 
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode trunk 
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 5 untagged
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 6 untagged
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 7 untagged
admin@XorPlus# commit 
Commit OK. 
Save done.
admin@XorPlus# run show vlans 
VlanID   Tag        Interfaces 
------   --------   ------------------------------------------------------ 
1        untagged   ge-1/1/1, ge-1/1/2, ge-1/1/3, ge-1/1/4, ge-1/1/5                     
		    ge-1/1/6, ge-1/1/7, ge-1/1/8, ge-1/1/9, ge-1/1/10                     
                    ge-1/1/11, ge-1/1/12, ge-1/1/13, ge-1/1/14, ge-1/1/15                     
                    ge-1/1/16, ge-1/1/17, ge-1/1/18, ge-1/1/19, ge-1/1/20                     
                    ge-1/1/21, ge-1/1/22, ge-1/1/23, ge-1/1/24, te-1/1/25                     
                    te-1/1/26, te-1/1/27, te-1/1/28, te-1/1/29, te-1/1/30          
         tagged      
5        untagged   ge-1/1/2          
         tagged     
6        untagged   ge-1/1/2          
         tagged      
7        untagged   ge-1/1/2          
         tagged     


Creating a VLAN within the VLAN Range

You can create VLANs within the VLAN range, and then add ports to these VLANs. 
admin@XorPlus# set vlans vlan-id 2-4094
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode trunk
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching vlan members 1-4094
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 1-4094
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching vlan members 1-4094
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus# 

VLAN Configuration Example

In the following topology, the VLANs are configured for each switch.



Figure 4-1.VLAN configuration.

Configuring Switch A

For Switch A, you should configure ge-1/1/1 through ge-1/1/4 as access ports and te-1/1/49 as the trunk port because the 10Gbit link will trunk the traffic of VLAN-2 and VLAN-3.

admin@XorPlus# set vlans vlan-id 2
admin@XorPlus# set vlans vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching native-vlan-id 3
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching port-mode trunk
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching vlan members 2
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching vlan members 3
admin@XorPlus# commit 
Commit OK.
Save done.
admin@XorPlus#
admin@XorPlus# run show vlans 
VlanID   Tag                    Interfaces
------ -------- ------------------------------------------------------
1 tagged
  untagged 	ge-1/1/5, ge-1/1/6, ge-1/1/7, ge-1/1/8, ge-1/1/9, 
		ge-1/1/10, ge-1/1/11, ge-1/1/12, ge-1/1/13, ge-1/1/14, 
		ge-1/1/15, ge-1/1/16, ge-1/1/17, ge-1/1/18, ge-1/1/19, 
		ge-1/1/20, ge-1/1/21, ge-1/1/22, ge-1/1/23, ge-1/1/24, 
		ge-1/1/25, ge-1/1/26, ge-1/1/27, ge-1/1/28, ge-1/1/29, 
		ge-1/1/30, ge-1/1/31, ge-1/1/32, ge-1/1/33, ge-1/1/34, 
		ge-1/1/35, ge-1/1/36, ge-1/1/37, ge-1/1/38, ge-1/1/39, 
		ge-1/1/40, ge-1/1/41, ge-1/1/42, ge-1/1/43, ge-1/1/44, 
		ge-1/1/45, ge-1/1/46, ge-1/1/47, ge-1/1/48, te-1/1/49, 
		te-1/1/50, te-1/1/51, te-1/1/52, 
2 tagged 	te-1/1/49, 
  untagged 	ge-1/1/1, ge-1/1/2, 
3 tagged 	te-1/1/49, 
  untagged      ge-1/1/3, ge-1/1/4, 
admin@XorPlus# 

Configuring Switch B

For Switch B, configure ge-1/1/1 through ge-1/1/4 as access ports and te-1/1/49 as the trunk port because the 10 Gbit link will trunk the traffic of VLAN-2 and VLAN-3.

admin@XorPlus# set vlans vlan-id 2
admin@XorPlus# set vlans vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching port-mode access
admin@XorPlus# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching native-vlan-id 3
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching port-mode trunk
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching vlan members 2
admin@XorPlus#set interface gigabit-ethernet te-1/1/49 family ethernet-switching vlan members 3
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus#
admin@XorPlus# run show vlans 
VlanID 	Tag                   Interfaces
------ -------- ------------------------------------------------------
1 tagged 
  untagged 	ge-1/1/5, ge-1/1/6, ge-1/1/7, ge-1/1/8, ge-1/1/9, 
		ge-1/1/10, ge-1/1/11, ge-1/1/12, ge-1/1/13, ge-1/1/14, 
		ge-1/1/15, ge-1/1/16, ge-1/1/17, ge-1/1/18, ge-1/1/19, 
		ge-1/1/20, ge-1/1/21, ge-1/1/22, ge-1/1/23, ge-1/1/24, 
		ge-1/1/25, ge-1/1/26, ge-1/1/27, ge-1/1/28, ge-1/1/29, 
		ge-1/1/30, ge-1/1/31, ge-1/1/32, ge-1/1/33, ge-1/1/34, 
		ge-1/1/35, ge-1/1/36, ge-1/1/37, ge-1/1/38, ge-1/1/39, 
		ge-1/1/40, ge-1/1/41, ge-1/1/42, ge-1/1/43, ge-1/1/44, 
		ge-1/1/45, ge-1/1/46, ge-1/1/47, ge-1/1/48, te-1/1/49, 
		te-1/1/50, te-1/1/51, te-1/1/52, 
2 tagged 	te-1/1/49, 
  untagged      ge-1/1/1, ge-1/1/2, 
3 tagged        te-1/1/49, 
  untagged      ge-1/1/3, ge-1/1/4,

 

 

  • No labels