![H3C S5120-SI Series Operation Manual Download Page 122](http://html2.mh-extra.com/html/h3c/s5120-si-series/s5120-si-series_operation-manual_3711174122.webp)
1-5
Port-Based VLAN Configuration
Introduction to Port-Based VLAN
Port-based VLANs group VLAN members by port. A port forwards traffic for a VLAN only after it is
assigned to the VLAN.
Port link type
You can configure the link type of a port as access, trunk, or hybrid. The three link types use different
VLAN tag handling methods. When configuring the link type of a port, note that:
z
An access port can belong to only one VLAN. Usually, ports directly connected to PCs are
configured as access ports.
z
A trunk port can carry multiple VLANs to receive and send traffic for them. Except traffic of the
default VLAN, traffic passes through a trunk port will be VLAN tagged. Usually, ports connecting
network devices are configured as trunk ports to allow members of the same VLAN to
communicate with each other across multiple network devices.
z
Like a trunk port, a hybrid port can carry multiple VLANs to receive and send traffic for them. Unlike
a trunk port, a hybrid port allows traffic of all VLANs to pass through VLAN untagged. You can
configure a port connected to a network device or user terminal as a hybrid port for access link
connectivity or trunk connectivity.
Default VLAN
By default, VLAN 1 is the default VLAN for all ports. You can configure the default VLAN for a port as
required.
Use the following guidelines when configuring the default VLAN on a port:
z
Because an access port can join only one VLAN, its default VLAN is the VLAN to which it belongs
and cannot be configured.
z
Because a trunk or hybrid port can join multiple VLANs, you can configure a default VLAN for the
port.
z
You can use a nonexistent VLAN as the default VLAN for a hybrid or trunk port but not for an
access port. Therefore, after you remove the VLAN that an access port resides in with the
undo
vlan
command, the default VLAN of the port changes to VLAN 1. The removal of the VLAN
specified as the default VLAN of a trunk or hybrid port, however, does not affect the default VLAN
setting on the port.
z
Do not set the voice VLAN as the default VLAN of a port in automatic voice VLAN assignment
mode. Otherwise, the system prompts error information. For information about voice VLAN, refer to
Voice VLAN Configuration
.
z
You are recommended to set the same default VLAN ID for the local and remote ports.
z
Ensure that a port is assigned to its default VLAN. Otherwise, when the port receives frames
tagged with the default VLAN ID or untagged frames (including protocol packets such as STP
BPDUs), the port filters out these frames.