OcNOS-DC : System Management Guide : System Management Configuration Guide : Ethernet Interface Loopback Support Configurations
Ethernet Interface Loopback Support Configurations
This section contains the Ethernet Interface Loopback Support configuration example.
Overview
This feature support is to provide additional hardware diagnostic functionality for physical ports on boards. This feature will enable the user to determine if there are any issues in the physical port at the MAC and the PHY layer.
To achieve this functionality, the Ethernet interfaces can be configured as the loopback interfaces. Looping back the packets are possible either at MAC layer or at PHY layer. Also packets can be looped either from Egress to Ingress or Ingress to Egress. On enabling this feature, if all the TX packets are looped back to RX, it indicates there is no issue with the hardware at the particular layer configured, either MAC or PHY.
Local Loopback
Tx PHY Loopback
 
When the loopback Tx PHY is enabled on an Ethernet interface, packets that the traffic generator receives on such an interface are loop-backed to the originator and forwarded to the destination.
Because loopback is enabled as the Tx PHY in the diagram above, packets will loop at the physical layer, and the same number of packets will be returned to the traffic generator from the DUT's Egress to Ingress side. Thus, the Tx and Rx counts of receiving and transmitting interfaces are the same. The packets are looped and also forwarded to their next destination.
Tx MAC Loopback
 
Loopback Tx MAC is enabled on the Ethernet interface, and when packets from the traffic generator arrive on such an interface, they are loop-backed to the originator rather than being forwarded.
In the above diagram, as loopback is enabled as a Tx MAC, the packets will loop at the MAC layer (data link layer), and the same number of packets are returned from the egress side to the ingress side of the DUT to the traffic generator. Thus, the Tx and Rx counts of receiving and transmitting interfaces are the same. The packets are looped but not forwarded further.
Remote Loopback
Rx PHY Loopback
 
Loopback Rx PHY is enabled on the ethernet interface, and when packets from the traffic generator arrive at a remote node via such an interface, they are loop-backed to the originator and forwarded to the next route.
In the above diagram, as loopback is enabled as Rx PHY on DUT2, the packets will loop at the physical layer of the DUT2, and the same number of packets are returned from the ingress to the egress side of the DUT2 to DUT1 and the traffic generator. Thus, the Tx and Rx counts of receiving and transmitting interfaces are the same. The packets are looped back to Traffic Generator1 as well as forwarded to Traffic Generator2.
Rx MAC Loopback
 
Loopback Rx MAC is enabled on the ethernet interface, and when packets from the traffic generator arrive at a remote node via such an interface, they are loop-backed to the originator but not forwarded to the next route.
In the above diagram, as loopback is enabled as Rx MAC on DUT2, the packets will loop at the MAC layer (data link layer) of the DUT2, and the same number of packets are returned from the ingress to the egress side of the DUT2 to DUT1 and the traffic generator. Thus, the Tx and Rx counts of receiving and transmitting interfaces are the same. The packets are looped back to Traffic Generator1, but not forwarded to Traffic Generator2.
Topology
 
Ethernet Interface Loopback Support
Scenario-1: PHY level Tx Loopback
Configuration of ROUTER-1 device
 
#configure terminal
Enter Configure mode.
(config)#hostname ROUTER-1
Configure the hostname
(config)#commit
Commit the configuration
(config)#bridge 1 protocol rstp vlan-bridge
Configure bridge
(config)#vlan database
Enter into VLAN database
(config-vlan)#vlan 2 bridge 1
Configure VLAN
(config-vlan)#exit
Exit the VLAN database mode
(config)#interface ce1/1
Enter into interface ce1/1
(config-if)#switchport
Configure switchport
(config-if)#bridge-group 1
Configure bridge-group
(config-if)#switchport mode trunk
Configure switchport mode as trunk
(config-if)#switchport trunk allowed vlan add 2
Add all the VLANs to the interface
(config-if)#exit
Exit the interface mode
(config)#interface ce5/1
Enter into interface ce1/1
(config-if)# port breakout enable 4*10g
Configure port breakout
(config-if)#switchport
Configure switchport
(config-if)#bridge-group 1
Configure bridge-group
(config-if)#switchport mode trunk
Configure switchport mode as trunk
(config-if)#switchport trunk allowed vlan add 2
Add all the VLANs to the interface
(config-if)#loopback tx phy
Configure loopback Tx PHY
(config-if)#exit
Exit the interface level
(config)#no mac-address-table learning bridge 1 interface ce1/1
Disable the MAC-learning on the device
(config)#no mac-address-table learning bridge 1 interface ce5/1
Disable the MAC-learning on the device
(config)#commit
Commit the configuration
(config)#exit
Exit from configuration mode
Configuration of ROUTER-2 device
 
