vlan trunk native

Syntax

vlan trunk native <VLAN-ID>

no 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 the vlan trunk allowed all command to ensure that the default VLAN is allowed on the trunk. To only allow specific VLANs on the trunk, issue the vlan trunk allowed command specifying only specific VLANs.

The no form of this command removes a native VLAN from a trunk interface and assigns VLAN ID 1 as its native VLAN.

Command context

config-if

Parameters

<VLAN-ID>

Specifies the number of the VLAN ID to assign. The VLAN ID must exist. Range: 1 - 4040.

Authority

Administrators

Examples

Assigning native VLAN ID 20 to trunk interface 1/1/2:

switch(config)# interface 1/1/2
switch(config-if)# no routing
switch(config-if)# vlan trunk native 20

Removing native VLAN 20 from trunk interface 1/1/2 and returning to the default VLAN 1 as the native VLAN.

switch(config)# interface 1/1/2
switch(config-if)# no vlan trunk native 20

or:

switch(config)# interface 1/1/2
switch(config-if)# no vlan trunk native

Assigning native VLAN ID 20 to trunk interface 1/1/2 and then removing it from the list of allowed VLANs. (Only allow VLAN 10 on the trunk.)

switch(config)# interface 1/1/2
switch(config-if)# vlan trunk native 20
switch(config-if)# vlan trunk allowed 10