Configuring Loopback Mode

Loopback-mode means that a physical port can become network-port (ingress) and tool-port(egress) to which flow rules can be applied. A loopback-mode port is operated in loopback mode and avoids customers connecting a physical cable to make it operate in Loopback mode.

As soon as a port is configured as a loopback-mode port, it is internally changed to a loopback mode state. This means that the link is UP with or without cables being inserted. Traffic flows out of a loopback-mode port (Tx direction) and loops back to it (Rx direction).

loopback-mode ports can provide the following flexibility:

  • Support for multiple lookups on the same packet. For example, decapsulate the tunnel and look up based on the inner header.

  • Multiple egress actions on the same traffic. For example (shown here) send to tool as-is and add VLAN tag.

The following command is used to configure the interface to work as both network-port and tool-port. When enabled on an interface, it acts like a mac loopback which loops back the egress packets back to the device on the same port.



loopback-mode no loopback-mode


Activation loopback mode






pbnoscli# configure terminal 
pbnoscli(config)# interface ethernet Ethernet4/1
pbnoscli(config-if)# loopback      
  loopback-mode         Activate loopback mode
pbnoscli(config-if)# loopback-mode 

You can verify the configuration by using the command(s) below:

pbnoscli# show interface npb Ethernet4/1
Interface : Ethernet4/1      
Mode           : vlan-aware      
Ingress-vlan   : 6              
Egress-tagging : disable         
Loopback-mode  : enable          

pbnoscli# show running-config 
configure terminal
interface ethernet Ethernet4/1
speed 1000
description interface description
mode vlan-aware
interface mgmt
ip address gateway