The loopback local swap-mac command enables local MAC swap loopback.
The undo loopback local swap-mac command disables local MAC swap loopback.
By default, local MAC swap loopback is disabled on an interface.
The S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S do not support this command.
loopback local swap-mac source-mac source-mac-address dest-mac dest-mac-address vlan vlan-id [ inner-vlan inner-vlan-id ] interface interface-type interface-number [ timeout { time-value | none } ]
undo loopback local swap-mac
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support the inner-vlan inner-vlan-id parameter.
Parameter |
Description |
Value |
---|---|---|
source-mac source-mac-address |
Specifies the source MAC address of test packets. |
The value is in H-H-H format. An H is a hexadecimal number of 1 to 4 digits. The source and destination MAC addresses must be unicast MAC addresses. |
dest-mac dest-mac-address |
Specifies the destination MAC address of test packets. |
The value is in H-H-H format. An H is a hexadecimal number of 1 to 4 digits. The source and destination MAC addresses must be unicast MAC addresses. |
vlan vlan-id |
Specifies the VLAN ID of test packets. |
The value is an integer that ranges from 1 to 4094. |
inner-vlan inner-vlan-id |
Specifies the inner VLAN ID of test packets. |
The value is an integer that ranges from 1 to 4094. |
interface interface-type interface-number |
Specifies the outbound interface that sends loopback packets back to the tester.
|
- |
timeout time-value |
Specifies the timeout period of a loopback test. If the loopback swap-mac start command is run to enable MAC swap loopback, a MAC swap loopback test stops after the timeout period of the loopback test expires. |
The value is an integer that ranges from 5 to 300, in seconds. The default value is 60. |
timeout none |
Indicates that the loopback test timeout function is disabled. If the loopback swap-mac start command is run to enable MAC swap loopback, a MAC swap loopback test cannot automatically stop after its timeout period expires. Instead, you must run the loopback swap-mac stop command to manually stop the MAC swap loopback test. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, Eth-Trunk interface view
Usage Scenario
Before using the Switch to provide services for users, perform a local MAC swap loopback test on the Switch to check whether the Switch can provide services properly. This test checks connectivity and QoS CAR of the network between the Switch downlink interface and a remote device. The local MAC swap loopback test can also check whether VLAN mapping and VLAN stacking are configured successfully on the downlink interface.
A local MAC swap loopback test checks connectivity and performance of the network between a tester and a tested switch, and performance of the tested switch.
In a local MAC swap loopback test, a tester sends test packets to the Switch. When test packets reach the downlink interface, the Switch swaps the source and destination MAC addresses of test packets and sends the packets back to the tester through a specified outbound interface.
Follow-up Procedure
Run the loopback swap-mac start command to enable the MAC swap loopback function.
Precautions
When a local loopback test is performed on an interface, all services on the interface are interrupted.
An Eth-Trunk interface in LACP mode does not support the local MAC swap loopback function. An Eth-Trunk member interface does not support the MAC swap loopback function.
Before enabling the local MAC swap loopback function, you need to run the undo stp enable command to disable STP on the interface.
The port is not a Layer 3 port. If the port is a Layer 3 port, run the portswitch command to switch the port to the Layer 2 mode.
If a large number of test packets are sent, test packets occupy bandwidth of other services on the interface that sends test packets.