Ethernet Port Configuration
e0/0/2 down false auto 0 20 hyb 20
e0/0/3 down false auto 0 30 hyb 30
e0/0/4 down false auto 0 40 hyb 40
Total entries: 4 .
4.2.1.5 Add Port to VLAN
User can add current Ethernet port to a specific VLAN, thus, the Ethernet port can forward
packet of the vlan.
Hybrid port and Trunk port can belong to multiple VLANs and Access port can only belong
to one VLAN, which is the default vlan. By default, all ports belong to VLAN 1.
In VLAN configuration mode, user can use switch port Ethernet command to add a port to
vlan, please refer to “VLAN configuration” chapter.
There is another way to add port to a vlan, in interface configuration mode.
Table 4-6 Add a port to a VLAN
Enter global configuration mode
Enter interface configuration mode
interface ethernet
device-num/slot-num/port-num
Add Hybrid port to specific VLAN and
keep the packet VID
switchport hybrid tagged vlan vlan-list
Add Hybrid port to specific VLAN and
strip the packet VID
switchport hybrid untagged vlan vlan-list
Delete Hybrid port from specific VLAN
no switchport hybrid vlan vlan-list
Add Trunk port to specific VLAN
switchport trunk allowed vlan vlan-list
Delete Trunk port from specific VLAN
no switchport trunk allowed vlan vlan-list
There are two ways to add an Access port to VLAN: one is to configure port default VLAN;
the other is to add the port to another VLAN directly. Access port can only belong to one
VLAN, so this port will be auto-deleted from the original VLAN.
Example:
e 0/0/1 is Hybrid. Configure this port keeping tag of VLAN 10。
Switch(config)#vlan 10
Switch (config-if-vlan)#interface ethernet 0/0/1
Switch (config-if-ethernet-0/0/1)#switchport hybrid tagged vlan 10
Switch (config-if-ethernet--0/0/1)#show interface brief e 0/0/1
Port Desc Link shutdn Speed Pri PVID Mode TagVlan UtVlan
e0/0/1 down false auto 0 1 hyb 10 1
Total entries: 1.