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:
- Ingress packets may be classified to an 802.1Q VLAN, a service VF, or a transport VF.
- The native VLAN must accept tagged frames for the
ctag keyword to apply.
- If the specified VLAN is an 802.1Q VLAN, the
ctag option is not required.
- If the specified VLAN is an 802.1Q VLAN or a service VF, the
egress tagging options are
tagged or
untagged.
- If the specified VLAN is a transport VF, then the
egress tagging option must be
any to preserve the encapsulation of ingress frames.
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