Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
224 views14 pages

01-06 MAC Swap Loopback Configuration

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
224 views14 pages

01-06 MAC Swap Loopback Configuration

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

S2720, S5700, and S6720 Series Ethernet Switches

Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

6 MAC Swap Loopback Configuration

About This Chapter

6.1 Overview of MAC Swap Loopback


6.2 MAC Swap Loopback Features Supported by the Switch
6.3 Summary of MAC Swap Loopback Configuration Tasks
6.4 Licensing Requirements and Limitations for MAC Swap Loopback
6.5 Configuring Local MAC Swap Loopback
6.6 Configuring Remote MAC Swap Loopback
6.7 Configuration Examples for MAC Swap Loopback

6.1 Overview of MAC Swap Loopback

Description
MAC swap loopback is a technique which modifies the header of a received
Ethernet frame by swapping the source and destination MAC addresses so that the
frame can be returned to the sender. This function effectively checks Ethernet
connectivity and network performance.

Purpose
MAC swap loopback is used for checking Ethernet network connectivity and
performance. It can be used with a network performance test tool to assess the
connectivity, throughput, and QoS of an Ethernet network.
MAC swap loopback tests can only be performed on Ethernet frames with IP
payloads.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 311


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

6.2 MAC Swap Loopback Features Supported by the


Switch

Local MAC Swap Loopback Test


A local MAC swap loopback test checks connectivity and performance of the
network between a tester and a tested switch, as well as performance of the
tested switch. In Figure 6-1, Ethernet frames sent by a tester traverse an Ethernet
network and reach the tested switch (SwitchB). After the tested switch receives
the Ethernet frames, it forwards them to the interface where local MAC swap
loopback is configured. The tested switch swaps the source and destination MAC
addresses of all Ethernet frames that match the local MAC swap loopback
configuration and sends the Ethernet frames back to the tester through the
interface where local MAC swap loopback is configured. The tester then analyzes
network performance based on Ethernet frames sent from the tested switch.
When a local MAC swap test is performed on an interface, services on the
interface are interrupted, but services on other interfaces are not affected. If a
large number of test packets are sent, test packets occupy bandwidth of other
services on the interface that sends test packets back to the tester.

Figure 6-1 Local MAC swap loopback test

Tester

DMAC SMAC DATA SMAC DMAC DATA

SMAC DMAC DATA


Ethernet

SwitchA SwitchB Users

DMAC SMAC DATA

Remote MAC Swap Loopback Test


A remote MAC swap loopback test checks connectivity and performance of the
network between a tester and a tested switch but does not check performance of
the tested switch. In Figure 6-2, Ethernet frames sent by a tester traverse an
Ethernet network and reach the tested switch (SwitchB). After the tested switch
receives the Ethernet frames, the switch swaps the source and destination MAC
addresses of all Ethernet frames that match the remote MAC swap loopback
configuration and sends the Ethernet frames back to the tester through the
interface where remote MAC swap loopback is configured. The tester then
analyzes network performance based on Ethernet frames sent from the tested
switch.
A remote MAC swap loopback test modifies only Ethernet frames matching the
MAC swap loopback configuration on an interface, and other Ethernet frames can

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 312


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

still be forwarded on the interface. However, if a large number of test packets are
sent, test packets occupy bandwidth of other services on the interface.

Figure 6-2 Remote MAC swap loopback test

Tester

DMAC SMAC DATA SMAC DMAC DATA

SMAC DMAC DATA


Ethernet

SwitchA SwitchB Users


DMAC SMAC DATA

6.3 Summary of MAC Swap Loopback Configuration


Tasks
Local and remote MAC swap loopback tests check Ethernet connectivity and
network performance.
Table 6-1 describes the configuration tasks of MAC swap loopback.

Table 6-1 MAC swap loopback configuration tasks


Scenario Description Task

Configure local MAC A local MAC swap 6.5 Configuring Local


swap loopback loopback test checks MAC Swap Loopback
connectivity and
performance of the
network between a
tester and a tested
switch, as well as
performance of the
tested switch.

Configure remote MAC A remote MAC swap 6.6 Configuring Remote


swap loopback loopback test checks MAC Swap Loopback
connectivity and
performance of the
network between a
tester and a tested
switch but does not
check performance of
the tested switch.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 313


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

6.4 Licensing Requirements and Limitations for MAC


Swap Loopback

Involved Network Elements


Other network elements are not required.

Licensing Requirements
MAC swap loopback is a basic feature of a switch and is not under license control.

Version Requirements

