Cisco ASR 9000 Series Aggregation Services Router Interface and Hardware Component Command Reference, Release 4.3.x
VLAN Subinterface Commands on the Cisco ASR 9000 Series Router
Downloads: This chapterpdf (PDF - 1.28MB) The complete bookPDF (PDF - 8.13MB) | Feedback

VLAN Subinterface Commandsonthe Cisco ASR 9000 Series Router

VLAN Subinterface Commandsonthe Cisco ASR 9000 Series Router

This module provides command line interface (CLI) commands for configuring IEEE 802.1Q VLANs on the Cisco ASR 9000 Series Router.

dot1q vlan

To assign a VLAN ID to a subinterface (or to modify the VLAN ID that is currently assigned to a subinterface), use the dot1q vlan command in subinterface configuration mode. To remove the VLAN ID assigned to a subinterface, use the no form of this command.


Note


Effective with Cisco IOS XR Release 3.7.2, the dot1q vlan command is replaced by the encapsulation dot1q command. See the encapsulation dot1q command for more information.


dot1q vlan vlan-id [ vlan-id2 | any ]

no dot1q vlan vlan-id

Syntax Description

vlan-id

ID of the subinterface. Range is from 1 to 4094 (0 and 4095 are reserved).

vlan-id2

(Optional) Identifies the host VLAN of a Q-in-Q VLAN pair. Replace vlan-id2 with a number that specifies the host VLAN. Range is from 1 to 4094.

any

(Optional) Identifies the host VLAN of a Q-in any VLAN pair.

Command Default

No default behavior or values

Command Modes

Subinterface configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced and was also replaced by the encapsulation dot1q command.

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 VLAN ID specifies where 802.1Q tagged packets are sent and received on a specified subinterface. An 802.1Q VLAN subinterface must have a configured VLAN ID to send and receive traffic; without a VLAN ID, the subinterface remains in the down state. All VLAN IDs must be unique among all subinterfaces configured on the same physical interface. To change a VLAN ID, the new VLAN must not already be in use on the same physical interface. To exchange VLAN IDs, you must remove the configuration information and reconfigure the ID for each device.


Note


The subinterface does not pass traffic without an assigned VLAN ID.



Note


The dot1q vlan command is is replaced by the encapsulation dot1q command. It is still available for backward-compatibility, but only for Layer 3 interfaces. The encapsulation dot1q command must be used going forward.


Task ID

Task ID

Operations

vlan

read, write

Examples

This example shows how to configure the VLAN ID and IP address on a subinterface:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# interface TenGigE 0/2/0/4.1
RP/0/RSP0/CPU0:router(config-subif)# dot1q vlan 10
RP/0/RSP0/CPU0:router(config-subif)# ipv4 addr 10.0.0.1/24
   

This example shows how to configure the VLAN IDs for both VLANS in a single Q-in-Q attachment circuit (AC). In this case, incoming traffic must match both of the VLAN IDs before it is accepted by the subinterface:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# interface TenGigE 0/2/0/4.1
RP/0/RSP0/CPU0:router(config-subif)# dot1q vlan 10 20
   

This example shows how to configure the VLAN IDs for a Q-in-any AC. In this case, all incoming traffic must have two VLAN tags, where the outer VLAN ID matches the configured value, while the inner VLAN ID can be any value.

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# interface TenGigE 0/2/0/4.1 l2transport
RP/0/RSP0/CPU0:router(config-subif)# dot1q vlan 10 any
   

Related Commands

Command

Description

dot1q native vlan

Assigns the native VLAN ID of a physical interface trunking 802.1Q VLAN traffic.  

show interfaces

Displays statistics for all interfaces configured on the router or for a specific node.  

interface (VLAN)

To create a VLAN subinterface, use the interface command in global configuration mode. To delete a subinterface, use the no form of this command.

interface type interface-path-id.subinterface [l2transport]

no interface type interface-path-id.subinterface [l2transport]

Syntax Description

type

Type of Ethernet interface on which you want to create a VLAN. Enter GigabitEthernet, TenGigE,, or Bundle-Ether.

interface-path-id.subinterface

Physical interface or virtual interface followed by the subinterface path ID. Naming notation is interface-path-id.subinterface. The period in front of the subinterface value is required as part of the notation.

For more information about the syntax for the router, use the question mark (?) online help function.

l2transport

Enables Layer 2 transport port mode on the specified VLAN interface and enters Layer 2 transport configuration mode. The l2transport keyword creates the Vlan interface in L2 mode so that it can be used for L2VPNs and local switching.

Command Default

No default behavior or values

Command Modes

Global configuration

Command History

Release

Modification

Release 3.7.2

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.

For the interface-path-id argument, use the following guidelines:

  • If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
    • rack: Chassis number of the rack.
    • slot: Physical slot number of the line card.
    • module: Module number. A physical layer interface module (PLIM) is always 0.
    • port: Physical port number of the interface.
  • If specifying an Ethernet bundle interface, the range is from 1 through 65535.

For the subinterface argument, the range is from 0 through 4095.

To configure a large number of subinterfaces, we recommend entering all configuration data before you commit the interface command.

To change an interface from Layer 2 to Layer 3 mode and back, you must delete the interface first and then re-configure it in the appropriate mode.


Note


A subinterface does not pass traffic without an assigned VLAN ID.


Task ID

Task ID

Operations

vlan

read, write

Examples

This example shows how to configure a VLAN subinterface on a 10-Gigabit Ethernet interface:

RP/0/RSP0/CPU0:router(config)# interface TenGigE 0/0/0/1.2
RP/0/RSP0/CPU0:router(config-subif)# dot1q vlan 1
RP/0/RSP0/CPU0:router(config-subif)# ipv4 address 50.0.0.1/24
   

This example shows how to create a VLAN subinterface with Layer 2 transport port mode enabled, and enter Layer 2 transport configuration mode under that VLAN:

RP/0/RSP0/CPU0:router(config)# interface GigabitEthernet 0/4/0/1.1
RP/0/RSP0/CPU0:router(config-if-l2)#
   

Related Commands

Command

Description

dot1q native vlan

Assigns the native VLAN ID of a physical interface trunking 802.1Q VLAN traffic.  

dot1q vlan

Assigns a VLAN ID to a subinterface (or modifies the VLAN ID that is currently assigned to a subinterface).