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

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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).
Loopback Detection Configuration Commands

Loopback Detection Configuration Commands

NOTE:

CE6880EI does not support this function.

display loopback-detect

Function

The display loopback-detect command displays the loopback detection configuration and status of loopback detection enabled interfaces.

Format

display loopback-detect

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

This command is used to check the loopback detection configuration and status of each interface on which loopback detection is enabled.

Prerequisites

Loopback detection has been enabled on the interface by using the loopback-detect enable (interface view) command.

Example

# Display the loopback detection configuration and status of loopback detection enabled interfaces.

<HUAWEI> display loopback-detect
------------------------------------------------------------                                                                        
 Loopback-detect transmit interval: 5s                                                                                              
------------------------------------------------------------                                                                        
------------------------------------------------------------                                                                        
Interface                Action                   Status                                                                            
------------------------------------------------------------                                                                        
10GE1/0/1                Error-Down               Normal
Table 7-93  Description of the display loopback-detect command output

Item

Description

Loopback-detect transmit interval

interval between sending loopback detection packets, in seconds. For details, see loopback-detect transmit interval.

Interface

Interface on which loopback detection is enabled.

Action

Action performed when a loopback is detected:
  • Alarm: An alarm is reported when a loopback is detected on an interface. This is the default action.

  • Error-Down: An interface is set to error-down state and an alarm is reported when a loopback is detected on the interface.

Status

Status of a loopback detection enabled interface.
  • Alarm: An interface goes in this state when an external loopback is detected on the interface.

  • ErrorDown: An interface goes in this state when an external loopback is detected on the interface and the interface is set to error-down state.

  • Normal: No external loopback occurs on the interface.

display loopback-detect statistics

Function

The display loopback-detect statistics command displays statistics on the sending and receiving of loopback detection packets.

Format

display loopback-detect statistics interface interface-type interface-number

Parameters

Parameter Description Value
interface interface-type interface-number

Displays statistics on the sending and receiving of loopback detection packets on a specified interface.

  • interface-type specifies the type of the interface.

  • interface-number specifies the number of the interface.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run this command to view statistics on the sending and receiving of loopback detection packets on a specified interface.

Example

# Display statistics on the sending and receiving of loopback detection packets on 10GE1/0/1.

<HUAWEI> display loopback-detect statistics interface 10ge 1/0/1
------------------------------------------------------------   
Interface 10GE1/0/1 loopback-detect packet statistics                          
------------------------------------------------------------                    
Ifindex                         :          21                                   
Status                          :          Alarm                                
Currently detected VLAN         :          0                                    
Total number of VLANs to detect :          1                                    
Number of detected VLANs        :          1                                    
Sent packets                    :          1                                    
Received packets                :          1                                    
------------------------------------------------------------                    
Table 7-94  Description of the display loopback-detect statistics command output

Item

Description

Ifindex

Current interface index.

Status

Current status of the loopback detection protocol.

Currently detected VLAN

ID of the VLAN that is being detected.

Total number of VLANs to detect

Number of VLANs that need to be detected.

Number of detected VLANs

Number of VLANs that have been detected.

Sent packets

Number of packets sent on the current interface.

Received packets

Number of packets received on the current interface.

display snmp-agent trap feature-name ldt all

Function

The display snmp-agent trap feature-name ldt all command displays all trap messages of the Loopback Detection module.

Format

display snmp-agent trap feature-name ldt all

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

The Simple Network Management Protocol (SNMP) is a standard network management protocol widely used on TCP/IP networks. It uses a central computer (a network management station) that runs network management software to manage network elements. The management agent on the network element automatically reports traps to the network management station. Then, the network administrator immediately takes measures to resolve the problem.

The display snmp-agent trap feature-name ldt all command displays whether all trap functions of the Loopback Detection module are enabled.

Example

# Display all trap messages of the Loopback Detection module.

<HUAWEI> display snmp-agent trap feature-name ldt all
------------------------------------------------------------------------------                                                      
Feature name: LDT                                                                                                                   
Trap number : 2                                                                                                                     
------------------------------------------------------------------------------                                                      
Trap name                      Default switch status   Current switch status                                                        
hwLdtPortLoop                  on                      on                                                                           
hwLdtPortRecovry               on                      on                                                                           
Table 7-95  Description of the display snmp-agent trap feature-name ldt all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the Loopback Detection module:

  • hwLdtPortLoop: Loopback occurs on the interface of the Loopback Detection module.

  • hwLdtPortRecovry: The interface of the Loopback Detection module restores to the normal state.

Default switch status

Status of the default trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

Current switch status

Status of the current trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

loopback-detect action (interface view)

Function

The loopback-detect action command configures an action to perform when a loopback is detected on an interface.

The undo loopback-detect action command restores the default action.

By default, when a loopback is detected on an interface, the action is as follows:

Format

loopback-detect action { error-down | alarm }

undo loopback-detect action { error-down | alarm }

Parameters

Parameter

Description

Value

error-down

Indicates that an interface is shut down when a loopback is detected on an interface.

-

alarm

Indicates that an alarm is generated when a loopback is detected on an interface.