#conf terminal
Enter into the configure terminal mode
(config)#hostname ROUTER-2
Configure the hostname
(config)#commit
Commit the configuration
(config)#exit
Exit configuration mode
#conf terminal
Enter into the configure terminal mode
(config)#bridge 1 protocol rstp vlan-bridge
Configure bridge
(config)#vlan database
Enter into VLAN database
(config-vlan)#vlan 2 bridge 1
Configure VLAN
(config-vlan)#exit
Exit the VLAN database mode
(config)#interface ce3/1
Enter into interface ce3/1
(config-if)#switchport
Configure switchport
(config-if)#bridge-group 1
Configure bridge-group
(config-if)#switchport mode trunk
Configure switchport mode as trunk
(config-if)#switchport trunk allowed vlan add 2
Add the VLAN to the interface
(config-if)#exit
Exit the interface mode
(config-if)#interface ce29/1
Enter into interface ce29/1
(config-if)# Port breakout enable 4*10g
Configure port breakout
(config-if)#switchport
Configure switchport
(config-if)#bridge-group 1
Configure bridge-group
(config-if)#switchport mode trunk
Configure switchport mode as trunk
(config-if)#switchport trunk allowed vlan add 2
Add the VLAN to the interface
(config-if)#exit
Exit from interface level
(config)#no mac-address-table learning bridge 1 interface ce3/1
Disable the MAC-learning on the device
(config)#no mac-address-table learning bridge 1 interface ce29/1
Disable the MAC-learning on the device
(config)#commit
Commit the configuration
(config)#exit
Exit from configuration mode
Validation
On ROUTER-1 Device:
#show running-config interface ce1/1
!
interface ce1/1
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
 
#show running-config interface ce5/1
!
interface ce5/1
port breakout enable 4X10g
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
loopback tx phy
!
 
#show interface ce5/1
Interface ce5/1
Flexport: Breakout Control Port (Active): Break Out Enabled
Hardware is ETH Current HW addr: 34ef.b689.e04a
Physical:34ef.b689.e04a Logical:(not set)
Forward Error Correction (FEC) configured is Auto (default)
FEC status is N/A
Port Mode is trunk
Interface index: 5045
Metric 1 mtu 1500 duplex-full link-speed 10g
Debounce timer: disable
Loopback Type: PHY
<UP,BROADCAST,RUNNING,MULTICAST>
VRF Binding: Not bound
DHCP client is disabled.
Last Flapped: 2021 Oct 23 15:57:01 (00:08:51 ago)
Statistics last cleared: 2021 Oct 23 15:54:44 (00:11:08 ago)
5 minute input rate 255 bits/sec, 0 packets/sec
5 minute output rate 255 bits/sec, 0 packets/sec
RX
unicast packets 0 multicast packets 2272 broadcast packets 0
input packets 2272 bytes 153730
jumbo packets 0
undersize 0 oversize 0 CRC 0 fragments 0 jabbers 0
input error 0
input with dribble 0 input discard 7
Rx pause 0
TX
unicast packets 0 multicast packets 4333 broadcast packets 0
output packets 4333 bytes 293304
jumbo packets 0
output errors 0 collision 0 deferred 0 late collision 0
output discard 0
Tx pause 0
 
# show interface brief
--------------------------------------------------------------------------------
Ethernet Type PVID Mode Status Reason Speed Port Ctl Br/Bu Loopbk
Interface Ch #
--------------------------------------------------------------------------------
ce5/1 ETH 1 trunk up none 10g -- Br Yes PHY
 
On ROUTER-2 Device:
#show running-config interface ce3/1
!
interface ce3/1
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
 
#show running-config interface ce29/1
!
interface ce29/1
port breakout enable 4X10g
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
 
Interface counters before configuring loopback on both the devices:
========================================================
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce1/1 8.65 8446138 0.00 0
ce5/1 0.00 0 8.65 8446125
 
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce3/1 0.00 0 8.65 8446188
ce29/1 8.65 8446254 0.00 0
Interface counters after configuring loopback Tx PHY on ROUTER-1 device:
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce1/1 8.65 8446147 8.65 8446319
ce5/1 8.65 8446194 8.65 8446194
 
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce3/1 0.00 0 0.00 0
Un-Config the Loopback
 
#configure terminal
Enter into configure terminal mode
(config)#in ce5/1
Enter into interface level
(config-if)#no loopback
Un-configure the loopback
(config-if)#commit
Commit the configuration
(config-if)#end
Exit from the configuration mode
Scenario-2 Loopback Tx MAC
 
#configure terminal
Enter into configure terminal mode
(config)#in ce5/1
Enter into interface level
(config-if)# loopback tx mac
Configure loopback Tx MAC
(config-if)#commit
Commit the configuration
(config-if)#end
Exit from the configuration mode
Validation
On ROUTER-1 Device:
#show running-config interface ce1/1
!
interface ce1/1
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
 
#show running-config interface ce5/1
!
interface ce5/1
port breakout enable 4X10g
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
loopback tx mac
!
 
