8.3. Configuring Phy Loopback
Overview
Function Introduction
Phy loopback is a proprietary based loopback. There are 2 types of phy loopback: phy(including internal and external) level loopback and port level loopback.
If a physical port is configured as “external phy loopback”, all packets coming into this port should be loopback back from the port itself at phy level.
If a physical port is configured as “internal phy loopback”, all packets expected out from this port should be looped back to specified physical port.
If a physical port is configured as “port loopback”, all packets coming into this port should be looped back from the port itself, and whether to swap the SMAC with the DMAC should be selectable by users. And if the MAC is swapped, the CRC should be recalculated.
Principle Description
N/A
Configuration
Configuring external phy loopback
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set loopback phy external
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# loopback phy external
step 3 Exit the configure mode
Switch(config-if)# end
step 4 Validation
Switch# show phy loopback
Interface Type DestIntf SwapMac
--------------------------------------------
eth-0-1 external - -
--------------------------------------------
Configuring internal phy loopback
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set loopback phy internal and specify the destination interface
Switch(config)# interface eth-0-2
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# loopback phy internal eth-0-2
step 3 Exit the configure mode
Switch(config-if)# end
step 4 Validation
Switch# show phy loopback
Interface Type DestIntf SwapMac
--------------------------------------------
eth-0-1 internal eth-0-2 -
--------------------------------------------
Configuring port level loopback
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set loopback phy mac-address swap
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# loopback port mac-address swap
step 3 Exit the configure mode
Switch(config-if) end
step 4 Validation
Switch# show phy loopback
Interface Type DestIntf SwapMac
--------------------------------------------
eth-0-1 port - yes
--------------------------------------------
Application cases
N/A