-

Views

GE interface view, 10GE interface view, 40GE interface view, 25GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenarios

After loopback detection is enabled on an interface, the interface sends loopback detection packets at intervals. When a loopback is detected on the interface, the system performs an action to minimize the impact on the entire network. The loopback-detect action command configures the action.

The system performs any of the following actions after detecting a loopback on an interface:
  • error-down: An interface is shut down.
  • alarm: An alarm is generated.

Precautions

  • The configured action takes effect after loopback is enabled in the interface view.

  • If the loopback-detect action and loopback-detect action error-down commands are executed in the interface view and system view respectively, the configuration in the interface view takes effect.

  • When the action is set to error-down, if a loopback occurs on the interface, the interface enters the Error-Down state. The device records the status of an interface as Error-Down when it detects that a fault occurs. The interface in Error-Down state cannot receive or send packets and the interface indicator is off. You can run the display error-down recovery command to check information about all interfaces in Error-Down state on the device.

  • When the interface is in Error-Down state, check the cause. You can use the following modes to restore the interface status:
    • Manual (after the interface enters the Error-Down state)

      When there are few interfaces in Error-Down state, you can run the shutdown and undo shutdown commands in the interface view or run the restart command to restore the interface.

    • Auto (before the interface enters the Error-Down state)

      If there are many interfaces in Error-Down state, the manual mode brings in heavy workload and the configuration of some interfaces may be ignored. To prevent this problem, run the error-down auto-recovery cause loopback-detect interval interval-value command in the system view to enable an interface in error-down state to go Up and set a recovery delay. You can run the display error-down recovery command to view automatic recovery information about the interface.

      NOTE:

      This mode is invalid for the interface that has entered the Error-Down state, and is only valid for the interface that enters the Error-Down state after the error-down auto-recovery cause loopback-detect interval interval-value command is used.

  • If the interface goes Up, no loopback occurs on the interface, and the interface status is displayed as normal in the display loopback-detect command.

Example

# Configure the system to shut down 10GE1/0/1 when a loopback occurs.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] loopback-detect enable
[*HUAWEI-10GE1/0/1] loopback-detect action error-down

loopback-detect action error-down

Function

The loopback-detect action error-down command sets the action to perform on an interface to error-down when a loopback is detected on the interface.

The undo loopback-detect action command restores the default action.

By default, the action to perform on the device is alarm when a loopback is detected on the interface.

Format

loopback-detect action error-down

undo loopback-detect action error-down

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

After loopback detection is enabled on an interface, the interface sends loopback detection packets at intervals. When the device detects a loopback on an interface, it sets the interface to error-down state configured using the loopback-detect action error-down command and sends an alarm. This function minimizes impact of the loopback on the entire network.

Precautions

The configured action takes effect after loopback is enabled in the system view.

If the loopback-detect action error-down and loopback-detect action (interface view) commands are executed in the system view and interface view respectively, the configuration in the interface view takes effect.

When the action is set to error-down, if a loopback occurs on the interface, the interface enters the Error-Down state. The device records the status of an interface as Error-Down when it detects that a fault occurs. The interface in Error-Down state cannot receive or send packets and the interface indicator is off. You can run the display error-down recovery command to check information about all interfaces in Error-Down state on the device.

When the interface is in Error-Down state, check the cause. You can use the following modes to restore the interface status:
  • Manual (after the interface enters the Error-Down state)

    When there are few interfaces in Error-Down state, you can run the shutdown and undo shutdown commands in the interface view or run the restart command to restore the interface.

  • Auto (before the interface enters the Error-Down state)

    If there are many interfaces in Error-Down state, the manual mode brings in heavy workload and the configuration of some interfaces may be ignored. To prevent this problem, run the error-down auto-recovery cause loopback-detect interval interval-value command in the system view to enable an interface in error-down state to go Up and set a recovery delay. You can run the display error-down recovery command to view automatic recovery information about the interface.

    NOTE:

    This mode is invalid for the interface that has entered the Error-Down state, and is only valid for the interface that enters the Error-Down state after the error-down auto-recovery cause loopback-detect interval interval-value command is used.

If the interface goes Up, no loopback occurs on the interface, and the interface status is displayed as normal in the display loopback-detect command.

Example

# Configure the system to shut down 10GE1/0/1 when a loopback occurs.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] loopback-detect enable
[*HUAWEI-10GE1/0/1] quit
[*HUAWEI] loopback-detect action error-down

loopback-detect enable (interface view)

Function

The loopback-detect enable command enables loopback detection on an interface.

The undo loopback-detect enable command disables loopback detection on an interface.

By default, loopback detection is disabled on an interface.

Format

loopback-detect enable

undo loopback-detect enable

Parameters

None

Views

GE interface view, 10GE interface view, 40GE interface view, 25GE interface view, 100GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenarios

The loopback-detect enable command enables loopback detection on an interface. This function enables the system to detect a loopback on the downstream network quickly and shut down an interface to minimize the impact of the loopback on the entire network.

Precautions

After loopback detection is enabled on an interface, the interface sends loopback detection packets at intervals.

