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

S1720, S2700, S5700, and S6720 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).
Service Diagnosis Configuration Commands

Service Diagnosis 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 trace information

Function

The display trace information command displays information about service diagnosis.

Format

display trace information

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After configuring service diagnosis, you can run this command to view global information about service diagnosis, for example, the counts of diagnosis instances and objects created on the device.

Example

# Display information about service diagnosis.

<HUAWEI> display trace information
Trace Information:
------------------------------------------------------------
Trace Enable                            : Enable
Debug info level                        : Brief
Debug fill-instance                     : Off
Debug quit-instance                     : Off
Debug output information                : Off
Syslog Source IP Address                : -

The sum of all the instances            : 0
The startID of the instance table       : -
Alloc instance times                    : 9
Free instance times                     : 9
The sum of all the objects              : 2
------------------------------------------------------------
Table 16-62  Description of the display trace information command output

Item

Description

Trace Information

Information about service diagnosis.

Trace Enable

Status of service diagnosis.
  • Disable: Service diagnosis is disabled.
  • Enable: Service diagnosis is enabled.

This field can be modified using the trace enable command.

Debug info level

Output level of service diagnosis information.
  • Brief: brief service diagnosis information.
  • Detail: detailed service diagnosis information.

This field can be modified using the trace enable command.

Debug fill-instance

Debugging status of the fill-instance module.
  • Off: disabled
  • On: enabled

Debug quit-instance

Debugging status of the quit-instance module.
  • Off: disabled
  • On: enabled

Debug output information

Debugging status of the output information module.
  • Off: disabled
  • On: enabled

Syslog Source IP Address

Source IP address of the interface for exporting diagnosis information to the log server. To set the IP address of the interface for exporting diagnosis information to a log server, run the trace syslog source command.

The sum of all the instances

Total number of diagnosis instances.

The startID of the instance table

Start ID of the instance table.

Alloc instance times

Number of the allocated diagnosis instances.

Free instance times

Number of the release diagnosis instances.

The sum of all the objects

Total number of diagnosis objects.

display trace instance

Function

The display trace instance command displays diagnosis instances on a device.

Format

display trace instance [ instance-start-id [ instance-end-id ] | mac-address mac-address | ip-address ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number | cid cid ] [ process-wlan ]

NOTE:

The process-wlan keyword is only supported by S5720HI.

The vpn-instance vpn-instance-name command is supported only by the S1720GW, S1720GW-E, S1720GWR, S1720GWR-E, S1720X, S1720X-E, S2720EI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S5720EI, S5720HI, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI.

Parameters

Parameter Description Value
instance-start-id

Specifies the ID of the first instance whose information is displayed, that is, start ID.

The value varies according to different devices.
instance-end-id

Specifies the ID of the last instance whose information is displayed, that is, end ID.

The value varies according to different devices.
NOTE:

The instance-end-id value must be larger than the instance-start-id value.

mac-address mac-address

Specifies a MAC address.

The value is in the format of H-H-H, in which H is a hexadecimal number of 1 to 4 digits.

ip-address ip-address

Specifies an IP address.

The value is in dotted decimal notation.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value must be an existing VPN instance name.
interface interface-type interface-number

Specifies the type and number of an interface.

-

cid cid

Specifies the diagnosis instance CID.

The value varies according to different devices.

process-wlan

Specifies the WLAN sub-core.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If you specify no parameter, all diagnosis instances are displayed in sequence. Each time you run this command, 10 diagnosis instances are displayed. For example, all diagnosis instances have been created on the device. When you run the display trace instance command for the first time, information about diagnosis instances 0 to 9 is displayed. When you run this command again, information about instances 10 to 19 is displayed. This process is repeated until information about all the diagnosis instances is displayed. If you specify the value of instance-start-id, information about 10 diagnosis instances from this ID is displayed.

To view information about diagnosis instances within a specified range, run the display trace instance instance-start-id instance-end-id command to specify the start and end IDs of diagnosis instances.

Example

# Display information about diagnosis instances on the interface with the IP address of 10.10.10.1.

<HUAWEI> display trace instance ip-address 10.10.10.1
Trace Instance:
------------------------------------------------------------
  ID             : 0                                                            
  MAC Address    : 0101-0101-0101                                               
  IP Flag        : -                                                            
  Session ID     : -                                                            
  IP Address     : 10.10.10.1                                                   
  VRF Index      : -                                                            
  CID            : 100                                                          
  User Name      : -                                                            
  Interface      : -                                                            
  QinQ VLAN ID   : -                                                            
  User VLAN ID   : -                                                            
  Access Mode    : dot1x                                                        
  Modules online : EAPoL  :0    WEBS   :0       WEB    :0       AAA    :0       
                   CM     :0    TM     :0       SAM    :0       RADIUS :1       
                   DHCPS  :0    DHCPC  :0       DHCPR  :0       DHCPP  :0       
                   TACACS :0    AM     :0       SAVI   :0       WLAN_AC:0    
 ------------------------------------------------------------
  Total 1, 1 printed