#show interface ce5/1
Interface ce5/1
Flexport: Breakout Control Port (Active): Break Out Enable
Hardware is ETH Current HW addr: 34ef.b689.e04a
Physical:34ef.b689.e04a Logical:(not set)
Forward Error Correction (FEC) configured is Auto (default)
FEC status is N/A
Port Mode is trunk
Interface index: 5045
Metric 1 mtu 1500 duplex-full link-speed 10g
Debounce timer: disable
Loopback Type: MAC
<UP,BROADCAST,RUNNING,MULTICAST>
VRF Binding: Not bound
DHCP client is disabled.
Last Flapped: 2021 Oct 23 15:57:01 (00:08:51 ago)
Statistics last cleared: 2021 Oct 23 15:54:44 (00:11:08 ago)
5 minute input rate 255 bits/sec, 0 packets/sec
5 minute output rate 255 bits/sec, 0 packets/sec
RX
unicast packets 0 multicast packets 2272 broadcast packets 0
input packets 2272 bytes 153730
jumbo packets 0
undersize 0 oversize 0 CRC 0 fragments 0 jabbers 0
input error 0
input with dribble 0 input discard 7
Rx pause 0
TX
unicast packets 0 multicast packets 4333 broadcast packets 0
output packets 4333 bytes 293304
jumbo packets 0
output errors 0 collision 0 deferred 0 late collision 0
output discard 0
Tx pause 0
 
#show interface brief
--------------------------------------------------------------------------------
Ethernet Type PVID Mode Status Reason Speed Port Ctl Br/Bu Loopbk
Interface Ch #
--------------------------------------------------------------------------------
ce5/1 ETH 1 trunk up none 10g -- Br Yes MAC
 
On ROUTER-2 device:
#show running-config interface ce3/1
!
interface ce3/1
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
 
#show running-config interface ce29/1
!
interface ce29/1
switchport
bridge-group 1
switchport mode trunk
switchport trunk allowed vlan add 2
!
Interface counters before configuring loopback on both the devices:
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce1/1 8.65 8432138 0.00 0
ce5/1 0.00 0 8.65 8430125
 
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce3/1 0.00 0 8.65 8429188
ce29/1 8.65 8430254 0.00 0
Interface counters after configuring loopback Tx PHY on ROUTER-1 devices:
#sh interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce1/1 8.65 8446147 8.65 8446319
ce5/1 8.65 8446194 8.65 8446194
 
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce3/1 0.00 0 0.00 0
ce29/1 0.00 0 0.00 0
 
Un-Config the Loopback
 
#configure terminal
Enter into configure terminal mode
(config)#in ce5/1
Enter into interface level
(config-if)#no loopback
UnConfigure loopback
(config-if)#commit
Commit the configuration
(config-if)#end
Exit from the configuration mode
Scenario-3 Loopback Rx PHY
 
#configure terminal
Enter into configure terminal mode
(config)#in ce29/1
Enter into interface level
(config-if)#loopback rx phy
Configure loopback Rx PHY
(config-if)#commit
Commit the configuration
(config-if)#end
Exit from the configuration mode
Validation
On ROUTER-2 device:
#show interface ce29/1
Interface ce29/1
Flexport: Breakout Control Port (Active): Break Out Enabled
Hardware is ETH Current HW addr: 80a2.357f.4ebd
Physical:80a2.357f.4ebd Logical:(not set)
Forward Error Correction (FEC) configured is Auto (default)
FEC status is N/A
Port Mode is trunk
Interface index: 5001
Metric 1 mtu 1500 duplex-full link-speed 10g
Debounce timer: disable
Loopback Type: R-PHY
<UP,BROADCAST,RUNNING,MULTICAST>
VRF Binding: Not bound
DHCP client is disabled.
Last Flapped: 2019 Apr 30 10:03:23 (00:00:58 ago)
Statistics last cleared: 2019 Apr 30 09:43:30 (00:20:51 ago)
30 second input rate 8648972937 bits/sec, 8446291 packets/sec
30 second output rate 20723 bits/sec, 38 packets/sec
RX
unicast packets 3390485528 multicast packets 6205 broadcast packets 0
input packets 3390494721 bytes 433982963744
jumbo packets 0
undersize 0 oversize 0 CRC 0 fragments 1 jabbers 0
input error 1
input with dribble 0 input discard 39330
Rx pause 0
TX
unicast packets 0 multicast packets 6009 broadcast packets 0
output packets 6009 bytes 408564
jumbo packets 0
output errors 0 collision 0 deferred 0 late collision 0
output discard 0
Tx pause 0
 
#show interface brief
--------------------------------------------------------------------------------
Ethernet Type PVID Mode Status Reason Speed Port Ctl Br/Bu Loopbk
Interface Ch #
--------------------------------------------------------------------------------
ce29/1 ETH 1 trunk up none 10g -- Br Yes R-PHY
Interface counters after configuring loopback Rx PHY on ROUTER-2 device
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce1/1 8.65 8446140 8.65 8446141
ce5/1 8.65 8446058 8.65 8446058
 
#show interface counters rate gbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx gbps | Rx pps | Tx gbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
ce3/1 0.00 0 8.65 8446218
ce29/1 8.65 8446222 0.00