- Create VLAN 10 and VLAN20.
- Select Switching > VLAN > Advanced > VLAN Configuration.
A screen similar to the following displays.

- In the VLAN ID field, enter 10.
- In the VLAN Name field, enter VLAN10.
- In the VLAN Type list, select Static.
- Click Add.
- Select Switching > VLAN > Advanced > VLAN Configuration.
A screen similar to the following displays.

- In the VLAN ID field, enter 20.
- In the VLAN Name field, enter VLAN20.
- In the VLAN Type list, select Static.
- Click Add.
- Select Switching > VLAN > Advanced > VLAN Configuration.
- Add ports to the VLAN10 and VLAN20.
- Select Switching > VLAN > Advanced > VLAN Membership.
A screen similar to the following displays.

- In the VLAN ID field, select 10.
- Click the Unit 1. The ports display.
- Click the gray boxes under ports 1 and 2 until T displays.
The T specifies that the egress packet is tagged for the port.
- Click Apply.
- Select Switching > VLAN > Advanced > VLAN Membership.
A screen similar to the following displays.

- In the VLAN ID list, select 20.
- Click Unit 1. The ports display.
- Click the gray box under port 3 until T displays.
The T specifies that the egress packet is tagged for the port.
- Click Apply.
- Select Switching > VLAN > Advanced > VLAN Membership.
- Assign PVID to VLAN10 and VLAN20.
- Select Switching > VLAN > Advanced > Port PVID Configuraton.
A screen similar to the following displays.

- Scroll down and select 1/0/1 and 1/0/2 check boxes.
- In the PVID (1 to 4093) field, enter 10.
- Click Apply to save the settings.
- Select Switching > VLAN > Advanced > Port PVID Configuraton.
A screen similar to the following displays.

- Scroll down and select the 1/0/3 check box.
- In the PVID (1 to 4093) field, enter 20.
- Click Apply to save the settings.
- Select Switching > VLAN > Advanced > Port PVID Configuraton.
For more information, see the following support articles:
- What is VLAN routing and how does it work with my managed switch?
- What does a typical network that includes a managed switch, configured to support VLAN routing, look like?
- How do I create two VLANs using CLI commands on my managed switch to support VLAN routing?
This article applies to the following managed switches and their respective firmware:
- M5300 - firmware version 10.0.0.x
-
- M5300-28G (GSM7228S)
- M5300-5G (GSM7252S)
- M5300-28G3 (GSM7328Sv2h2)
- M5300-52G3 (GSM7352Sv2h2)
- M5300-28G_POE+ (GSM7228PSv1h2)
- M5300-52G-POE+ (GSM7252PSv1h2)
- M5300-28GF3 (GSM7328FSv2)
- M4100 - firmware version 10.0.1.x
-
- M4100-26G (GSM7224v2h2)
- M4100-50G (GSM7248v2h2)
- M4100-26G-POE (GSM7226Pv1h1)
- M4100-50G-POE+ (GSM7248Pv1h1)
- M4100-26G-POE (FSM7226Pv1h1)
- M4100-50-POE (FSM7250Pv1h1)
- M4100-D12G (GSM5212v1h1)
- M4100-D10-POE (FSM5210Pv1h1)
- M7100 - firmware version 10.0.1.x
-
- M7100-24X (XSM7224)
- XSM7224S - firmware version 9.0.1.x