L2Xconnect/VLAN/EVC Command Reference

This chapter describes the commands to configure L2Xconnect/VLAN/EVC.

Note


Refer OTN and DWDM Configuration Guide for Cisco NCS 4000 Series, for LANPHY and Ethernet terminated OTN controller configuration procedures.


l2transport (Ethernet)

To enable Layer 2 transport port mode on an Ethernet interface and enter Layer 2 transport configuration mode, use the l2transport command in interface configuration mode for an Ethernet interface. To disable Layer 2 transport port mode on an Ethernet interface, use the no form of this command.

l2transport

no l2transport

Command Default

None.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

When you issue the l2transport command in interface configuration mode, the CLI prompt changes to “config-if-l2,” indicating that you have entered the Layer 2 transport configuration submode. In the following sample output, the question mark (?) online help function displays all the commands available under Layer 2 transport configuration submode for an Ethernet interface:

RP/0/RP0:hostname#configure
RP/0/RP0:hostname(config)# interface TenGigE0/1/5/2
RP/0/RP0:hostname(config-if)# l2transport
RP/0/RP0:hostname(config-if-l2)# ?
  commit          Commit the configuration changes to running
  describe        Describe a command without taking real actions
  do              Run an exec command
  exit            Exit from this submode
  no              Negate a command or set its defaults
  service-policy  Configure QoS Service policy
  show            Show contents of configuration
RP/0/RP0:hostname(config-if-l2)#

Note


The l2transport command is mutually exclusive with any Layer 3 interface configuration


Task ID

Task ID Operation

l2vpn

read, write

Examples

The following example shows how to enable Layer 2 transport port mode on an Ethernet interface and enter Layer 2 transport configuration mode:


RP/0/RP0:hostname# configure
RP/0/RP0:hostname(config)# interface TenGigE0/2/0/2
RP/0/RP0:hostname(config-if)# l2transport
RP/0/RP0:hostname(config-if-l2)# 

The following example shows how to use the l2transport keyword in the interface command:

RP/0/RP0:hostname# configure
RP/0/RP0:hostname(config)# interface TenGigE0/6/0/2.10 l2transport
RP/0/RP0:hostname(config-if)# encapsulation dot1q 200
RP/0/RP0:hostname(config-if-l2)#commit
The following example shows how to use the l2transport command on an Ethernet subinterface:

Note


Ensure that the l2transport command is applied on the same line as the interface command for the Ethernet subinterface.



RP/0/RP0:hostname#configure
RP/0/RP0:hostname(config)#interface TenGigE0/5/0/1.1 l2transport 
RP/0/RP0:hostname(config-subif)#encapsulation dot1q 100
RP/0/RP0:hostname(config-subif)#commit
RP/0/RP0:hostname(config-subif)#end

RP/0/RP0:hostname#sh run | begin TenGigE0/5/0/1 
Thu Dec  3 10:15:40.916 EST Building configuration...
interface TenGigE0/5/0/1
 mtu 1500 
!
interface TenGigE0/5/0/1.1 l2transport  
encapsulation dot1q 100  
interface TenGigE0/5/0/2
 shutdown
!
!

Note


To configure l2transport on an Ethernet subinterface, ensure that the main interface is configured as a Layer 3 interface.


dot1q tunneling ethertype

To configure the Ethertype, used by peer devices when implementing QinQ VLAN tagging, to be 0x9100, use the dot1q tunneling ethertype command in the interface configuration mode for an Ethernet interface. To return to the default Ethertype configuration (0x8100), use the no form of this command.

dot1q tunneling ethertype { 0x9100 | 0x9200 }

no dot1q tunneling ethertype

Syntax Description

0x9100

Sets the Ethertype value to 0x9100.

0x9200

Sets the Ethertype value to 0x9200.

Command Default

The Ethertype field used by peer devices when implementing QinQ VLAN tagging is either 0x8100 or 0x8200.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The dot1q tunneling ethertype command can be applied to a main interface. When applied to the main interface, it changes the subinterfaces, that have been configured with an encapsulation dot1q second-dot1q command, under that main interface.

This command changes the outer VLAN tag from 802.1q Ethertype 0x8100 to 0x9100 or 0x9200.

Task ID

Task ID Operation

vlan

read, write

Examples

The following example shows how to configure the Ethertype to 0x9100:


RP/0/RP0:hostname# configure
RP/0/RP0:hostname(config)# interface TenGigE0/6/0/2
RP/0/RP0:hostname(config-if)# dot1q tunneling ethertype 0x9100
The following example shows how to configure the Ethertype to 0x9200:

RP/0/RP0:hostname# configure
RP/0/RP0:hostname(config)# interface TenGigE0/6/0/6
RP/0/RP0:hostname(config-if)# dot1q tunneling ethertype 0x9200

encapsulation default

To configure the default sub interface on a port, use the encapsulation default command in the interface configuration mode. To delete the default sub interface on a port, use the no form of this command.

