Configuring Ethernet Dataplane Loopback

Ethernet data plane loopback provides a means for remotely testing the throughput of an Ethernet port.

New and Changed Information

Table 1 New and Changed Features
Feature Description Changed in Release Where Documented

Ethernet data plane loopback.

QoS for Ethernet loopback

This feature provides a means for remotely testing the throughput of an Ethernet port on the Cisco ASR 903 router.

Cisco IOS XE Release 3.11

Information on Ethernet Data Plane Loopback

QoS Support for Ethernet Data Plane Loopback

Prerequisites for Ethernet Data Plane Loopback

  • Ethernet loopback sessions are supported only of EFPs (service instances, Ethernet flow points, EVCs).
  • Dot1q tags must be configured while configuring Ethernet loopback sessions on EFPs. However, loopback sessions can be configured using dot1q/QinQ, even if the underlying EFP has the dot1q/QinQ range configured.
  • Internal loopback sessions configured must be within the 1 GB reserved bandwidth.

Restrictions for Ethernet Data Plane Loopback

  • Data plane loopback on routed port infrastructure is not supported.
  • Etype, src-mac, or llc-oui based loopback traffic filtering is not supported.
  • Port-level QoS is not bypassed. The egress port shaper cannot be bypassed.
  • Port shaper on the ingress port in both external and internal loopback cannot be bypassed.
  • Ethernet loopback is not supported on a range of dot1q tags.
  • Internal and external loopbacks cannot be configured under EFP with encapsulation default or encapsulation untagged.
  • Only one Ethernet loopback (terminal or facility) session can be active on an EFP at any instance.
  • Egress span on the port and internal loopback on an EFP on the same port cannot be configured at the same time.
  • Egress ACL is not supported on the EFP.

Information on Ethernet Data Plane Loopback

The Ethernet data plane loopback feature provides a means for remotely testing the throughput of an Ethernet port. You can verify the maximum rate of frame transmission with no frame loss. This feature allows for bidirectional or unidirectional throughput measurement, and on-demand/out-of-service (intrusive) operation during service turn-up. Two types of Ethernet loopback is supported:

  • Facility loopback (external)—Traffic loopback occurs at the Ingress interface. Traffic does not flow into the router for loopback.
  • Terminal loopback (internal)—Traffic loopback occurs at the Egress interface. Traffic loopback occurs after the traffic flows into the router to the other interface.

QoS Support for Ethernet Data Plane Loopback

  • Ingress QoS is bypassed in external loopback on service instances.
  • Internal loopack sequence is as follows:
    • Ingress QoS
    • Egress QoS (egress port), but the ingress port shaper will also take effect.

How to Configure Ethernet Data Plane Loopback

Enabling Ethernet Data Plane Loopback

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    interface gigabitethernet slot/subslot/port

    4.    service instance number ethernet [name]

    5.    encapsulation{dot1q|second-dot1q}

    6.    bridge-domain bridge-id

    7.    ethernet loopback permit {external|permit}

    8.    end


