switchport trunk native-vlan-xtagged

Configures a port to accept both tagged and untagged packets, and specifies the egress tagging behavior.

Syntax

switchport trunk native-vlan-xtagged vlan_id [ ctag cvid ] egress { tagged | untagged | any }
no switchport trunk native-vlan-xtagged

Parameters

vlan_id
Adds a classified VLAN (VLAN ID > 4095) to transmit and receive through the Layer 2 interface.
ctag cvid
Sets an optional C-TAG (802.1Q VLAN ID) for a service or transport VF (VLAN ID > 4095).
egress
Enables the selection of required tagging options.
tagged
Specifies packets as tagged.
untagged
Specifies packets as untagged.
any
Specifies that packets preserve their ingress encapsulation.

Modes

Interface subtype configuration mode on a trunk port

Usage Guidelines

This command is supported when the port is in no-default-vlan trunk mode, as enabled by means of the switchport mode trunk-no-default-native command.

Note the following:

Use the no switchport trunk native-vlan-xtagged command to remove the configuration.

Port mode change is not allowed when port security is enabled on the interface.

Examples

Configure transport VF 6000 that accepts C-TAG range 100 through 200 and a native VLAN that can be either tagged or untagged.

device# configure terminal
device(config)# interface ethernet 0/1
device(config-if-eth-0/1)# switchport mode trunk-no-default-native
device(config-if-eth-0/1)# switchport trunk native-vlan-xtagged 6000 ctag 10 egress any
device(config-if-eth-0/1)# switchport trunk allow vlan 6000 ctag 100-200

Remove the native VLAN from the transport VF.

device# configure terminal
device(config)# interface ethernet 0/1
device(config-if-eth-0/1)# no switchport trunk native-vlan-xtagged