- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
11-Loopback MAC swap commands | 59.77 KB |
Loopback MAC swap commands
Loopback MAC swap is supported only in R6348P01 and later.
display loopback swap-mac information
Use display loopback swap-mac information to display loopback MAC swap test information.
Syntax
display loopback swap-mac information
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display local loopback MAC swap test information.
<Sysname> display loopback swap-mac information
Loopback type : local
Loopback state : running
Loopback test times(s) : 60
Loopback interface : GigabitEthernet1/0/1
Loopback output interface : GigabitEthernet1/0/2
Loopback source MAC : 0001-0001-0001
Loopback destination MAC : 0002-0002-0002
Loopback vlan : 10
Loopback inner vlan : 0
Loopback packets : 0
Drop packets : 0
Table 1 Command output
Field |
Description |
Loopback type |
Loopback MAC swap test type: · local—Local loopback MAC swap. · remote—Remote loopback MAC swap. |
Loopback state |
Loopback MAC swap test status: · running—The loopback MAC swap test is started. · stop—The loopback MAC swap test is stopped. |
Loopback test time(s) |
Timeout timer for the test. If the value for this field is none, you need to manually stop the test with the relevant command. |
Loopback interface |
Interface that swaps the source and destination MAC addresses in the test packets. |
Loopback output interface |
Interface that loops back the test packets. |
Loopback source MAC |
Source MAC address that the test packets are required to match. |
Loopback destination MAC |
Destination MAC address that the test packets are required to match. |
Loopback vlan |
VLAN ID that the test packets are required to match. |
Loopbck inner vlan |
Inner VLAN ID that the test packets are required to match. |
Loopback packets |
Number of received packets that match the specified test parameters. |
Drop packets |
This field is not supported in the current software version. Number of dropped packets that do not match the specified test parameters. |
Related commands
loopback local swap-mac
loopback remote swap-mac
loopback local swap-mac
Use loopback local swap-mac to configure local loopback MAC swap parameters.
Use undo loopback local swap-mac to delete local loopback MAC swap parameters.
Syntax
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
Default
Local loopback MAC swap parameters are not configured.
Views
Ethernet interface view
Predefined user roles
network-admin
network-operator
Parameters
source-mac source-mac-address: Specifies the source MAC address that the test packets are required to match. The MAC address must be a unicast MAC address.
dest-mac dest-mac-address: Specifies the destination MAC address that the test packets are required to match. The MAC address must be a unicast MAC address.
vlan vlan-id: Specifies the VLAN ID that the test packets are required to match, in the range of 1 to 4094.
inner-vlan inner-vlan-id: Specifies the inner VLAN ID that the test packets are required to match, in the range of 1 to 4094. If you do not specify this option, the device does not match the inner VLAN ID of packets. interface interface-type interface-number: Specifies an interface by its type and number for looping back the test packets.
timeout { time-value | none }: Specifies the timeout timer for the test. After you start the loopback MAC swap test, the test automatically stops upon expiration of the timeout timer. The value range for the time-value argument is 5 to 300 seconds. If you specify the none keyword, the loopback MAC swap test does not automatically stop. You can only use the loopback swap-mac stop command to manually stop the test. By default, the timeout timer for the loopback MAC swap test is 60 seconds.
Usage guidelines
The device takes a packet as a test packet if its source MAC address, destination MAC address, VLAN ID, and inner VLAN ID match the settings configured in this command.
After configuring local loopback MAC swap parameters, you need to execute the loopback swap-mac start command to start the test. After starting the test, the tester sends test packets to the downlink interface on the tested device. The tested device swaps the source and destination MAC addresses in the test packets on the downlink interface, and then loops back the test packets to the tester through the specified interface. In this way, the network connectivity and quality information are obtained.
The test scope for local loopback MAC swap is the network from the tester to the downlink interface on the tested device (including the tested device).
Examples
# Configure local loopback MAC swap parameters.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback local swap-mac source-mac 00e0-fc00-0085 dest-mac 00e0-fc00-1004 vlan 100 interface gigabitethernet 1/0/2
loopback remote swap-mac
Use loopback remote swap-mac to configure remote loopback MAC swap parameters.
Use undo loopback remote swap-mac to delete remote loopback MAC swap parameters.
Syntax
loopback remote swap-mac source-mac source-mac-address dest-mac dest-mac-address vlan vlan-id [ inner-vlan inner-vlan-id ] [ timeout { time-value | none } ]
undo loopback remote swap-mac
Default
Remote loopback MAC swap parameters are not configured.
Views
Ethernet interface view
Predefined user roles
network-admin
network-operator
Parameters
source-mac source-mac-address: Specifies the source MAC address that the test packets are required to match. The MAC address must be a unicast MAC address.
dest-mac dest-mac-address: Specifies the destination MAC address that the test packets are required to match. The MAC address must be a unicast MAC address.
vlan vlan-id: Specifies the VLAN ID that the test packets are required to match, in the range of 1 to 4094.
inner-vlan inner-vlan-id: Specifies the inner VLAN ID that the test packets are required to match, in the range of 1 to 4094. If you do not specify this option, the device does not match the inner VLAN ID of packets.
timeout { time-value | none }: Specifies the timeout timer for the test. After you start the loopback MAC swap test, the test automatically stops upon expiration of the timeout timer. The value range for the time-value argument is 5 to 300 seconds. If you specify the none keyword, the loopback MAC swap test does not automatically stop. You can only use the loopback swap-mac stop command to manually stop the test. By default, the timeout timer for the loopback MAC swap test is 60 seconds.
Usage guidelines
The device takes a packet as a test packet if its source MAC address, destination MAC address, VLAN ID, and inner VLAN ID match the settings configured in this command.
After configuring remote loopback MAC swap parameters, you need to execute the loopback swap-mac start command to start the test. After starting the test, the tester sends test packets to the uplink interface on the tested device. The tested device swaps the source and destination MAC addresses in the test packets on the uplink interface, and then loops back the test packets to the tester through the uplink interface. In this way, the network connectivity and quality information are obtained.
The test scope for remote loopback MAC swap is the network from the tester to the uplink interface on the tested device (excluding the tested device).
Examples
# Configure remote loopback MAC swap parameters.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback local swap-mac source-mac 00e0-fc00-0085 dest-mac 00e0-fc00-1004 vlan 100
loopback swap-mac start
Use loopback swap-mac start to start the loopback MAC swap test.
Syntax
loopback swap-mac start
Views
Ethernet interface view
Predefined user roles
network-admin
network-operator
Usage guidelines
After configuring local or remote loopback MAC swap parameters, you need to execute the loopback swap-mac start command to start the test.
Both local and remote loopback MAC swap tests will affect normal operation of the network. As a best practice to minimize impact on the network, execute the loopback swap-mac stop command immediately to stop the test after it is completed.
Execute the loopback swap-mac start command again to start a new test if the previous test automatically stops upon expiration of the timeout timer or is manually stopped with the loopback swap-mac stop command.
Examples
# Start the loopback MAC swap test.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback swap-mac start
loopback swap-mac stop
Use loopback swap-mac stop to stop the loopback MAC swap test.
Syntax
loopback swap-mac stop
Views
Ethernet interface view
Predefined user roles
network-admin
network-operator
Usage guidelines
After configuring local or remote loopback MAC swap parameters, you need to execute the loopback swap-mac start command to start the test.
Both local and remote loopback MAC swap tests will affect normal operation of the network. As a best practice to minimize impact on the network, execute the loopback swap-mac stop command immediately to stop the test after it is completed.
Execute the loopback swap-mac start command again to start a new test if the previous test automatically stops upon expiration of the timeout timer or is manually stopped with the loopback swap-mac stop command.
Examples
# Stop the loopback MAC swap test.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback swap-mac stop