Table 16-63  Description of the display trace instance command output

Item

Description

ID

ID of the diagnosis instance.

MAC Address

MAC address of the interface.

IP Flag

Flag of the IP address.

Session ID

ID of the session, only valid for PPPoX users.

IP Address

IP address of the interface.

VRF Index

User VPN instance index.

CID

User connect ID.

User Name

User name.

Interface

Interface index.

QinQ VLAN ID

QinQ VLAN ID.

User VLAN ID

User VLAN ID.

Access Mode

User access mode, including dot1x, mac-authen, portal, and wlan. To set the user access mode, run the trace object command.

Modules online

User status on a module. User status can be:
  • 0: The user is offline on the module.
  • 1: The user is online on the module.
Related Topics

display trace object

Function

The display trace object command displays the configuration about a service diagnosis object.

Format

display trace object [ service-object-id ] [ process-wlan ]

NOTE:

The process-wlan parameter is only supported by S5720HI.

Parameters

Parameter Description Value
service-object-id

Specifies the ID of a diagnosis object.

The value is an integer that ranges from 0 to 3.

process-wlan

Specifies the WLAN sub-core.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If you do not specify the parameter service-object-id, configurations about all diagnosis objects are displayed.

Example

# Display configurations about all diagnosis objects.

<HUAWEI> display trace object
Trace Object:
------------------------------------------------------------
  Object ID      : 0
  Slot           : -
  MAC Address    : -
  IP Flag        : -
  Session ID     : -
  IP Address     : 10.1.1.1
  VRF Index      : -
  CID            : -
  User Name      : -
  Interface      : -
  QinQ VLAN ID   : -
  User VLAN ID   : -
  Access Mode    : -
  Output         : command line ( User-Intf 4 )

  Object ID      : 1
  Slot           : -
  MAC Address    : 0101-0101-0101
  IP Flag        : -
  Session ID     : -
  IP Address     : -
  VRF Index      : -
  CID            : -
  User Name      : -
  Interface      : -
  QinQ VLAN ID   : -
  User VLAN ID   : -
  Access Mode    : -
  Output         : file ( flash:/a.txt )

  Object ID      : 2
  Slot           : -
  MAC Address    : 0101-0101-0101
  IP Flag        : -
  Session ID     : -
  IP Address     : 10.2.2.2
  VRF Index      : -
  CID            : -
  User Name      : -
  Interface      : -
  QinQ VLAN ID   : -
  User VLAN ID   : -
  Access Mode    : -
  Output         : server ( 10.10.10.10 )

------------------------------------------------------------
  Total 3, 3 printed
Table 16-64  Description of the display trace object command output

Item

Description

Object ID

ID of the diagnosis object. This parameter is automatically generated from 0 in sequence of creation time.

Slot

Slot ID of the device.

MAC Address

MAC address of the interface. To set the MAC address of an interface, run the trace object command.

IP Flag

Flag of the IP address.

Session ID

ID of the session, only valid for PPPoX users.

IP Address

IP address of the interface. To set the IP address of an interface, run the trace object command.

VRF Index

User VRF index.

CID

User connect ID.

User Name

User name. To set the user name, run the trace object command.

Interface

Interface index. To set the interface index, run the trace object command.

QinQ VLAN ID

QinQ VLAN ID. To set the QinQ VLAN ID, run the trace object command.

User VLAN ID

User VLAN ID. To set the user VLAN ID, run the trace object command.

Access Mode

User access mode, including dot1x, mac-authen, portal, and wlan. To set the user access mode, run the trace object command.

Output

Direction in which the device exports diagnosis information. To set the direction, run the trace object command.

  • Command line (User-Intf X): Diagnosis information is displayed on the screen of a configuration terminal.

    NOTE:
    When the configuration terminal is online, X displays the absolute number of the user interface (the absolute number can be checked using the display users command). When the configuration terminal is offline, X displays offline.
  • file: Diagnosis information is exported to files.
  • server: Diagnosis information is exported to a log server.

Total 3, 3 printed

Total number of created diagnosis objects and count of displayed objects.

Related Topics

reset trace instance

Function

The reset trace instance command clears all the diagnosis instances on a device.

Format

reset trace instance

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

After service diagnosis is enabled and a diagnosis object is created on a device, the device creates a diagnosis instance when a user matching the attributes of the diagnosis object gets online. If the device diagnoses services of multiple users, it creates a diagnosis instance for each user, which occupies a large amount of system resources. Therefore, the device needs to delete the diagnosis instance of a user when the user goes online successfully or fails to go online. Additionally, the device provides an aging mechanism for service diagnosis. When the aging time is reached, the device automatically deletes diagnosis instances to reclaim resources.

