OcNOS-SP : Layer 2 Guide : Layer 2 Command Reference : Layer 2 Subinterface Commands
Layer 2 Subinterface Commands
This chapter is a reference for the Layer 2 subinterface commands.
cross-connect
Use this command to create an AC-to-AC cross-connect between the L2 subinterfaces. It creates a separate mode with endpoint1 and endpoint2 being L2 subinterfaces. It is possible to bind L2 subinterface to cross-connect only when encapsulation is configured on it.
Use the no form of this command to remove the given cross-connect.
Command Syntax
cross-connect <WORD> (interface <IFNAME>) (interface <IFNAME>) (description) (disable)
no cross-connect <WORD>
Parameters
WORD
XC name
IFNAME
AC interface name
description
Characters describing AC cross-connect
disable
disables the cross-connect
Default
None
Command Mode
Configure mode for cross-connect
Cross-connect mode for IFNAME, description and disable
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#cross-connect c1
(config-xc)#interface xe1.1
(config-xc)#interface xe1.2
(config-xc)#description XC1
(config-xc)#disable
(config-xc)#exit
(config)#no cross-connect c1
(config)#
dot1ad ethertype
Use this command to configure the service-tpid value on parent port of a subinterface. By this the tpid used for service tag for a subinterface may be inherited from the one applied to parent interface.
Use no form of this command to revert the value to default.
Note: For any dot1ad subinterface to be functional, dot1ad ethertype should be set to desired value as 0x88a8/0x9100/0x9200.
Command Syntax
dot1ad ethertype (0x8100 | 0x88a8 | 0x9100 | 0x9200)
no dot1ad ethertype
Parameters
0x8100
IEEE 802.1Q VLAN-tagged frame
0x88a8
IEEE 802.1ad Provider Bridging Service VLAN tag identifier (S-Tag)
0x9100
Supported for interoperability with legacy devices
0x9200
Supported for interoperability with legacy devices
Default
Default value is 0x8100
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#interface xe1
(config-if)#dot1ad ethertype 0x9100
(config-if)#exit
(config)#interface xe1
(config-if)#no dot1ad ethertype
(config-if)#exit
encapsulation
Use this command to configure encapsulation-type for a Layer 2 subinterface. With this command, a Layer 2 subinterface can be configured as single-tagged with single/multiple VLANs or double-tagged, or default or untagged. Operational state of the Layer 2 subinterface is DOWN before configuring the encapsulation and it becomes UP once the encapsulation is configured.
Use the no form of this command to remove the encapsulation.
Note: For encapsulation with a VLAN range in an inner tag or outer tag, overlapping VLANs either as a single value or a range will not be allowed under same parent port.
Command Syntax
encapsulation ((dot1q | dot1ad | default | untagged) (vlan-id | vlanid-range) (inner-dot1q (vlan-id | vlanid-range)))
no encapsulation ((dot1q | dot1ad | default | untagged) (vlan-id | vlanid-range) (inner-dot1q (vlan-id | vlanid-range)))
Parameters
dot1q
 
IEEE802.1Q VLAN-tagged packets
dot1ad
 
IEEE802.1ad VLAN-tagged packets
default
IEEE default packets
untagged
IEEE untagged packets
vlan-id
VLAN identifier <2-4094>
vlanid-range
VLAN ID range(s): 2-5 10 or 2-5 7-19
inner-dot1q
Inner-VLAN for double-tagged
Default
None
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 3.0.
Inner-VLAN range support was introduced in OcNOS version 4.1.
Multiple encapsulation on a L2 subinterface introduced in OcNOS version 5.0.
The no form of this command with parameters introduced in OcNOS version 5.0.
Example
(config)#interface xe1.1 switchport
(config-if)#encapsulation dot1q 10
(config-if)#ex
(config)#interface xe1.2 switchport
(config-if)#encapsulation dot1ad 11
(config-if)#ex
(config)#interface xe1.3 switchport
(config-if)#encapsulation default
(config-if)#ex
(config)#interface xe1.4 switchport
(config-if)#encapsulation untagged
(config-if)#ex
(config)#interface xe1.5 switchport
(config-if)#encapsulation dot1q 15-20
(config-if)#ex
(config)#interface xe1.6 switchport
(config-if)#encapsulation dot1ad 21-25
(config-if)#ex
(config)#interface xe1.7 switchport
(config-if)#encapsulation dot1q 100 inner-dot1q 10
(config-if)#ex
(config)#interface xe1.8 switchport
(config-if)#encapsulation dot1ad 200 inner-dot1q 20
(config-if)#ex
(config)#interface xe1.9 switchport
(config-if)#encapsulation dot1ad 300 inner-dot1q 100-200
(config-if)#ex
(config)#interface xe1.10 switchport
(config-if)#encapsulation dot1q 3999
(config-if)#encapsulation dot1ad 3998
(config-if)#ex
(config)#interface xe1.10 switchport
(config-if)#no encapsulation
(config-if)#ex
(config)#interface xe1.1 switchport
(config-if)#no encapsulation dot1q 10
(config-if)#ex
(config)#interface xe1.2 switchport
(config-if)#no encapsulation dot1ad 11
(config-if)#ex
(config)#interface xe1.3 switchport
(config-if)#no encapsulation default
(config-if)#ex
(config)#interface xe1.4 switchport
(config-if)#no encapsulation untagged
(config-if)#ex
(config)#interface xe1.5 switchport
(config-if)#no encapsulation dot1q 15-20
(config-if)#ex
(config)#interface xe1.6 switchport
(config-if)#no encapsulation dot1ad 21-25
(config-if)#ex
(config)#interface xe1.7 switchport
(config-if)#no encapsulation dot1q 100 inner-dot1q 10
(config-if)#ex
(config)#interface xe1.8 switchport
(config-if)#no encapsulation dot1ad 200 inner-dot1q 20
(config-if)#ex
(config)#interface xe1.9 switchport
(config-if)#no encapsulation dot1ad 300 inner-dot1q 100-200
(config-if)#ex
 
 
 