Table 6-2 Products and versions supporting MAC swap loopback

Prod Product Version


uct Model

S270 S2700SI Not supported


0
S2700EI Not supported

S2710SI Not supported

S2720EI V200R006C10, V200R009C00, V200R010C00,


V200R011C10, V200R012C00, V200R013C00

S2750EI V200R003C00, V200R005C00SPC300, V200R006C00,


V200R007C00, V200R008C00, V200R009C00,
V200R010C00, V200R011C00, V200R011C10,
V200R012C00

S370 S3700SI V100R005C01, V100R006(C00&C01&C03&C05)


0
S3700EI V100R005C01, V100R006(C00&C01&C03&C05)

S3700HI V100R006C01, V200R001C00

S570 S5700LI V200R003(C00&C02&C10), V200R005C00SPC300,


0 V200R006C00, V200R007C00, V200R008C00,
V200R009C00, V200R010C00, V200R011C00,
V200R011C10, V200R012C00

S5700S-LI V200R003C00, V200R005C00SPC300, V200R006C00,


V200R007C00, V200R008C00, V200R009C00,
V200R010C00, V200R011C00, V200R011C10,
V200R012C00

S5720LI and V200R010C00, V200R011C00, V200R011C10,


S5720S-LI V200R012(C00&C20), V200R013C00

S5710-C-LI V200R001C00

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 314


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Prod Product Version


uct Model

S5710-X-LI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10, V200R012C00

S5700SI V100R005C01, V100R006C00, V200R001C00,


V200R002C00, V200R003C00, V200R005C00

S5700EI V100R005C01, V100R006(C00&C01),


V200R001(C00&C01), V200R002C00, V200R003C00,
V200R005(C00&C01&C02&C03)

S5710EI V200R001C00, V200R002C00, V200R003C00,


V200R005(C00&C02)

S5720EI V200R007C00, V200R008C00, V200R009C00,


V200R010C00, V200R011C00, V200R011C10,
V200R012C00, V200R013C00

S5700HI V100R006C01, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00SPC500&C01&C02)

S5710HI V200R003C00, V200R005(C00&C02&C03)

S5720HI V200R006C00, V200R007(C00&C10), V200R008C00,


V200R009C00, V200R010C00, V200R011C00,
V200R011C10, V200R012C00, V200R013C00

S5730HI V200R012C00, V200R013C00

S5720SI and V200R008C00, V200R009C00, V200R010C00,


S5720S-SI V200R011C00, V200R011C10, V200R012C00,
V200R013C00

S5720I-SI V200R012C00, V200R013C00

S5730SI V200R011C10, V200R012C00, V200R013C00

S5730S-EI V200R011C10, V200R012C00, V200R013C00

S670 S6720LI and V200R011C00, V200R011C10, V200R012C00,


0 S6720S-LI V200R013C00

S6720SI and V200R011C00, V200R011C10, V200R012C00,


S6720S-SI V200R013C00

S6700EI V100R006C00, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00&C01&C02)

S6720EI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10, V200R012C00,
V200R013C00

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10, V200R012C00, V200R013C00

S6720HI V200R012C00, V200R013C00

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 315


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

NOTE
For details about software mappings, visit Hardware Query Tool and search for the desired
product model.

Feature Limitations
● The MAC swap loopback test cannot be used with the ACL (including the ACL
used in CAR, traffic statistics, and 802.1p priority re-marking) that matches
the source and destination MAC addresses of loopback test packets.
● After ALS is configured on the S6700EI, MAC swap loopback becomes
ineffective. When MAC swap loopback needs to be configured on the S6700EI,
do not configure ALS.

6.5 Configuring Local MAC Swap Loopback

Pre-configuration Tasks
A local MAC swap loopback test checks Ethernet connectivity and network
performance.

Before configuring local MAC swap loopback, complete the following tasks:

● Create a VLAN and add the interface where you want to perform the remote
MAC swap loopback test to the VLAN.
● Configure QoS CAR if you want to test QoS on the network (see Traffic
Policing, Traffic Shaping, and Interface-based Rate Limiting Configuration in
the S2720, S5700, and S6720 V200R013C00 Configuration Guide - QoS).
NOTE
The MAC swap loopback test cannot be used with the ACL (including the ACL used in
CAR, traffic statistics, and 802.1p priority re-marking) that matches the source and
destination MAC addresses of loopback test packets.

6.5.1 Configuring Local MAC Swap Loopback