In addition to the preceding two methods for automatically clearing diagnosis instances, you can run the reset trace instance command to clear all the diagnosis instances.

After all the diagnosis instances are cleared using the reset trace instance command, properly running diagnosis instances are also deleted. Exercise caution when you run the reset trace instance command.

Example

# Clear all diagnosis instances on the device.

<HUAWEI> system-view
[HUAWEI] reset trace instance

save trace information

Function

The save trace information command saves diagnosis information in the buffer area as a file.

Format

save trace information

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

After you specify the parameter file file-name in the trace object command to save diagnosis information as files to the default root directory on the storage device, the system saves diagnosis information in the buffer area until the buffer is full. To prevent data loss, the system automatically saves diagnosis information in the buffer area as the file file-name. Before the buffer becomes full, to view real-time diagnosis information, run the save trace information command to save diagnosis information in the buffer area as a file.

Prerequisites

The device has been configured to export diagnosis information as a file using the trace object command.

Example

# Save diagnosis information as a file.

<HUAWEI> system-view
[HUAWEI] save trace information
Related Topics

trace enable

Function

The trace enable command enables service diagnosis.

The undo trace enable command disables service diagnosis.

By default, service diagnosis is disabled.

Format

trace enable [ brief ]

undo trace enable

Parameters

Parameter

Description

Value

brief

Configures the device to output brief service diagnosis information.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

It is difficult to locate problems during user access based on debugging information on existing networks because multiple users may get online or offline simultaneously and debugging information about a specified user cannot be displayed. Service diagnosis provided by the switch allows maintenance personnel to customize attributes and create diagnosis objects to diagnose information about services of specified users. To enable service diagnosis, run the trace enable command.

Service diagnosis information can be displayed in two methods:
  • The trace enable brief command configures the device to output brief service diagnosis information.
  • The trace enable command configures the device to output detailed service diagnosis information.

Follow-up Procedure

After service diagnosis is enabled, run the trace object command to create a diagnosis object. After an ID is generated for the diagnosis object, the system starts diagnosis services.

Precautions

Service diagnosis affects system performance. Therefore, enable service diagnosis only when fault locating is required. After locating faults, immediately run the undo trace enable command to disable service diagnosis.

The trace enable command is not recorded in the configuration file. Therefore, run the trace enable command again after the device restarts to make service diagnosis take effect.

Example

# Enable the service diagnosis function and configure the device to output brief service diagnosis information.

<HUAWEI> system-view
[HUAWEI] trace enable brief
Related Topics

trace object

Function

The trace object command creates a diagnosis object.

The undo trace object command deletes a diagnosis object.

By default, no diagnosis object is created. If you do not specify the direction at which information is exported, the default direction is the CLI.

Format

trace object { mac-address mac-address | ip-address ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number | user-vlan user-vlan-id [ qinq-vlan qinq-vlan-id ] | user-name user-name | access-mode { dot1x | mac-authen | portal | wlan } } * [ process-wlan ] [ output { command-line | file file-name | syslog-server syslog-server-ip } ]

undo trace object { mac-address mac-address | ip-address ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number | user-vlan user-vlan-id [ qinq-vlan qinq-vlan-id ] | user-name user-name | access-mode { dot1x | mac-authen | portal | wlan } } * [ process-wlan ] [ output { command-line | file file-name | syslog-server syslog-server-ip } ]

undo trace object { service-object-id | all }

NOTE:

Only S1720GW, S1720GW-E, S1720GWR, S1720GWR-E, S1720X, S1720X-E, S2720EI, S5720LI, S5720S-LI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S5720EI, S5720HI, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support vpn-instance vpn-instance-name.

The access-mode wlan and process-wlan parameters are only supported by S5720HI.

Parameters

Parameter Description Value
mac-address mac-address

Creates a diagnosis object based on the MAC address.

The value is in the format of H-H-H, in which H is a hexadecimal number of 1 to 4 digits.
ip-address ip-address

Creates a diagnosis object based on the IP address.

The value is in dotted decimal notation.
vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value must be an existing VPN instance name.
interface interface-type interface-number Creates a diagnosis object based on the interface. -
user-vlan user-vlan-id

Creates a diagnosis object based on the user VLAN.

The value is an integer that ranges from 1 to 4094.
qinq-vlan qinq-vlan-id

Creates a diagnosis object based on the QinQ VLAN ID.

The value is an integer that ranges from 1 to 4094.
user-name user-name

Creates a diagnosis object based on the user name.

The value is a string of 1 to 253 case-insensitive characters without spaces.
access-mode

Creates a diagnosis object based on the access mode.

-
dot1x

Creates a diagnosis object based on the dot1x access mode.

-
mac-authen

Creates a diagnosis object based on the mac-authen access mode.