encapsulation default

no encapsulation default

Command Default

No default sub interface is configured on the port.

Command Default

No default sub interface is configured on the port.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

If the default sub interface is the only one configured on a port, the encapsulation default command matches all ingress frames on that port. If the default sub interface is configured on a port that has other non-default sub interfaces, the encapsulation default command matches frames that are unmatched by those non-default sub interfaces (anything that does not meet the criteria of other sub interfaces on the same physical interface falls into this sub interface).

Only a single default sub interface can be configured per interface. If you attempt to configure more than one default sub interface per interface, the encapsulation default command is rejected.

Only one encapsulation command must be configured per sub interface.

Examples

The following example shows how to configure a sub interface on a port:

RP/0/RP0:hostname(config-subif)# encapsulation default

encapsulation dot1ad dot1q

To define the matching criteria to be used in order to map single-tagged 802.1ad frames ingress on an interface to the appropriate sub interface, use the encapsulation dot1ad dot1q command in sub interface configuration mode.

To delete the matching criteria to map single-tagged 802.1ad frames ingress on an interface to the appropriate sub interface, use the no form of this command.

encapsulation dot1ad vlan-id dot1q { vlan-id }

no encapsulation dot1ad vlan-id dot1q { vlan-id }

Syntax Description

dot1ad

Sets the Ethertype value to 0x9100.

dot1q

Sets the Ethertype value to 0x9200.

vlan-id

VLAN ID, integer in the range 1 to 4094.

A hyphen must be entered to separate the starting and ending VLAN ID values that are used to define a range of VLAN IDs. (Optional) A comma must be entered to separate each VLAN ID range from the next range.

Command Default

No matching criteria are defined.

Command Modes

sub interface configuration

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The outer VLAN tag is an 802.1ad VLAN tag, instead of an 802.1Q tag. An 802.1ad tag has an ethertype value of 0x88A8, instead of 0x8100 that 802.1Q uses.

Some of the fields in the 802.1ad VLAN header are interpreted differently per 802.1ad standard. A tunneling ethertype command applied to the main interface does not apply to an 802.1ad sub interface.

An interface with encapsulation dot1ad causes the router to categorize the interface as an 802.1ad interface.

Examples

The following example shows how to map single-tagged 802.1ad ingress frames to a sub interface:


RP/0/RP0:hostname(config-subif)# encapsulation dot1ad 100 dot1q 20

encapsulation dot1q

To define the matching criteria to map 802.1Q frames ingress on an interface to the appropriate sub interface, use the encapsulation dot1q command in the interface configuration mode. To delete the matching criteria to map 802.1Q frames ingress on an interface to the appropriate sub interface, use the no form of this command.

encapsulation dot1q vlan-id [ ,vlan-id [-vlan-id] ] [ exact mac-address | second-dot1q vlan-id ]

encapsulation dot1q vlan-id, untagged

no encapsulation dot1q

Syntax Description

vlan-id

VLAN ID, integer in the range 1 to 4094.

Hyphen must be entered to separate the starting and ending VLAN ID values that are used to define a range of VLAN IDs. (Optional) Comma must be entered to separate each VLAN ID range from the next range.

exact

(Optional) Prevents matching of frames with more than one tag.

untagged

(Optional) Allows matches for both the single-tag dot1q frames and untagged frames.

Command Default

No matching criteria are defined.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Only one encapsulation statement can be applied to a sub interface. Encapsulation statements cannot be applied to main interfaces.

A single encapsulation dot1q statement specifies matching for frames with a single VLAN ID; a range of VLAN IDs; or a single VLAN ID or untagged.

Task ID

Task ID Operation

vlan

read, write

Examples

The following example shows how to map 802.1Q frames ingress on an interface to the appropriate sub interface:

RP/0/RP0:hostname(config-subif)# encapsulation dot1q 10

encapsulation dot1q second-dot1q

To define the matching criteria to map Q-in-Q ingress frames on an interface to the appropriate sub interface, use the encapsulation dot1q second-dot1q command in the interface configuration mode. To delete the matching criteria to map Q-in-Q ingress frames on an interface to the appropriate sub interface, use the no form of this command.

encapsulation dot1q vlan-id second-dot1q { any | vlan-id [ ,vlan-id [-vlan-id] ] [ exact | ingress source-mac mac-address ] }

no encapsulation dot1q vlan-id second-dot1q { any | vlan-id [ ,vlan-id [-vlan-id] ] [ exact | ingress source-mac mac-address ] }

Syntax Description

vlan-id

VLAN ID, integer in the range 1 to 4094.

Hyphen must be entered to separate the starting and ending VLAN ID values that are used to define a range of VLAN IDs. (Optional) Comma must be entered to separate each VLAN ID range from the next range.

second-dot1q

(Optional) Specifies IEEE 802.1Q VLAN tagged packets.

any

Any second tag in the range 1 to 4094.

exact

