OcNOS SP : Layer 2 Guide : Layer 2 Command Reference : Layer 2 Control Protocols Tunneling Commands
Layer 2 Control Protocols Tunneling Commands
This chapter is a reference for the Layer 2 Control Protocols (L2CP) tunneling commands:
clear l2protocol interface counters
This command allows you to clear the counters for numbers of packets peered, discarded and tunneled.
Command Syntax
clear l2protocol interface (IFNAME|) counters (peer|discard|tunnel|tunnel-discard|)
Parameters
peer
Clear stats for Peer protocol packets.
discard
Clear stats for Tunnel protocol packets.
tunnel
Clear stats for Tunnel protocol packets.
tunnel-discard
Clear stats for Tunnel discard protocol packets.
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
# clear l2protocol interface xe1 counters peer
l2protocol
This command allows you to change the process of protocol to peer/discard/tunnel.
Command Syntax
l2protocol (stp|lacp|efm|elmi|lldp|synce)(peer|discard|tunnel)
Parameters
stp
Spanning Tree Protocols.
lacp
Link Aggregation (LACP).
efm
Ethernet first mile (Link OAM).
elmi
Ethernet local management interface.
lldp
Link layer discovery protocol.
synce
Link layer discovery protocol.
peer
Act as peer to the customer Device instance of the protocol.
discard
Discard the protocol data unit.
tunnel
Tunnel the Protocol data unit into the SVLAN.
Default
Default process value is peer.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
#configure terminal
(config)#interface xe1
(config-if)#switchport
(config-if)#bridge-group 1
(config-if)#switchport mode customer-edge access
(config-if)#l2protocol stp tunnel
(config-if)#l2protocol stp peer
(config-if)#l2protocol stp discard
 
 
l2protocol encapsulation dest-mac
Use this command to change destination mac of tunneled l2 protocol packet. Allowed mac are 0100.C2CD.CDD0 or 0104.DFCD.CDD0.
Use the no parameter with this command to set default mac 0100.C2CD.CDD0.
Note: This command only applies to provider bridging. For more information, see the OcNOS Carrier Ethernet Guide.
Command Syntax
bridge <1-32> l2protocol encapsulation dest-mac XXXX.XXXX.XXXX
no bridge <1-32> l2protocol encapsulation dest-mac
Parameters
bridge
Bridge group for bridging.
<1-32>
<1-32>
l2protocol
Configure Layer2 Protocol Tunneling.
encapsulation
Encapsulation of L2PT packet.
dest-mac
Encapsulation with destination mac.
XXXX.XXXX.XXXX
Destination Mac-address of L2PT tunneling (0100.C2CD.CDD0 or 0104.DFCD.CDD0).
Command Mode
Configuration mode
Applicability
This command is introduced in OcNOS version 3.0.
Examples
(config)#bridge 1 l2protocol encapsulation dest-mac ?
XXXX.XXXX.XXXX Destination Mac-address of L2PT tunneling (0100.C2CD.CDD0 or
0104.DFCD.CDD0)
(config)#bridge 1 l2protocol encapsulation dest-mac 0104.DFCD.CDD1
L2PT destination mac should be 0100.C2CD.CDD0 or 0104.DFCD.CDD0
(config)#bridge 1 l2protocol encapsulation dest-mac 0104.DFCD.CDD0
(config)#bridge 1 l2protocol encapsulation dest-mac 0100.C2CD.CDD0
(config)#bridge 1 l2protocol encapsulation dest-mac 0100.C2CD.CDD1
L2PT destination mac should be 0100.C2CD.CDD0 or 0104.DFCD.CDD0
(config)#
 
(config)#no bridge 1 l2protocol encapsulation dest-mac
(config)#show running-config | in bridge
bridge 1 protocol provider-rstp edge
vlan 2-10 type customer bridge 1 state enable
vlan 11-12 type service point-point bridge 1 state enable
cvlan registration table map1 bridge 1
bridge-group 1
bridge-group 1
(config)#
show l2protocol interface counters
This command allows you to display the counters for numbers of packets peered, discarded and tunneled.
Note: In case of Provider-Bridging, tunneling will be done via slow path forwarding (via CPU).

And for other tunneling feature such as L2VPN, EVPN cases, L2protocol will follow hardware forwarding path to be tunneled.

Except Provider-Bridging feature, for other tunneling feature such as L2VPN/EVPN cases, tunnel counters will not be captured. Peering and discarding decision will be taken at CPU, hence, these counters will be captured with this show command.
Command Syntax
show l2protocol interface (IFNAME|) counters (peer|discard|tunnel|tunnel-discard|)
Parameters
peer
Display stats for Peer protocol packets.
discard
Display stats for Tunnel protocol packets.
tunnel
Display stats for Tunnel protocol packets.
tunnel-discard
Display stats for Tunnel discard protocol packets.
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
# show l2protocol interface xe1 counters peer
Interface xe1
Peer: stp: 1
 
# show l2protocol interface xe1 counters
Interface xe1
Peer: stp: 1
Discard: stp: 10
Tunnel: stp: 5
 
 
 
 
show l2protocol processing interface
This command allows you to display the processing information on Layer 2 protocol interface.
Command Syntax
show l2protocol processing interface IFNAME
Parameters
IFNAME
Interface name
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command is introduced was before OcNOS version 3.0.
Examples
#show l2protocol processing interface xe1/1
Bridge Interface Name Protocol Processing Status
====== ============== ======== =================
1 xe1/1 stp Tunnel
1 xe1/1 gmrp Peer
1 xe1/1 gvrp Peer
1 xe1/1 mmrp Peer
1 xe1/1 mvrp Peer
1 xe1/1 lacp Peer
1 xe1/1 lldp Peer
1 xe1/1 efm Peer
1 xe1/1 elmi Peer
1 xe1/1 ptp Peer
1 xe1/1 synce Peer