interface (VLAN)
To create a VLAN subinterface, use the interface command in XR Config 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
r-interface-vlan-commonCommand History
Release |
Modification |
---|---|
Release 6.0 |
This command was introduced. |
Usage Guidelines
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/RP0/CPU0:router(config)# interface TenGigE 0/0/0/10.1
RP/0/RP0/CPU0:router(config-subif)# ipv4 address 30.0.1.2 255.255.255.0
RP/0/RP0/CPU0:router(config-subif)# encapsulation dot1q 3201
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/RP0/CPU0:router(config)# interface TenGigE0/0/0/10.101 l2transport
RP/0/RP0/CPU0:router(config-if-l2)#encapsulation dot1q 101