Assigning a native VLAN ID to a trunk interface
Prerequisites
至少有一个定义的VLAN。
Procedure
- Switch to configuration context with the command
config
. - Switch to the trunk interface to which you want to assign the native VLAN ID with the command
interface
. - Assign the native VLAN ID with the command
vlan trunk native
. If tagging is required, use the commandvlan trunk native tag
. - 允许traffic tagged with the native VLAN ID to be transported by the trunk using the command
vlan 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