A large number of broadcast packets are sent during loopback detection, occupying CPU resources; therefore, disable loopback detection if it is not required.

Example

# Enable loopback detection for the 10GE1/0/1 interface.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] loopback-detect enable

loopback-detect vlan

Function

The loopback-detect vlan command specifies the VLAN IDs of loopback detection packets on an interface.

The undo loopback-detect vlan command cancels the configuration.

By default, detect packets do not have a VLAN ID.

Format

loopback-detect vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo loopback-detect vlan [ vlan-id1 [ to vlan-id2 ] ] &<1-10>

Parameters

Parameter

Description

Value

vlan-id1 [ to vlan-id2 ]

Specifies the VLAN IDs of loopback detection packets.

  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be greater than the value of vlan-id1.
  • The value of vlan-id1 is an integer that ranges from 1 to 4094, except reserved VLAN IDs, which can be configured using the vlan reserved command.
  • The value of vlan-id2 is an integer that ranges from 1 to 4094, except reserved VLAN IDs, which can be configured using the vlan reserved command.

Views

GE interface view, 10GE interface view, 40GE interface view, 25GE interface view, 100GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, loopback detection packets do not contain VLAN IDs. After the loopback-detect vlan command is executed on an interface, the interface sends multiple copies of tagged loopback detection packets with the specified VLAN tags.

Prerequisites

The specified VLANs exist and the interface has been added to the VLANs in tagged mode.

Before running this command, check whether loopback detection is enabled. If not, run the loopback-detect enable (interface view) command to enable loopback detection.

Precautions

If you run the loopback-detect vlan command multiple times in the same interface view, multiple VLAN IDs are specified.

Example

# Configure loopback detection for VLAN30 on the 10GE1/0/1 interface.

<HUAWEI> system-view
[~HUAWEI] vlan 30
[*HUAWEI-vlan30] quit
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port link-type trunk
[*HUAWEI-10GE1/0/1] port trunk allow-pass vlan 30
[*HUAWEI-10GE1/0/1] loopback-detect enable
[*HUAWEI-10GE1/0/1] loopback-detect vlan 30

loopback-detect transmit interval

Function

The loopback-detect transmit interval command sets the interval between sending loopback detection packets on all interfaces.

The undo loopback-detect transmit interval command restores the default interval between sending loopback detection packets on all interfaces.

By default, the interval between sending loopback detection packets is 5 seconds.

Format

loopback-detect transmit interval packet-interval-time

undo loopback-detect transmit interval [ packet-interval-time ]

Parameters

Parameter

Description

Value

packet-interval-time

Specifies the interval between sending loopback detection packets.

The value is an integer that ranges from 5 to 300, in seconds.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenarios

After loopback detection is enabled on an interface, the interface sends loopback detection packets at the interval specified by the loopback-detect transmit interval command. You can run the loopback-detect transmit interval command to adjust the interval between sending loopback detection packets according to service requirements.

Precautions

If you run the loopback-detect transmit interval command multiple times, only the latest configuration takes effect.

Example

# Set the interval between sending loopback detection packets on all interfaces to 10s.

<HUAWEI> system-view
[~HUAWEI] loopback-detect transmit interval 10

reset loopback-detect statistics

Function

The reset loopback-detect statistics command clears statistics on the sending and receiving of loopback detection packets.

Format

reset loopback-detect statistics interface interface-type interface-number

Parameters

Parameter Description Value
interface interface-type interface-number

Clears statistics on the sending and receiving of loopback detection packets on a specified interface.

  • interface-type specifies the type of the interface.

  • interface-number specifies the number of the interface.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

You can run this command to clear statistics on the sending and receiving of loopback detection packets on a specified interface.

Example

# Clear statistics on the sending and receiving of loopback detection packets on 10GE1/0/1.

<HUAWEI> reset loopback-detect statistics interface 10ge 1/0/1

snmp-agent trap enable feature-name ldt

Function

The snmp-agent trap enable feature-name ldt command enables the trap function for the Loopback Detection module.

The undo snmp-agent trap enable feature-name ldt command disables the trap function for the Loopback Detection module.

By default, the trap function is enabled for the Loopback Detection module.

Format

snmp-agent trap enable feature-name ldt [ trap-name { hwldtportloop | hwldtportrecovry } ]

undo snmp-agent trap enable feature-name ldt [ trap-name { hwldtportloop | hwldtportrecovry } ]

Parameters

Parameter Description Value
trap-name Enables the traps of Loopback Detection events of specified types. -
hwldtportloop Enables or disables the traps of the loopback on the interface of the Loopback Detection module. -
hwldtportrecovry Enables or disables the traps of the loopback recovery on the interface of the Loopback Detection module. -

Views

System view

Default Level

3: Management level

Usage Guidelines

The Loopback Detection module is not configured with the function of excessive traps. To enable the traps of one or more events, you can specify type-name.

Example

# Enable the device to send trap when the link negotiation of the Loopback Detection module fails.

<HUAWEI> system-view
[~HUAWEI] snmp-agent trap enable feature-name ldt trap-name hwldtportloop
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 52415

Downloads: 339

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