Configuring 802 1q Vlan
Configuring 802 1q Vlan
1Q VLAN
CHAPTERS
1. Overview
2. 802.1Q VLAN Configuration
3. Configuration Example
4. Appendix: Default Parameters
Configuring 802.1Q VLAN Overview
1 Overview
VLAN (Virtual Local Area Network) is a network technique that solves broadcasting issues
in local area networks. It is usually applied in the following occasions:
To restrict broadcast domain: VLAN technique divides a big local area network into
several VLANs, and all VLAN traffic remains within its VLAN. It reduces the influence of
broadcast traffic in Layer 2 network to the whole network.
To enhance network security: Devices from different VLANs cannot achieve Layer 2
communication, and thus users can group and isolate devices to enhance network
security.
For easier management: VLANs group devices logically instead of physically, so devices
in the same VLAN need not be located in the same place. It eases the management of
devices in the same work group but located in different places.
Configuration Guide 1
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
Configuration Guide 2
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
Choose the menu L2 FEATURES > VLAN > 802.1Q VLAN > VLAN Config and click
to load the following page.
Figure 2-1 Configuring VLAN
VLAN ID Enter a VLAN ID for identification with the values between 2 and 4094.
2) Select the untagged port(s) and the tagged port(s) respectively to add to the created
VLAN based on the network topology.
Configuration Guide 3
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
Untagged port The selected ports will forward untagged packets in the target VLAN.
Tagged port The selected ports will forward tagged packets in the target VLAN.
3) Click Apply.
Choose the menu L2 FEATURES > VLAN > 802.1Q VLAN > Port Config to load the
following page.
Figure 2-1 Configuring the Port
PVID Set the default VLAN ID of the port. Valid values are from 1 to 4094. It is used
mainly in the following two ways:
When the port receives an untagged packet, the switch inserts a VLAN tag to the
packet based on the PVID.
Ingress Checking Enable or disable Ingress Checking. With this function enabled, the port will
accept the packet of which the VLAN ID is in the port’s VLAN list and discard
others. With this function disabled, the port will forward the packet directly.
Acceptable Frame Select the acceptable frame type for the port and the port will perform this
Types operation before Ingress Checking.
Admit All: The port will accept both the tagged packets and the untagged
packets.
Tagged Only: The port will accept the tagged packets only.
Configuration Guide 4
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
LAG Displays the LAG (Link Aggregation Group) which the port belongs to.
Details Click the Details button to view the VLANs to which the port belongs.
Step 1 configure
Enter global configuration mode.
Step 5 end
Return to privileged EXEC mode.
Switch#configure
Switch(config)#vlan 2
Switch(config-vlan)#name RD
Switch(config-vlan)#show vlan id 2
Configuration Guide 5
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
2 RD active
Switch(config-vlan)#end
Step 1 configure
Enter global configuration mode.
Step 2 interface {fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list |
port-channel port-channel-id | range port-channel port-channel-list }
Enter interface configuration mode.
Step 5 end
Return to privileged EXEC mode.
The following example shows how to add the port 1/0/5 to VLAN 2, and specify its egress
rule as tagged:
Switch#configure
Configuration Guide 6
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
Step 1 configure
Enter global configuration mode.
Step 2 interface {fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list |
port-channel port-channel-id | range port-channel port-channel-list }
Enter interface configuration mode.
Step 6 end
Return to privileged EXEC mode.
Configuration Guide 7
Configuring 802.1Q VLAN 802.1Q VLAN Configuration
The following example shows how to configure the PVID of port 1/0/5 as 2, enable the
ingress checking and set the acceptable frame type as all:
Switch#configure
Switch(config)#interface gigabitEthernet 1/0/5
Switch(config-if)#switchport pvid 2
Switch(config-if)#switchport check ingress
Switch(config-if)#switchport acceptable frame all
Switch(config-if)#show interface switchport gigabitEthernet 1/0/5
Port Gi1/0/5:
PVID: 2
Acceptable frame type: All
Ingress Checking: Enable
Member in LAG: N/A
Link Type: General
Member in VLAN:
Vlan Name Egress-rule
---- ----------- -----------
1 System-VLAN Untagged
Switch(config-if)#end
Configuration Guide 8
Configuring 802.1Q VLAN Configuration Example
3 Configuration Example
It is required that computers can communicate with each other in the same department
but not with computers in the other department.
Terminal devices like computers usually do not support VLAN tags. Add untagged ports
to the corresponding VLANs and specify the PVID.
The intermediate link between two switches carries traffic from two VLANs
simultaneously. Add the tagged ports to both VLANs.
Configuration Guide 9
Configuring 802.1Q VLAN Configuration Example
The figure below shows the network topology. Host A1 and Host A2 are in Department A,
while Host B1 and Host B2 are in Department B. Switch 1 and Switch 2 are located in two
different places. Host A1 and Host B1 are connected to port 1/0/2 and port 1/0/3 on Switch
1 respectively, while Host A2 and Host B2 are connected to port 1/0/6 and port 1/0/7 on
Switch 2 respectively. Port 1/0/4 on Switch 1 is connected to port 1/0/8 on Switch 2.
Figure 3-1 Network Topology
VLAN 10
Host A1 Host A2
Gi1/0/2 Gi1/0/6
Gi1/0/8
Switch 1 Switch 2
Gi1/0/4
Gi1/0/3 Gi1/0/7
VLAN 20
Host B1 Host B2
The configurations of Switch 1 and Switch 2 are similar. The following introductions take
Switch 1 as an example.
1) Choose the menu L2 FEATURES > VLAN > 802.1Q VLAN > VLAN Config and
click to load the following page. Create VLAN 10 with the description of
Department_A. Add port 1/0/2 as an untagged port and port 1/0/4 as a tagged port to
VLAN 10. Click Create.
Configuration Guide 10
Configuring 802.1Q VLAN Configuration Example
2) Choose the menu L2 FEATURES > VLAN > 802.1Q VLAN > VLAN Config and
click to load the following page. Create VLAN 20 with the description of
Department_B. Add port 1/0/3 as an untagged port and port 1/0/4 as a tagged port to
VLAN 20. Click Create.
Configuration Guide 11
Configuring 802.1Q VLAN Configuration Example
3) Choose the menu L2 FEATURES > VLAN > 802.1Q VLAN > Port Config to load the
following page. Set the PVID of port 1/0/2 as 10 and click Apply. Set the PVID of port
1/0/3 as 20 and click Apply.
Configuration Guide 12
Configuring 802.1Q VLAN Configuration Example
The configurations of Switch 1 and Switch 2 are similar. The following introductions take
Switch 1 as an example.
1) Create VLAN 10 for Department A, and configure the description as Department-A.
Similarly, create VLAN 20 for Department B, and configure the description as
Department-B.
Switch_1#configure
Switch_1(config)#vlan 10
Switch_1(config-vlan)#name Department-A
Switch_1(config-vlan)#exit
Switch_1(config)#vlan 20
Switch_1(config-vlan)#name Department-B
Switch_1(config-vlan)#exit
2) Add untagged port 1/0/2 and tagged port 1/0/4 to VLAN 10. Add untagged port 1/0/3
and tagged port 1/0/4 to VLAN 20.
Switch_1(config-if)#exit
Configuration Guide 13
Configuring 802.1Q VLAN Configuration Example
Switch_1(config-if)#exit
Switch_1(config-if)#exit
3) Set the PVID of port 1/0/2 as 10, and set the PVID of port 1/0/3 as 20.
Switch_1(config-if)#switchport pvid 10
Switch_1(config-if)#exit
Switch_1(config-if)#switchport pvid 20
Switch_1(config-if)#end
Switch_1#show vlan
Configuration Guide 14
Configuring 802.1Q VLAN Configuration Example
.....
Configuration Guide 15
Configuring 802.1Q VLAN Appendix: Default Parameters
VLAN ID 1
PVID 1
Configuration Guide 16