-
portal

Creates a diagnosis object based on the portal access mode.

-
wlan

Creates a diagnosis object based on the wlan access mode.

-
process-wlan

Specifies the WLAN sub-core.

-

output

Specifies the direction in which the device exports diagnosis information.

-
command-line

Exports diagnosis information to the CLI.

-
file file-name

Exports diagnosis information as a file.

NOTE:
It is recommended that you export the diagnosis information to a specified file.
The value of file-name is a string of 1 to 63 case-insensitive characters without spaces.
syslog-server syslog-server-ip

Exports diagnosis information to a log server.

syslog-server-ip specifies the IP address of the log server, in dotted decimal notation.
service-object-id

Specifies the ID of a diagnosis object to be deleted.

NOTE:

Diagnosis object IDs are generated based on sequence in which the diagnosis objects are created. The ID starts from 0.

To view all created diagnosis objects, run the display trace object command.

The value is an integer that ranges from 0 to 3.
all

Deletes all diagnosis objects.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

When locating faults of DHCP, AAA, or NAC service during user access, maintenance personnel can create diagnosis objects to trace services and locate the faults.

Users with different services have different attributes. Create diagnosis objects for different services based on different attributes.

  • DHCP service: based on the MAC address.
  • AAA and NAC services: based on the MAC address, IP address, user name, user VLAN ID, or access mode.
NOTE:

To ensure that you can diagnose the entire DHCP service process, create a diagnosis object based on the MAC address. You can run the trace object mac-address mac-address [ output { command-line | file file-name | syslog-server syslog-server-ip } ] command to create a diagnosis object for the DHCP service.

Service diagnosis supports only common AAA users.

Prerequisites

Service diagnosis has been enabled using the trace enable command.

Precautions

If a diagnosis object is created based on the MAC address or IP address, various service processes can be diagnosed generally. If a diagnosis object is created based on other parameters, service diagnosis may fail to be performed because the parameters may not be obtained in service processes. Therefore, you are advised to create a diagnosis object based on the MAC address or IP address.

When the slot parameter is used for service diagnosis, if a user switches between the pre-authentication connection and authentication success states and authorization information (including ACL, VLAN, or authentication event authorization) is not changed in the switching process, no service diagnosis information will be output. In this situation, you can use the user name or interface for service diagnosis.

The diagnosis output file cannot exceed 1 MB. The excessive diagnosis information is not recorded.

You can run the undo trace object command to delete diagnosis objects in any of the following modes:
  • Delete diagnosis objects based on the object attributes. Run the undo trace object { mac-address mac-address | ip-address ip-address [ vpn-instance vpn-instance-name ] | interface interface-type interface-number | user-vlan user-vlan-id [ qinq-vlan qinq-vlan-id ] | user-name user-name | access-mode { dot1x | mac-authen | portal | wlan } } * [ output { command-line | file file-name | syslog-server syslog-server-ip } ] command. For example, diagnosis objects 1 (10.10.10.1) and 2 (10.10.10.1+0025-9efb-be78) have been created. To delete diagnosis objects based on the IP address, run the undo trace object ip-address 10.10.10.1 command. Diagnosis objects 1 and 2 are deleted.
  • Delete diagnosis objects based on the object ID. Run the undo trace object service-object-id command to delete a specified diagnosis object. You can view the object ID using the display trace object command
  • Delete all diagnosis objects using the undo trace object all command.
  • The AR1000V does not support diagnosis objects of the dot1x, mac-authen, or portal access mode, so specifying these parameters is not recommended on the AR1000V.

Example

# Create a diagnosis instance on the interface with the IP address of 10.10.10.1.

<HUAWEI> system-view
[HUAWEI] trace object ip-address 10.10.10.1

trace syslog source

Function

The trace syslog source command sets the source interface from which the device exports diagnosis information to a log server.

The undo trace syslog source command cancels the configuration of the source interface from which the device exports diagnosis information to a log server.

By default, no interface is specified to export diagnosis information to the log server.

Format

trace syslog source interface-type interface-number

undo trace syslog source

Parameters

Parameter Description Value
interface-type interface-number

Specifies the type and number of an interface.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

After you specify an interface for exporting diagnosis information to a log server, the system specifies the IP address of this interface as the source IP address of service diagnosis packets. In this way, the log server can identify the source of diagnosis information.

Prerequisites

The device has been configured to export diagnosis information to a log server using the trace object command.

Precautions

The trace syslog source command is not recorded in the configuration file. After the device restarts, the configured source interface for exporting diagnosis information is invalid. To set the source interface, run the trace syslog source command again.

Example

# Set VLANIF100 as the source interface for exporting diagnosis information to the log server.

<HUAWEI> system-view
[HUAWEI] trace syslog source vlanif 100
Related Topics
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1000178165

Views: 42878

Downloads: 1107

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