Configuring a VLAN Interface
Overview
By default, the native VLAN of all physical interfaces is VLAN 1, which can implement Layer 2 communication. To implement Layer 3 communication between users in different VLANs and network segments, you can configure the VLAN interface, which is a Layer 3 logical interface.
Procedure
Step1 In the configuration mode, create a VLAN.
The VLAN ID has been pre-configured in system from version 4.3.2 and you don’t need to configure it.
set vlans vlan-id <vlan-id>
|
---|
Step2 Specify the created VLAN as the native VLAN for a physical interface.
set interface gigabit-ethernet <interface-name> family ethernet-switching native-vlan-id <vlan-id> |
---|
Step3 Associate a Layer 3 interface with the VLAN.
set vlans vlan-id <vlan-id> l3-interface <interface-name>
|
---|
Step4 Configure an IP address for the VLAN interface.
set l3-interface vlan-interface <vlan-id> address <ipv4-address | ipv6-address> prefix-length <prefix-number> |
---|
Step5 Commit the configuration.
commit |
---|
Verifying the Configuration
After the configuration is completed, in the configuration mode, use run show l3-interface vlan-interface <vlan-id> command to view the state, IP address, MAC address, VLAN, MTU, description and traffic statistics.
Other Configurations
To clear the configuration of VLAN interface, use delete l3-interface vlan-interface <vlan-id> command.
Copyright © 2024 Pica8 Inc. All Rights Reserved.