interface IFNAME.SUBINTERFACE_ID switchport
Use this command to configure a L2 subinterface. An L2 sub-interfaces makes it possible for a logical interface to be created on an Ethernet physical interface as well as on dynamic/static LAG interfaces to handle one slice of its resource. The supported method for this resource slicing is vlan credential based which can be a single tagged or double-tagged or untagged or default along with encapsulation types as either dot1q or dot1ad.
Use no form of this command to unconfigure a sub-interface.
Command Syntax
interface IFNAME.SUBINTERFACE_ID switchport
no interface IFNAME.SUBINTERFACE_ID
Parameters
IFNAME
Interface name, such as xe1, po1 or sa1
SUBINTERFACE_ID
 
Subinterface identifier <1-2000>
switchport
L2 subinterface
Default
None
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#interface xe1.1 switchport
(config-if)#exit
(config)#no interface xe1.1
(config)#interface po1.1 switchport
(config-if)#exit
(config)#no interface po1.1
(config)#interface sa1.1 switchport
(config-if)#exit
(config)#no interface sa1.1
(config)#exit
#
 
rewrite
Use this command to manipulate the VLAN tags in the incoming packet. Supported operations are PUSH, DOUBLE PUSH, POP, DOUBLE POP and TRANSLATE on the VLAN tag with any of this ethertype - 8100/ 88a8/ 9100/ 9200.
Use the no form of this command to unconfigure rewrite.
Command Syntax
rewrite ((pop| push | translate (1-to-1|1-to-2|2-to-1|2-to-2) (TPID_VALUE) (VID_RANGE))
rewrite push (TPID_VALUE) (VID_RANGE) inner-dot1q (VID_RANGE)
rewrite pop-2tag
no rewrite
Parameters
pop
Pop the outer VID
push
Push the outer VID
translate
Translate the outer VID
1-to-1
Translates the outermost tag to another tag
1-to-2
Translates the outermost tag to two tags (is translate & push)
2-to-1
Translates the outermost two tags to another tag
2-to-2
Translates the outermost two tags to two other tags
TPID_VALUE
Set service TPID value as 0x8100/0x88a8/0x9100/0x9200
VID_RANGE
<2-4094>
inner-dot1q
Inner-VLAN for double-tagged
pop-2tag
Pop both the outer VID and inner VID
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#interface xe1.1 switchport
(config-if)#rewrite pop
(config-if)#exit
 
(config)#interface xe1.2 switchport
(config-if)#rewrite push 9100 3
(config-if)#exit
 
(config)#interface xe1.10 switchport
(config-if)#rewrite translate 9200 4
(config-if)#exit
 
(config)#interface xe1.10 switchport
(config-if)#rewrite push 0x8100 200 inner-dot1q 300
(config-if)#exit
 
(config)#interface xe1.1 switchport
(config-if)#rewrite pop-2tag
(config-if)#exit
(config)#interface xe1.1 switchport
(config-if)#no rewrite
(config-if)#ex
 
show cross-connect
Use this command to display the cross-connected subinterfaces along with their status and total number of cross-connects configured in the system.
Command Syntax
show cross-connect <WORD>
Parameters
WORD
Cross-connect name
Default
None
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
#show cross-connect
cross-connect status
XC name Ep1 Ep2 Status
-----------------------------+----------------+----------------+-------
c1 xe1.1 xe1.2 UP
-----------------------------+----------------+----------------+-------
AC cross-connect summary
Total : 1
Up : 1
Down : 0
#show cross-connect c1
cross-connect status
XC name Ep1 Ep2 Status
-----------------------------+----------------+----------------+-------
c1 xe1.1 xe1.2 UP
-----------------------------+----------------+----------------+-------
no subinterfaces
Use this command to unconfigure all the subinterfaces of any type (layer 2 or layer 3) created under a parent port.
Command Syntax
no subinterfaces
Parameters
None
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#interface xe1
(config-if)#no subinterfaces
(config-if)#exit