(Optional) Ensures that frames with more than two tags do not match.

ingress source-mac

(Optional) Performs MAC-based matching.

Command Default

No matching criteria are defined.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The criteria for this command are: the outer tag must be unique and the inner tag may be a single VLAN, a range of VLANs or lists of the previous two.

QinQ sub interface, allows single or range on second-dot1q.

Only one encapsulation command must be configured per sub interface.

Task ID

Task ID Operation

vlan

read, write

Examples

The following example shows how to map 802.1Q frames ingress on an interface to the appropriate sub interface:


RP/0/RP0:hostname(config)# interface HundredGigE0/8/0/0.1 l2transport
RP/0/RP0:hostname(config-subif)# encapsulation dot1q 10 second-dot1q 100

encapsulation untagged

To define the matching criteria to map untagged ingress Ethernet frames on an interface to the appropriate sub interface, use the encapsulation untagged command in the Interface configuration mode. To delete the matching criteria to map untagged ingress Ethernet frames on an interface to the appropriate sub interface, use the no form of this command.

encapsulation untagged

no encapsulation untagged

Command Default

No matching criteria are defined.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Only one sub interface per port is allowed to have untagged encapsulation. The reason is to be able to unambiguously map the incoming frames to the sub interface. However, it is possible for a port that hosts an sub interface matching untagged traffic to host other sub interfaces that match tagged frames. Only one encapsulation command may be configured per sub interface.

Only one sub interface may be configured as encapsulation untagged. This interface is referred to as the untagged sub interface or untagged EFP (incase of an L2 interface).

The untagged sub interface has a higher priority than the main interface; all untagged traffic, including L2 protocol traffic, passes through this sub interface rather than the main interface.

Task ID

Task ID Operation

vlan

read, write

Examples

The following example shows how to map untagged ingress Ethernet frames to a sub interface:


RP/0/RP0:hostname(config)# interface TenGigE0/6/0/2.10 l2transport
RP/0/RP0:hostname(config-subif)# encapsulation untagged

rewrite ingress tag

To specify the encapsulation adjustment that is to be performed on the frame ingress to the sub interface, use the rewrite ingress tag command in the interface configuration mode. To delete the encapsulation adjustment that is to be performed on the frame ingress to the sub interface, use the no form of this command.

rewrite ingress tag { push { dot1q vlan-id | dot1q vlan-id second-dot1q vlan-id | dot1ad vlan-id dot1q vlan-id } | pop { 1 | 2 } | translate { 1to1 { dot1q vlan-id | dot1ad vlan-id } | 2-to-2 { dot1q vlan-id second-dot1q vlan-id | dot1ad vlan-id dot1q vlan-id } } [ symmetric]

no rewrite ingress tag { push { dot1q vlan-id | dot1q vlan-id second-dot1q vlan-id | dot1ad vlan-id dot1q vlan-id } | pop { 1 | 2 } | translate { 1to1 { dot1q vlan-id | dot1ad vlan-id } | 2-to-2 { dot1q vlan-id second-dot1q vlan-id | dot1ad vlan-id dot1q vlan-id } } [ symmetric]

Syntax Description

vlan-id

VLAN ID, integer in the range 1 to 4094.

push dot1q vlan-id

Pushes one 802.1Q tag with vlan-id .

push dot1q vlan-id second-dot1q vlan-id

Pushes a pair of 802.1Q tags in the order first, second.

pop {1 | 2}

One or two tags are removed from the packet. This command can be combined with a push (pop N and subsequent push vlan-id ).

translate 1-to-1 dot1q vlan-id

Replaces the incoming tag (defined in the encapsulation command) into a different 802.1Q tag at the ingress sub interface.

translate 2-to-2 dot1q vlan-id second-dot1q vlan-id

Replaces the pair of tags defined by the encapsulation command by a pair of VLANs defined by this rewrite.

symmetric

A rewrite operation is applied on both ingress and egress. The operation on egress is the inverse operation as ingress.

Command Default

The frame is left intact on ingress.

Command Modes

Interface configuration mode

Command History

Release Modification

Release 6.1.42

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The symmetric keyword is accepted only when a single VLAN is configured in encapsulation. If a list of VLANs or a range VLAN is configured in encapsulation, the symmetric keyword is accepted only for push rewrite operations; all other rewrite operations are rejected.

The pop command assumes the elements being popped are defined by the encapsulation type. The exception case should be drop the packet.

The rewrite ingress tag translate command assume the tags being translated from are defined by the encapsulation type. The translation operation requires at least “from” tag in the original packet. If the original packet contains more tags than the ones defined in the “from”, then the operation should be done beginning on the outer tag. Exception cases should be dropped.

Task ID

Task ID Operation

vlan

read, write

Examples

The following example shows how to specify the encapsulation adjustment that is to be performed on the frame ingress to the sub interface:

RP/0/RP0:hostname(config-subif)# rewrite ingress push dot1q 200