Configuring Port-based VLAN


Virtual Local Area Network (VLAN) technology divides a physical LAN into multiple broadcast domains, each of which is called a VLAN. VLAN tagging (IEEE 802.1Q) is a networking standard that defines the VLAN. Hosts within a VLAN can communicate with each other but cannot communicate directly with hosts in other VLANs. Consequently, broadcast packets are confined to within a single VLAN.

You can configure a physical 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 only belong to native VLAN, while trunk ports belong to more than one VLAN, including the native VLAN.

If hosts in different VLANs need to communicate, configure inter-VLAN communication. A VLAN interface is a Layer 3 logical interface and can implement inter-VLAN Layer 3 connectivity. Each VLAN corresponds to a VLAN interface. An IP address can be assigned to each VLAN interface. For details about VLAN interface configuration, see Layer 3 VLAN Interface Configuration.

NOTE:

When configuring VLAN member, use VLAN ID or VLAN range, but NOT other strings.

 

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

NOTE:

VLAN IDs (VLAN 1-4094) have been pre-configured in the system from version 4.3.2 and are not user-deletable. Users no longer need to use command set vlans vlan-id <vlan-id> to create VLAN IDs.

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 type: Static VLAN Name: default Description: Vlan-interface: Routed-interface: Number of member ports: 1 Untagged port: ge-1/1/1 Tagged port: None 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 Vlan Name 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 dafault 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 

Configuring the CPU Egress Rate Limit for an VLAN Interface

Creating a VLAN within the VLAN Range

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.

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.

 

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.