Example for Configuring Local MAC Swap Loopback
Networking Requirements
On SwitchB, GE1/0/1 connects to an Ethernet network and GE1/0/2 connects to users. A local MAC swap loopback test needs to be performed to test connectivity and performance of the Ethernet network. The local MAC swap loopback test checks performance of SwitchB.
Configuration Roadmap
The configuration roadmap is as follows:
- Create a VLAN and add GE1/0/1 and GE1/0/2 to the VLAN.
- Configure local MAC swap loopback on SwitchB.
- Enable the MAC swap loopback function on SwitchB to detect network connectivity and network quality.
Procedure
- Create VLAN 100 on SwitchB, configure GE1/0/1 as a trunk interface and GE1/0/2 as a hybrid interface, and add the interfaces to VLAN 100.
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] vlan batch 100 [SwitchB] interface gigabitethernet 1/0/1 [SwitchB-GigabitEthernet1/0/1] port link-type trunk [SwitchB-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 [SwitchB-GigabitEthernet1/0/1] quit [SwitchB] interface gigabitethernet 1/0/2 [SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 100 [SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 100
- Configure local MAC swap loopback on GE1/0/2 of SwitchB and specify GE1/0/1 as the outbound interface of loopback Ethernet frames. Enable the MAC swap loopback function.
[SwitchB-GigabitEthernet1/0/2] loopback local swap-mac source-mac 0018-2000-0085 dest-mac 018-2000-0070 vlan 100 interface gigabitethernet 1/0/1 timeout 80 [SwitchB-GigabitEthernet1/0/2] loopback swap-mac start [SwitchB-GigabitEthernet1/0/2] quit
- Verify the configuration.
# After completing the configuration, run the display loopback swap-mac information command to verify the configuration. If the configuration is correct, send IP packets from the tester to analyze network performance.
[SwitchB] display loopback swap-mac information Loopback type : local Loopback state : running Loopback test time(s) : 80 Loopback interface : GigabitEthernet1/0/2 Loopback output interface : GigabitEthernet1/0/1 Loopback source MAC : 0018-2000-0085 Loopback destination MAC : 0018-2000-0070 Loopback vlan : 100 Loopback inner vlan : 0 Loopback packets : 0 Drop packets : 0
Configuration Files
SwitchB configuration file
# sysname SwitchB # vlan batch 100 # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 100 port hybrid untagged vlan 100 loopback local swap-mac source-mac 0018-2000-0085 dest-mac 0018-2000-0070 vlan 100 interface GigabitEthernet1/0/1 timeout 80 # return