Context
Before performing a local MAC swap loopback test, configure the source MAC
address, destination MAC address, and VLAN ID of test packets on the Switch.
Only the packets with the specified source MAC address, destination MAC address,
and VLAN ID are looped back.

When a local MAC swap test is performed on an interface, services on the


interface are interrupted, but services on other interfaces are not affected.
However, if a large number of test packets are sent, test packets occupy
bandwidth of other services on the interface that sends test packets back to the
tester.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 316


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run 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 } ]
NOTE

Only the S5720EI, S5720HI, S5730HI, S6720EI, S6720HI, and S6720S-EI support the inner-
vlan inner-vlan-id parameter.
QinQ and MAC swap loopback can be used simultaneously on a loopback interface of the
S5720EI, S5720HI, S5730HI, S6720EI, S6720HI, and S6720S-EI. If a loopback interface joins a
VLAN in untagged mode, packets sent from the loopback interface do not carry tags. If a
loopback interface joins a VLAN in tagged mode, packets sent from the loopback interface
carry tags.

----End

6.5.2 Enabling the MAC Swap Loopback Function

Context
A loopback test causes network performance to deteriorate. If a large number of
test packets are sent, bandwidth of other services is occupied. To ensure
satisfactory network performance, enable the MAC swap loopback function only
when the loopback test begins and disable it immediately after the loopback test
is complete.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback swap-mac start
The MAC swap loopback function is enabled.
The loopback swap-mac start command is a one-time command and is not
saved in the configuration file.
To ensure service provisioning on the interface, run the loopback swap-mac stop
command to disable the MAC swap loopback function immediately after the test
is complete.

----End

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 317


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

6.5.3 Disabling the MAC Swap Loopback Function

Context
A loopback test causes network performance to deteriorate. If a large number of
test packets are sent, bandwidth of other services is occupied. You are advised to
disable the MAC swap loopback function immediately after the test is complete.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback swap-mac stop
The MAC swap loopback function is disabled.
The loopback swap-mac stop command is a one-time command and is not saved
in the configuration file.
A MAC swap loopback test stops when you disable the MAC swap loopback
function or the loopback test times out. To perform the loopback test again, run
the loopback swap-mac start command.

----End

6.5.4 Verifying the Configuration of the Local MAC Swap


Loopback

Procedure
● Run the display loopback swap-mac information command to verify the
MAC swap loopback configuration.
----End

6.6 Configuring Remote MAC Swap Loopback

Pre-configuration Tasks
A remote MAC swap loopback test checks Ethernet connectivity and network
performance.
Before configuring remote MAC swap loopback, complete the following tasks:
● Create a VLAN and add the interface where you want to perform the remote
MAC swap loopback test to the VLAN.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 318


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

● Configure VLAN mapping or VLAN stacking if you want to test VLAN mapping
or VLAN stacking.

6.6.1 Configuring Remote MAC Swap Loopback

Context
Before performing a remote MAC swap loopback test, configure the source MAC
address, destination MAC address, and VLAN ID of test packets on the Switch.
Only the packets with the specified source MAC address, destination MAC address,
and VLAN ID are looped back.

A remote MAC swap loopback test modifies only Ethernet frames matching the
MAC swap loopback configuration on an interface, and other Ethernet frames can
still be forwarded on the interface. However, if a large number of test packets are
sent, test packets occupy bandwidth of other services on the interface.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run 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 } ]
NOTE

Only the S5720EI, S5720HI, S5730HI, S6720EI, S6720HI, and S6720S-EI support the inner-
vlan inner-vlan-id parameter.
QinQ and MAC swap loopback can be used simultaneously on a loopback interface of the
S5720EI, S5720HI, S5730HI, S6720EI, S6720HI, and S6720S-EI. If a loopback interface joins a
VLAN in untagged mode, packets sent from the loopback interface do not carry tags. If a
loopback interface joins a VLAN in tagged mode, packets sent from the loopback interface
carry tags.

----End

6.6.2 Enabling the MAC Swap Loopback Function

Context
A loopback test causes network performance to deteriorate. If a large number of
test packets are sent, bandwidth of other services is occupied. To ensure
satisfactory network performance, enable the MAC swap loopback function only
when the loopback test begins and disable it immediately after the loopback test
is complete.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 319


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback swap-mac start
The MAC swap loopback function is enabled.
The loopback swap-mac start command is a one-time command and is not
saved in the configuration file.
To ensure service provisioning on the interface, run the loopback swap-mac stop
command to disable the MAC swap loopback function immediately after the test
is complete.

----End

6.6.3 Disabling the MAC Swap Loopback Function

