No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S7700 and S9700 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
MAC Swap Loopback Configuration Commands

MAC Swap Loopback Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

display loopback swap-mac information

Function

The display loopback swap-mac information command displays the MAC swap loopback configuration.

Format

display loopback swap-mac information

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To ensure a successful loopback test, use this command to check the loopback configuration before the loopback test. After the loopback test is complete, use this command to view the number of loopback test packets and the number of discarded test packets, and compare them with the number of packets sent from the tester to check network performance.

Pre-configuration Tasks

The local MAC swap loopback function has been configured by using the loopback local swap-mac command or the local MAC swap loopback function has been configured by using the loopback remote swap-mac command.

Example

# Display the MAC swap loopback configuration.

<HUAWEI> display loopback swap-mac information
  Loopback type             : local                                             
  Loopback state            : running                                           
  Loopback test time(s)     : 60                                              
  Loopback interface        : GigabitEthernet1/0/0                             
  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              : 3 
Table 12-39  Description of the display loopback swap-mac information command output

Item

Description

Loopback type

Type of the MAC swap loopback test:
  • local: local MAC swap loopback test
  • remote: remote MAC swap loopback test

Run the following commands to configure loopback type.

loopback local swap-mac

loopback remote swap-mac

Loopback state

Status of the MAC swap loopback function:
  • running: The MAC swap loopback function is enabled.
  • stop: The MAC swap loopback function is disabled.

Run the following commands to configure loopback state.

loopback swap-mac

Loopback test time(s)

Timeout period of the loopback test. If the value is none, the loopback test timeout function is disabled.

Loopback interface

Interface where the loopback test is performed.

Loopback output interface

Outbound interface that sends test packets back to the tester.

Loopback source MAC

Source MAC address of test packets.

Loopback destination MAC

Destination MAC address of test packets.

Loopback vlan

VLAN ID of test packets.

Loopback inner vlan

Inner VLAN ID of test packets.

Loopback packets

Number of received loopback packets.

Drop packets

Number of discarded packets. This field is displayed only when a local MAC swap loopback test is performed.

loopback local swap-mac

Function

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.

Format

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

Parameters

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-type interface-number

Specifies the outbound interface that sends loopback packets back to the tester.

  • interface-type specifies the interface type.

  • interface-number specifies the interface number.

-

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.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

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.

  • MAC swap loopback tests cannot be performed on an Eth-Trunk interface or its member interfaces.

  • 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.

  • The loopback local swap-mac and single-fiber enable commands cannot be used on the same interface.

  • If a large number of test packets are sent, test packets occupy bandwidth of other services on the interface that sends test packets.

  • Before enabling the local MAC swap loopback function, you need to run the undo stp enable command to disable STP on the interface.

Example

# Configure local MAC swap loopback.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/0
[HUAWEI-GigabitEthernet1/0/0] loopback local swap-mac source-mac 0018-2000-0085 dest-mac 0018-2000-1004 vlan 100 interface gigabitethernet 1/0/1

loopback remote swap-mac

Function

The loopback remote swap-mac command enables remote MAC swap loopback.

The undo loopback remote swap-mac command disables remote MAC swap loopback.

By default, remote MAC swap loopback is disabled on an interface.

Format

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

Parameters

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.

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.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before using the Switch to provide services for users, perform a remote MAC swap loopback test to check whether the Switch can provide services properly. This test checks connectivity and performance of the network between the Switch uplink interface and a remote device. The remote MAC swap loopback test can also check whether VLAN mapping and VLAN stacking are configured successfully on the uplink interface.

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 a remote MAC swap loopback test, a tester sends test packets to the Switch. When test packets reach the uplink interface, the Switch swaps the source and destination MAC addresses of test packets and sends the packets back to the tester through this interface.

Follow-up Procedure

Run the loopback swap-mac start command to enable the MAC swap loopback function.

Precautions

  • MAC swap loopback tests cannot be performed on an Eth-Trunk interface or its member interfaces.

  • 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.

  • The loopback remote swap-mac and single-fiber enable commands cannot be used on the same interface.
  • If the switch does not receive any test packet within the timeout period after the remote MAC swap loopback test starts, it stops the test. To perform the test again, run the loopback swap-mac start command.
  • If timeout none is specified in the command, you can perform a loopback test at any time until the swap MAC loopback function is disabled by using the loopback swap-mac stop command.

Example

# Configure remote MAC swap loopback.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/0
[HUAWEI-GigabitEthernet1/0/0] loopback remote swap-mac source-mac 0018-2000-0085 dest-mac 0018-2000-1004 vlan 100

loopback swap-mac

Function

The loopback swap-mac command enables or disables the MAC swap loopback function.

By default, the MAC swap loopback function is disabled.

Format

loopback swap-mac { start | stop }

Parameters

Parameter

Description

Value

start

Enables the MAC swap loopback function.

-

stop

Disables the MAC swap loopback function.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Both local and remote loopback tests deteriorate network performance. To minimize impact of a loopback test, enable the MAC swap loopback function when the loopback test begins and disable it immediately after the loopback test is complete.

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.

Pre-configuration Tasks

The local MAC swap loopback function has been configured by using the loopback local swap-mac command or the local MAC swap loopback function has been configured by using the loopback remote swap-mac command.

Precautions

To ensure service provisioning on the interface, disable the MAC swap loopback function immediately after the loopback test is complete.

The loopback swap-mac command is a one-time command and is not saved in the configuration file.

Example

# Enable the MAC swap loopback function.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/0
[HUAWEI-GigabitEthernet1/0/0] loopback swap-mac start
Translation
Download
Updated: 2019-10-18

Document ID: EDOC1000178288

Views: 25603

Downloads: 109

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next