vlan trunk native

Syntax

vlan trunk native< vlan id >没有vlan trunk native [< vlan id >]

Description

Assigns a native VLAN ID to a trunk interface. By default, VLAN ID 1 is assigned as the native VLAN ID for all trunk interfaces. VLANs can only be assigned to a non-routed (layer 2) interface or LAG interface. Only one VLAN ID can be assigned as the native VLAN.

NOTE:

When a native VLAN is defined, the switch automatically executes thevlan trunk allowed allcommand to ensure that the default VLAN is allowed on the trunk. To only allow specific VLANs on the trunk, issue thevlan trunk allowedcommand specifying only specific VLANs.

The没有这个命令删除本地的形式VLAN from a trunk interface and assigns VLAN ID 1 as its native VLAN.

Command context

config-if

Parameters

< vlan id >

Specifies a VLAN ID. Range: 1 to 4094.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Assigning native VLAN ID20to trunk interface1/1/2:
switch(config)#interface 1/1/2switch(config-if)#没有routingswitch(config-if)#vlan trunk native 20
Removing native VLAN20from trunk interface1/1/2and returning to the default VLAN 1 as the native VLAN.
switch(config)#interface 1/1/2switch(config-if)#没有vlan trunk native 20
or:
switch(config)#interface 1/1/2switch(config-if)#没有vlan trunk native
Assigning native VLAN ID20to trunk interface1/1/2and then removing it from the list of allowed VLANs. (Only allow VLAN 10 on the trunk.)
switch(config)#interface 1/1/2switch(config-if)#没有routingswitch(config-if)#vlan trunk native 20switch(config-if)#vlan trunk allowed 10