Configuration Guide Vol. 1


26.2.4 Configuring Trunk Ports

Points to note

The trunk port handles tagged frames, and can be used for all VLANs regardless of VLAN type, as well as with Ethernet interfaces and port channel interfaces.

The trunk port does not belong to any VLAN because it is set only with the switchport mode command. The VLANs handled by this port are set using the switchport trunk allowed vlan command.

To add VLANs, the switchport trunk allowed vlan add command is used. To remove VLANs, the switchport trunk allowed vlan remove command is used. If the switchport trunk allowed vlan command is executed again after having already been used to configure settings, it is replaced in the list of specified VLAN IDs.

Command examples

  1. (config)# vlan 10-20,100,200-300

    (config-vlan)# exit

    (config)# interface gigabitethernet 1/0/1

    (config-if)# switchport mode trunk

    Create a VLAN 10~20,100,200~300. This sequence of commands also switches to the Ethernet interface configuration mode for port 1/0/1, and sets it as a trunk port. At this point, port 1/0/1 does not belong to any VLAN.

  2. (config-if)# switchport trunk allowed vlan 10-20

    Sets VLAN 10~20 for Port1/0/1. Port1/0/1 handles Tagged frames for VLAN 10~20.

  3. (config-if)# switchport trunk allowed vlan add 100

    Adds VLAN 100 to the VLANs handled by port 1/0/1.

  4. (config-if)# switchport trunk allowed vlan remove 15,16

    Deletes VLAN 15 and VLAN 16 from the VLANs handled by port 1/0/1. In this condition, Port1/0/1 handles Tagged frame of VLAN 10~14,17~20,VLAN 100.

  5. (config-if)# switchport trunk allowed vlan 200-300

    Set VLAN handled by PORT1/PORT0/PORT1 to VLAN 200~300. All previous settings are overwritten and handle Tagged frame of VLAN 200~300.

Notes

A native VLAN is configured to handle untagged frames on the trunk port. For details, see section 26.4.3, Configuring Native VLAN for Trunked Ports.

On a trunk port, when the number of deleted VLANs reaches 30, and the mode is changed to anything other than trunk port while the number of member VLANs is 30 or above, the MAC address table, ARP information, and NDP information are deleted for the corresponding port. Accordingly, keep in mind that when L3 forwarding is performed, the ARP and NDP are relearned, and communication is stopped.