17 VLANs
Creates VLANs 10 to 20, 100, and 200 to 300. This sequence of commands also
switches to the Ethernet interface configuration mode for port 0/1, and sets it as a
trunk port. At this point, port 0/1 does not belong to any VLAN.
2.
(config-if)# switchport trunk allowed vlan 10-20
Sets VLANs 10 to 20 for port 0/1. Port 0/1 handles tagged frames for VLANs 10 to
20.
3.
(config-if)# switchport trunk allowed vlan add 100
Adds VLAN 100 to the VLANs handled by port 0/1.
4.
(config-if)# switchport trunk allowed vlan remove 15,16
Deletes VLAN 15 and VLAN 16 from the VLANs handled by port 0/1. At this point,
port 0/1 handles tagged frames for VLAN 10 to 14, 17 to 20, and VLAN 100.
5.
(config-if)# switchport trunk allowed vlan 200-300
(config-if)# exit
Sets VLANs 200 to 300 as VLANs to be handled by port 0/1. All previous settings are
overwritten, so that the port handles tagged frames for VLANs 200 to 300.
Notes
A native VLAN is configured to handle untagged frames on the trunk port. For details,
see 17.4.3 Configuring native VLANs for trunk ports.
260