DETAILED STEPS
      Command or Action Purpose
    Step 1 enable


    Example:
    Router> enable
     

    Enables privileged EXEC mode.

    Enter your password if prompted.

     
    Step 2 configure terminal


    Example:
    Router# configure terminal
     

    Enters global configuration mode.

     
    Step 3 interface gigabitethernet slot/subslot/port


    Example:
    Router (config)# interface gigabitEthernet 0/2/1
     

    Specifies an interface and enters interface configuration mode.

    • slot/subslot/port—The location of the interface.
     
    Step 4 service instance number ethernet [name]


    Example:
    Router(config-if)# service instance 1 ethernet
     

    Configure an EFP (service instance) and enter service instance configuration) mode.

    • number—Specifies the EFP identifier, an integer from 1 to 4000.
    • (Optional) ethernet name—Name of a previously configured EVC. You do not need to use an EVC name in a service instance.
     
    Step 5 encapsulation{dot1q|second-dot1q}


    Example:
    Router(config-if-srv)# encapsulation dot1q 120 
     

    Configure encapsulation type for the service instance.

    • dot1q—Configure 802.1Q encapsulation.
    • second-dot1q—Configures double-tagged 802.1Q encapsulation. Matching criteria to be used to map QinQ frames ingress on an interface to the appropriate EFP.
     
    Step 6 bridge-domain bridge-id


    Example:
    Router(config-if-srv)# bridge-domain 120
     
    bridge-id—Specifies the identifier for the bridge domain instance.  
    Step 7 ethernet loopback permit {external|permit}


    Example:
    Router(config-if-srv)# ethernet loopback permit external
     

    Configures Ethernet permit external or internal loopback on a interface. External loopback allows loopback of traffic from wire. This command is supported under a service instance.

    • external—Indicates facility loopback.
    • internal—Indicates terminal loopback.
     
    Step 8 end


    Example:
    Router# end
     

    Returns to privileged EXEC mode.

     

    Starting an Ethernet Data Plane Loopback Session


    Note


    By default the session would be running for 300 seconds unless explicitly specified by the user and automatically stopped after the session time expiry.
    SUMMARY STEPS

      1.    enable

      2.    ethernet loopback start local interface interface-id{service instance id}{external |internal }{dot1q vlan-id}[second-dot1q inner-vlan-id][cos cos-value][destination mac-address mac-address][timeout {seconds |none}]


    DETAILED STEPS
        Command or Action Purpose
      Step 1 enable


      Example:
      Router> enable
       

      Enables privileged EXEC mode.

      Enter your password if prompted.

       
      Step 2 ethernet loopback start local interface interface-id{service instance id}{external |internal }{dot1q vlan-id}[second-dot1q inner-vlan-id][cos cos-value][destination mac-address mac-address][timeout {seconds |none}]
       

      Starts Ethernet external or internal loopback on the interface for a specific service.

      • interface-id—Specifies the interface.
      • service instanceid—Specifies the service instance.
      • external—Indicates facility loopback.
      • internal—Indicates terminal loopback.
      • dot1qvlan-id—Specifies the s-tag of the packets to be loopbacked. If the filter option is not specified, all of the packets with all VLANs are eligible to be loopbacked.
      • (Optional) second-dot1qinner-vlan-id—Specifies the c-tag of the packets to be loopbacked. If the filter option is not specified, all of the packets with all inner VLANs are eligible to be loopbacked
      • (Optional) coscos-value—Specifies the 802.1p/cos of the packets to be loopbacked. If the filter option is not specified, all of the packets with “Any” cos are eligible to be loopbacked.
      • (Optional) destination mac-addressmac-address—Specifies the destination mac address of the packets to be loopbacked. If the filter option is not specified, all of the packets with “Any” destination mac are eligible to be loopbacked.
      • (Optional) timeoutseconds—Sets a loopback timeout period. The range is from 1 to 90000 seconds (25 hours). The default is 300 seconds.
      • (Optional) timeoutnone—Sets the loopback to no timeout.
       

      Configuration Examples

      Example: Configuring External Loopback

      This example shows how to configure external (facility) loopback.

      Router(config)# interface gigabitEthernet 0/2/1
      Router(config-if)# service instance 1 ethernet
      Router(config-if-srv)# encapsulation dot1q 120
      Router(config-if-srv)# bridge-domain 120
      Router(config-if-srv)# ethernet loopback permit external
      

      This example shows external (facility) loopback on the Gigabit Ethernet 0/4/1 interface:

      interface GigabitEthernet0/4/1
       no ip address
       negotiation auto
       service instance 10 ethernet
        encapsulation dot1q 10
        rewrite ingress tag pop 1 symmetric
        bridge-domain 10
        ethernet loopback permit external ===? For facility loopback
       !
      end

      This example below shows how to start external (facility) loopback on the router. A warning message is displayed. Type yes to continue.

      Router# ethernet loopback start local interface gigabitEthernet 0/4/1 service instance 10 external dot1q 10 cos 1 destination mac-address 0000.0000.0001 timeout none
      
      This is an intrusive loopback and the packets matched with the service will not  be able to pass through. 
      Continue? (yes/[no]): yes
      

      Example: Configuring Terminal Loopback

      This example shows internal (terminal) loopback on Gigabit Ethernet 0/4/1 interface:

      interface TenGigabitEthernet0/0/0
       no ip address
      service instance 10 ethernet
        encapsulation dot1q 10
        rewrite ingress tag pop 1 symmetric
        bridge-domain 10
        ethernet loopback permit internal  ===? For Terminal Loopback
       !
      end

      Verifying Ethernet Data Plane Loopback

      Example: Verifying Ethernet Dataplane Loopback

      Use the show ethernet loopback {active | permitted} [interface interface number] command.

      • The following example displays the loopback capabilities per interface. The output shows internal (terminal) loopback has been permitted on Ten Gigabit Ethernet 0/0/0 interface and external (facility) loopback has been permitted on Gigabit Ethernet 0/4/1 interface.
        Router# show ethernet loopback permitted 
        
        --------------------------------------------------------------------------------
        Interface                               SrvcInst Direction            
        Dot1q/Dot1ad(s)                         Second-Dot1q(s)
        --------------------------------------------------------------------------------
        Te0/0/0                                 10                             Internal
        10
        Gi0/4/1                                 10                             External
        10
        
      • This example shows all active sessions on the router.
        Router# show ethernet loopback active           
        
        ============================================================
        Loopback Session ID     : 1
        Interface                         : GigabitEthernet0/4/1
        Service Instance            :10
        Direction                         : External
        Time out(sec)                 : none
        Status                             : on
        Start time                        : 10:31:09.539 IST Mon Aug 26 2013
        Time left                          : N/A
        Dot1q/Dot1ad(s)             : 10
        Second-dot1q(s)             :
        Source Mac Address       : Any
        Destination Mac Address : 0000.0000.0001
        Ether Type                        : Any
        Class of service                : 1
        Llc-oui                               : Any
        
        
        Total Active Session(s): 1
        Total Internal Session(s): 0
        Total External Session(s): 1