Configuration Guide Vol. 1


26.4.3 Configuring Native VLAN for Trunked Ports

Points to note

Set a native VLAN for handling untagged frames on a trunk port. Only port VLANs can be set for a native VLAN.

When the VLAN ID of a native VLAN is specified for the switchport trunk allowed vlan command, the VLAN handles untagged frames on the trunk port. The native VLAN is VLAN 1 (the default VLAN) unless explicitly specified otherwise in the configuration.

To handle tagged frames (where the VLAN tag has a VLAN ID of 1) for the default VLAN on a trunk port, change the native VLAN to another VLAN.

Command examples

  1. (config)# vlan 10,20

    (config-vlan)# exit

    Creates VLAN ID 10 and VLAN ID 20 as port VLANs.

  2. (config)# interface gigabitethernet 1/0/1

    (config-if)# switchport mode trunk

    Switches to the Ethernet interface configuration mode for port 1/0/1. Then, sets the port as a trunk port. At this point, the native VLAN for trunk port 1/0/1 is the default VLAN.

  3. (config-if)# switchport trunk native vlan 10

    (config-if)# switchport trunk allowed vlan 1,10,20

    Sets the native VLAN for trunk port 1/0/1 to VLAN 10. Also, set VLAN 1,10,20. VLAN 10 (the native VLAN) handles untagged frames, and VLAN 1 (the default VLAN) and VLAN 20 handle tagged frames.