Use switchport trunk allowed vlan command to add trunk port to specified VLAN.
Use no switchport trunk allowed vlan command to remove trunk port from
specified vlan.
switchport trunk allowed vlan {
vlan-list
| all }
no switchport trunk allowed vlan {
vlan-list
| all }
【Parameter】
vlan-list: vlan-list
vlan-list can be discrete numbers, sequential numbers or both.
Discrete numbers are separated by “,”, and sequential numbers use “-”, such as: 2,
5,8,10-20. Vlan-list in the following context expresses the same.
all:Add trunk ports to all VLAN.
【Command configuration mode】
Interface configuration mode
【Usage】
Use this command to add trunk port to specified VLAN. Trunk port can belong to
more VLANs. If use switchport trunk allowed vlan command in many times,
VLAN allowed by the trunk port is the congregation of these vlan-list.
【Example】
!Add trunk port Ethernet
0/0/1 to VLAN 3、4、70~150
2-22