Context
A loopback test causes network performance to deteriorate. If a large number of
test packets are sent, bandwidth of other services is occupied. You are advised to
disable the MAC swap loopback function immediately after the test is complete.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback swap-mac stop
The MAC swap loopback function is disabled.
The loopback swap-mac stop command is a one-time command and is not saved
in the configuration file.
A MAC swap loopback test stops when you disable the MAC swap loopback
function or the loopback test times out. To perform the loopback test again, run
the loopback swap-mac start command.

----End

6.6.4 Verifying the Configuration of the Remote MAC Swap


Loopback

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 320


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Procedure
● Run the display loopback swap-mac information command to verify the
MAC swap loopback configuration.
----End

6.7 Configuration Examples for MAC Swap Loopback

6.7.1 Example for Configuring Local MAC Swap Loopback

Networking Requirements
On SwitchB, GE0/0/1 connects to an Ethernet network and GE0/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.

Figure 6-3 Networking diagram of a local MAC swap loopback test

Tester

GE0/0/1 GE0/0/2
Ethernet

Users
SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add GE0/0/1 and GE0/0/2 to the VLAN.
2. Configure local MAC swap loopback on SwitchB.
3. Enable the MAC swap loopback function on SwitchB to detect network
connectivity and network quality.

Procedure
Step 1 Create VLAN 100 on SwitchB, configure GE0/0/1 as a trunk interface and GE0/0/2
as a hybrid interface, and add the interfaces to VLAN 100.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 100
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 321


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

[SwitchB-GigabitEthernet0/0/2] port link-type hybrid


[SwitchB-GigabitEthernet0/0/2] port hybrid pvid vlan 100
[SwitchB-GigabitEthernet0/0/2] port hybrid untagged vlan 100

Step 2 Configure local MAC swap loopback on GE0/0/2 of SwitchB and specify GE0/0/1
as the outbound interface of loopback Ethernet frames. Enable the MAC swap
loopback function.
[SwitchB-GigabitEthernet0/0/2] loopback local swap-mac source-mac 0018-2000-0085 dest-mac
018-2000-0070 vlan 100 interface gigabitethernet 0/0/1 timeout 80
[SwitchB-GigabitEthernet0/0/2] loopback swap-mac start
[SwitchB-GigabitEthernet0/0/2] quit

Step 3 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 : GigabitEthernet0/0/2
Loopback output interface : GigabitEthernet0/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

----End

Configuration Files
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
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
GigabitEthernet0/0/1 timeout 80
#
return

6.7.2 Example for Configuring Remote MAC Swap Loopback

Networking Requirements
GE0/0/1 on SwitchB connects to an Ethernet network. A remote MAC swap
loopback test needs to be performed to test connectivity and performance of the
Ethernet network. The remote MAC swap loopback test does not check
performance of SwitchB.

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 322


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Figure 6-4 Networking diagram of a remote MAC swap loopback test

Tester

GE0/0/1
Ethernet

Users
SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add GE0/0/1 to the VLAN.
2. Configure remote MAC swap loopback on SwitchB.
3. Enable the MAC swap loopback function on SwitchB to detect network
connectivity and network quality.

Procedure
Step 1 Create VLAN 100 on SwitchB, configure GE0/0/1 as a trunk interface, and add
GE0/0/1 to VLAN 100.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 100
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 100

Step 2 Configure remote MAC swap loopback on GE0/0/1 of SwitchB and enable the
MAC swap loopback function.
[SwitchB-GigabitEthernet0/0/1] loopback remote swap-mac source-mac 0018-2000-0085 dest-mac
018-2000-0070 vlan 100 timeout 80
[SwitchB-GigabitEthernet0/0/1] loopback swap-mac start
[SwitchB-GigabitEthernet0/0/1] quit

Step 3 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 : remote
Loopback state : running
Loopback test time(s) : 80
Loopback interface : GigabitEthernet0/0/1
Loopback output interface : GigabitEthernet0/0/1
Loopback source MAC : 0018-2000-0085
Loopback destination MAC : 0018-2000-0070
Loopback vlan : 100
Loopback inner vlan :0
Loopback packets :0

----End

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 323


S2720, S5700, and S6720 Series Ethernet Switches
Configuration Guide - Reliability 6 MAC Swap Loopback Configuration

Configuration Files
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
loopback remote swap-mac source-mac 0018-2000-0085 dest-mac 0018-2000-0070 vlan 100
timeout 80
#
return

Issue 06 (2021-08-20) Copyright © Huawei Technologies Co., Ltd. 324

You might also like