Assigning a native VLAN ID to a trunk interface

Prerequisites
至少有一个定义的VLAN。
Procedure
  1. Switch to configuration context with the commandconfig.
  2. Switch to the trunk interface to which you want to assign the native VLAN ID with the commandinterface.
  3. Assign the native VLAN ID with the commandvlan trunk native. If tagging is required, use the commandvlan trunk native tag.
  4. 允许traffic tagged with the native VLAN ID to be transported by the trunk using the commandvlan trunk allowed.

Example

On the 6400 Switch Series, interface identification differs.

This example assigns native VLAN ID20to trunk interface1/1/2.
switch#configswitch(config)#vlan 20switch(config-vlan-20)#exitswitch(config)#interface 1/1/2switch(config-if)#vlan trunk native 20
This example assigns native VLAN ID40to trunk interface1/1/5, enables tagging, and allows traffic with VLAN ID 40 to be transported by the trunk.
switch#configswitch(config)#vlan 40switch(config-vlan-40)#exitswitch(config)#接口1/1/5switch(config-if)#vlan trunk native 40 tagswitch(config-if)#vlan trunk allow 40