S1720&S2700&S3700&S5700&S6700 Series Switches Product Troubleshooting - Preliminary-9 Common Fault Diagnostic Commands

Created Sep 26, 2017 11:34:19Latest reply Sep 26, 2017 11:34:58 1576 1 0 0

9 Common Fault Diagnostic Commands

The common fault diagnostic commands include display, reset, ping, and tracert commands. Additionally, alarms, logs, and packet capturing are effective methods to locate faults.

9.1 display Commands

9.1.1 Overview

Using the display commands and understanding how they are used is an essential skill for maintenance engineers. The display commands provide the following information:

  • Current device status
  • Neighbor device information
  • Overall network information
  • Network fault location

The display commands can be executed in any view.

The following is an example of display commands:

<HUAWEI> display ?
  Cellular                  Cellular interface                                  
  aaa                       AAA                                                 
  access-user               User access                                         
  accounting-scheme         Accounting scheme                                   
  acl                       <Group> acl command group
  actual                    Current actual                                      
  adp-ipv4                  Ipv4 information                                    
  alarm                     Alarm                                               
  antenna                   Current antenna that outputting radio               
 ---- More ---- 
7b670aae0a894c5c82d843d1698f8b97 NOTE:
  • The preceding information provides some level-1 keywords that can be used behind display. Additional keywords can be added behind these displayed keywords.

  • Different device models or versions support different features. The keywords displayed may be different from the preceding information.

This section involves only commonly used display commands. For more display commands, see the Command Reference of the corresponding product version.

9.1.2 Regular Expression in display Commands

Regular Expressions

When you run the display command to check the device configuration and running status information, you can filter out unnecessary information based on the regular expression.

A regular expression is a mode matching tool. You can create a matching mode based on specified rules and then match target objects based on the matching mode. A regular expression consists of 1 to 256 common characters and special characters.

  • Common characters

    Common characters are used to match themselves in a string, including all upper-case and lower-case letters, digits, punctuations, underline, and special symbols. For example, a matches the letter "a" in "abc", 20 matches the digit "20" in "20.1.1.1", and @ matches the symbol "@" in "xxx@xxx.com".

  • Special characters

    Special characters are a set of symbols with special meanings which are provided to flexibly create matching modes. The special characters are also called metacharacters. Table 9-1 describes special characters and their syntax.

    Table 9-1 Description of special characters

    Special Characters

    Function

    Example

    \

    Defines an escape character, which is used to mark the next character (common or special) as the common character.

    \* matches "*".

    ^

    Matches the starting position of the string.

    ^10 matches "10.10.10.1" instead of "20.10.10.1".

    $

    Matches the ending position of the string.

    1$ matches "10.10.10.1" instead of "10.10.10.2".

    *

    Matches the preceding element zero or more times.

    10* matches "1", "10", "100", "1000", and so on.

    (10)* matches "null", "10", "1010", "101010", and so on.

    +

    Matches the preceding element one or more times.

    10+ matches "10", "100", "1000", and so on.

    (10)+ matches "10", "1010", "101010", and so on.

    ?

    Matches the preceding element zero or one time.

    NOTE:

    Huawei data communication devices do not support regular expressions with ?. When regular expressions with ? are entered on Huawei data communication devices, helpful information is provided.

    10? matches "1" or "10".

    (10)? matches "null" or "10".

    .

    Matches any single character.

    0.0 matches "0x0", "020", and so on.

    .oo. matches "book", "look", "tool", and so on.

    ()

    Defines a subexpression, which can be null. Both the expression and the subexpression should be matched.

    100(200)+ matches "100200", "100200200", and so on.

    x|y

    Matches x or y.

    100|200 matches "100" or "200".

    1(2|3)4 matches "124" or "134", instead of "1234", "14", "1224", and "1334".

    [xyz]

    Matches any single character in the regular expression.

    [123] matches the character 2 in "255".

    [^xyz]

    Matches any character that is not in the regular expression.

    [^123] matches any character except for "1", "2", and "3".

    [a-z]

    Matches any character within the specified range.

    [0-9] matches any character ranging from 0 to 9.

    [^a-z]

    Matches any character beyond the specified range.

    [^0-9] matches all non-numeric characters.

    A simple regular expression does not contain any special character. For example, you can create a simple regular expression "hello" to match the character string "hello" only. In practice, multiple common and special characters are used together to match a character string with special features.

  • Degeneration of special characters

    Certain special characters, when placed at certain positions in a regular expression, degenerate to common characters.

    • The special characters following "\" match special characters themselves.

    • The special characters "*", "+", and "?" are placed at the starting position of the regular expression. For example, +45 matches "+45" and abc(*def) matches "abc*def".

    • The special character "^" is placed at any position except for the start of the regular expression. For example, abc^ matches "abc^".

    • The special character "$" is placed at any position except for the end of the regular expression. For example, 12$2 matches "12$2".

    • A right parenthesis ")" or right bracket "]" is not paired with a corresponding left parenthesis "(" or bracket "[". For example, abc) matches "abc)" and 0-9] matches "0-9]".

    7b670aae0a894c5c82d843d1698f8b97 NOTE:

    Unless otherwise specified, degeneration rules also apply when the preceding regular expressions are subexpressions within parentheses.

Usage of Regular Expressions

There are two modes to filter output information based on the regular expression.
  • Specifying a filtering mode in a command: enter the keyword begin, exclude, or include, and a regular expression in the command line to filter command outputs.
  • Specifying a filtering mode on a split screen: enter a slash (/), minus (-), or plus (+) symbol, and a regular expression to filter command outputs to be displayed on a split screen. The slash (/), minus (-), and plus (+) symbols have the same functions as the keywords begin, exclude, and include.

Specifying a Filtering Mode in a Command

Three filtering modes are provided for commands that support regular expressions.

  • | begin regular-expression: displays all the lines beginning with the line that matches the regular expression.

    Filter the character strings to be entered until the specified case-sensitive character string is displayed. All the character strings following this specified character string are displayed on the screen.

  • | exclude regular-expression: displays all the lines that do not match the regular expression.

    If the character strings to be entered do not contain the specified case-sensitive character string, they are displayed on the screen. Otherwise, they are filtered.

  • | include regular-expression: displays all the lines that match the regular expression.

    If the character strings to be entered contain the specified case-sensitive character string, they are displayed on the screen. Otherwise, they are filtered.

7b670aae0a894c5c82d843d1698f8b97 NOTE:

You can specify the filtering mode of output information for some display commands that have large amount of output information.

After the command output is filtered, the displayed information is displayed with its context. Context rules are as follows:
  • before before-line-number: displays lines that match filtering rules and the preceding before-line-number lines.

  • after after-line-number: displays lines that match filtering rules and the subsequent after-line-number lines.

  • before before-line-number + after after-line-number or after after-line-number + beforebefore-line-number: displays lines that match filtering rules, the preceding before-line-numberlines, and the subsequent after-line-number lines.

    Values of before-line-number and after-line-number are a string of 1 to 999 characters.

The following examples describe how to specify a filtering mode in a command.

Example 1: Run the display interface brief command to display all the lines that do not match Ethernet,NULL, or Tunnel.

<HUAWEI> display interface brief | exclude Ethernet|NULL|Tunnel
PHY: Physical
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
Eth-Trunk1                  down  down        0%     0%          0          0
Eth-Trunk17                 down  down        0%     0%          0          0
LoopBack1                   up    up(s)       0%     0%          0          0
Vlanif1                     up    down        --     --          0          0
MEth0/0/1                   down  down        0%     0%          0          0
Vlanif2                     down  down        --     --          0          0
Vlanif10                    down  down        --     --          0          0
Vlanif12                    down  down        --     --          0          0
Vlanif13                    down  down        --     --          0          0
Vlanif20                    up    up          --     --          0          0
Vlanif22                    down  down        --     --          0          0
Vlanif222                   down  down        --     --          0          0
Vlanif4094                  down  down        --     --          0          0

Example 2: Run the display current-configuration command to display all the lines that match the regular expression vlan.

<HUAWEI> display current-configuration | include vlan
vlan batch 2 10 101 to 102 800 1000
vlan 2
vlan 10
 port trunk pvid vlan 800
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 10 101 800
 undo port hybrid vlan 1
 undo port hybrid vlan 1
 port hybrid untagged vlan 10
 undo port hybrid vlan 1
 undo port hybrid vlan 1
7b670aae0a894c5c82d843d1698f8b97 NOTE:

The command output provided here is used for reference only. The actual output information may differ from the preceding information.

Specifying a Filtering Mode on a Split Screen

When the output of the following commands is displayed screen by screen, you can specify a filtering mode:
  • display current-configuration
  • display interface
  • display arp

When a lot of information is displayed on a split screen, you can specify a filtering mode in the prompt "---- More ----".

  • /regular-expression: displays all the lines beginning with the line that matches the regular expression.

  • -regular-expression: displays all the lines that do not match the regular expression.

  • +regular-expression: displays all the lines that match the regular expression.

For example, run the display current-configuration command to display only VLANIF-related information when the command output is displayed on a split screen.
<HUAWEI> display current-configuration
!Software Version V200R010C00
#
sysname HUAWEI
#
vlan batch 10 to 11 100
#
hotkey CTRL_G "display tcp status"
#
lldp enable
#
undo http server enable
undo http secure-server enable
#
dhcp enable
#
dhcp snooping enable
+Vlanif            //Enter the filtering mode.

Filtering...
interface Vlanif10
interface Vlanif100

9.1.3 Common display Commands

The device provides various display commands to display hardware, interface, and software information. The information helps you locate various faults.

The following table lists the commands used to collect fault information.

Item

Command

Description

Basic information

display diagnostic-information

This command collects basic system information. It displays outputs of multiple display commands, including display deviceand display current-configuration. This information is integral for troubleshooting any network problem. Executing this command requires a long time. You can press Ctrl+C to pause diagnostic information display on a terminal.

Device information

display device

Interface information

display interface

Version information

display version

Patch information

display patch-information

Electronic label information

display elabel

Current configuration

display current-configuration

Saved configuration

display saved-configuration

System time

display clock

Alarms

display trapbuffer

User logs

display logbuffer

Memory usage

display memory-usage
If the slot slot-id parameter is specified in display memory-usage [ slot slot-id ] command:
  • Specifies the slot ID if stacking is not configured.
  • Specifies the stack ID if stacking is configured.

CPU usage

display cpu-usage
If the slot slot-id parameter is specified in display cpu-usage [ slot slot-id ] command:
  • Specifies the slot ID if stacking is not configured.
  • Specifies the stack ID if stacking is configured.

9.2 reset Commands

9.2.1 Overview

The reset commands are used to clear statistics on switches, helping you quickly locate faults. The resetcommands include:

  • The commands resetting connections
  • The commands clearing statistics

This section involves the reset commands clearing statistics.

9.2.2 reset Commands Clearing Packet Statistics

reset counters interface and reset ip statistics are often used to clear packet statistics displayed in the display interface and display ip interface command output.

  • The display interface command provides counters to collect statistics on sent and received Layer 2 packets. The reset counters interface command resets these counters.
  • The display ip interface command provides counters to collect statistics on sent and received Layer 3 packets. The reset ip statistics command resets these counters.

9.2.3 Using reset Commands

Context

When you use the ping command to test link connectivity, you also need to run the display interface or display ip interface command to check whether packets are correctly sent and received on interfaces and whether a CRC error occurs. Then you can locate the interface where the fault occurs.

The display command output shows packet statistics generated after the device starts or the counter is reset; therefore, the packet statistics may contain unnecessary information that interferes with fault location.

To collect packet statistics accurately, perform the following operations:

Procedure

  1. Run the reset counters interface or reset ip statistics command to clear existing packet statistics.
  2. Run the ping command to enable device interfaces to send and receive packets.
  3. Run the display interface or display ip interface commands to view the statistics.

Example

For example, after you run the display interface gigabitethernet 0/0/1 command, the following statistics are displayed:

Input:  99598 packets, 18626534 bytes                                                                                               
  Unicast:                          0,  Multicast:                       74750                                                      
  Broadcast:                    24848,  Jumbo:                               0                                                      
  Discard:                          0,  Pause:                               0                                                      
                                                                                                                                    
  Total Error:                     0                                                                                               
  CRC:                              0,  Giants:                              0                                                      
  Jabbers:                          0,  Fragments:                           0                                                      
  Runts:                            0,  DropEvents:                          0                                                      
  Alignments:                       0,  Symbols:                             0                                                      
  Ignoreds:                         0,  Frames:                              0                                                      
                                                                                                                                    
Output:  20233 packets, 10217244 bytes                                                                                              
  Unicast:                          0,  Multicast:                       20233                                                      
  Broadcast:                        0,  Jumbo:                               0                                                      
  Discard:                          0,  Pause:                               0                                                      
                                                                                                                                    
  Total Error:                     0                                                                                               
  Collisions:                       0,  ExcessiveCollisions:                 0                                                      
  Late Collisions:                  0,  Deferreds:                           0                                                      
  Buffers Purged:                   0      

If the value of Total Error is not 0, there is an error in packet sending and receiving.

To check when the error occurs, run the reset counters interface gigabitethernet 0/0/1 command to clear existing statistics, use the ping command to send ping packets, and run the display interface gigabitethernet 0/0/1 command to view new statistics. If the Total Error value is still not 0, the error may need to be rectified.

9.3 Ping and Tracert

Introduction to the Ping Command

The Ping command implementation is based on the Internet Control Message Protocol (ICMP). The source end sends an ICMP Echo Request message to the destination end to determine reachability. If the source end receives an ICMP Echo Reply message from the destination end within the specified period, the destination end is reachable. Otherwise, the destination end is unreachable. The source end determines the quality of the link to the reachable destination end based on the number of sent ICMP Echo Request messages and received ICMP Echo Reply messages. It also determines the distance between the source end and destination end according to the round-trip time (RTT) of ping packets.

Ping Command Format

7b670aae0a894c5c82d843d1698f8b97 NOTE:

S1720&S2700&S5700&S6720 Series Ethernet Switches Command Reference provides detailed description of command parameters and usage. The following only describes some of the commonly used parameters.

ping [ ip ] [ -a source-ip-address | -c count | -f | -s packetsize | -t timeout ] * host

  • -a: specifies the source IP address for sending Echo Request messages. If no source IP address is specified, the IP address of the outbound interface is used as the source IP address.

  • -c: specifies the count for sending Echo Request messages. The default value is 5. You can increase the number of outgoing packets to detect the network quality based on the packet loss ratio.

  • -f: indicates that packets are not fragmented when they are sent. The device discards the packets if the packet size exceeds the MTU.

  • -s: specifies the length of an Echo Request message without the IP header and ICMP header. The default value is 56 bytes.

  • -t: specifies the timeout interval of Echo Response messages. You can set a larger timeout interval if the network is unstable. The default value is 2s. If the device receives no Echo Response message, it determines that the destination is unreachable.

  • host: specifies an IP address or a domain name. If it is a domain name, the device performs DNS resolution and displays the resolved IP address.

7b670aae0a894c5c82d843d1698f8b97 NOTE:

This section only describes some of the commonly used parameters. For additional details, see ping in section Ping and Tracert of the Network Management and Monitoring volume in the Command Reference of the corresponding version.

The Ping function varies with the operating system of the PC. The Windows operating system is used as an example.

ping [ -n number ] [ -t ] [ -l number ] [ -f ] [ -a ] ip-address

  • -n: specifies the number of Ping packets. The default value is 5.

  • -t: indicates that the source sends Echo Request messages to the destination continuously until manual operations are performed. You can press Ctrl + Break to temporarily stop the Ping command and view the statistics, and press Ctrl + C to end the Ping operation.

  • -l: specifies the number of bytes of data in Ping packets. The value ranges from 0 to 65500.

  • -f: indicates that packets are not fragmented when they are sent. The device discards the packets if the packet size exceeds the MTU.

  • -a: indicates that the device resolves an IP address into a host name.

  • ip-address: specifies the destination IP address to ping.

Description of the Ping Command Output

<HUAWEI> ping 10.135.18.118
  PING 10.135.18.118: 56  data bytes, press CTRL_C to break                     
    Reply from 10.135.18.118: bytes=56 Sequence=1 ttl=255 time=1 ms             
    Reply from 10.135.18.118: bytes=56 Sequence=2 ttl=255 time=1 ms             
    Reply from 10.135.18.118: bytes=56 Sequence=3 ttl=255 time=2 ms             
    Reply from 10.135.18.118: bytes=56 Sequence=4 ttl=255 time=1 ms             
    Reply from 10.135.18.118: bytes=56 Sequence=5 ttl=255 time=2 ms             
                                                                                
  --- 10.135.18.118 ping statistics ---                                         
    5 packet(s) transmitted                                                     
    5 packet(s) received                                                        
    0.00% packet loss                                                           
    round-trip min/avg/max = 1/1/2 ms      

In this example:

  • The device sends five Ping packets and receives response for all the five packets.

  • The Ping packets use the default size, 56 bytes.

  • The TTL value is 255, indicating that the source is directly connected to the destination.

  • The time is 1 ms, indicating that the device received an Echo Response message 1 ms after it sent an Echo Request message. This parameter can be used to determine whether the network is congested.

The device sends five Ping packets by default. You can set a larger value for -c to accurately detect the network status. The device determines the network status based on the number of Ping packets returned.

Fault Description

Possible Cause

All packets can reach the destination but require a long time.

The intermediate network is unstable.

QoS is deployed on the gateway, which lowers the forwarding speed.

No packet can reach the destination.

Services on the network are interrupted due to device or cable faults.

The firewall on the intermediate network discards ICMP packets.

A loop occurs on the network and packets are discarded when the TTL value is reduced to 1.

Packets are delayed due to network congestion.

Some packets cannot reach the destination.

The network is unstable, leading to discarded packets.

Load balancing is configured on the intermediate network and some Ping packets are discarded on a path.

Packet flooding attacks.

Introduction to the Tracert Command

The Ping command checks whether the destination host is reachable and the Tracert command tracks the gateways that packets pass through from the source host to the destination host. This helps check network connectivity and locate network faults.

Figure 9-1 Tracert working process
f65e403625894424bc4ad411360b618c

The tracert command implementation is based on the ICMP. As shown in Figure 9-1, the working process of tracert is as follows:

  1. The source end (SwitchA) sends a UDP packet whose TTL value is 1 and destination UDP port number is larger than 30000 to the destination end (Log host). A UDP port number larger than 30000 is not commonly used by any program.
  2. Upon receiving the UDP packet, the first-hop host (SwitchB) determines that the destination IP address of the packet is not its local IP address and decreases the TTL value by one. The TTL value is 0, so SwitchB discards the UDP packet, and sends an ICMP Time Exceeded message containing its local IP address 10.1.1.2 to SwitchA. SwitchA obtains the IP address of SwitchB.
  3. Upon receiving the ICMP Time Exceeded message from SwitchB, SwitchA sends a UDP packet with a TTL value of 2.
  4. Upon receiving the UDP packet, the second-hop host (SwitchC) returns an ICMP Time Exceeded message containing its local IP address 10.1.2.2 to SwitchA.
  5. The preceding process is repeated until the destination end determines that the destination IP address of the UDP packet is its local IP address and processes the packet. The destination end searches for the upper-layer protocol that uses the destination port number of the packet. No program uses this UDP port number, so the destination end returns an ICMP Destination Unreachable message containing its local IP address 10.1.3.2.
  6. Upon receiving the ICMP Destination Unreachable message, the source end determines that the UDP packet has reached the destination end, stops tracert, and generates the path of the UDP packet 10.1.1.2 -> 10.1.2.2 -> 10.1.3.2.

Tracert Command Format

7b670aae0a894c5c82d843d1698f8b97 NOTE:

S1720&S2700&S5700&S6720 Series Ethernet Switches Command Reference provides detailed description of command parameters and usage. The following only describes some commonly used parameters.

tracert [ -a source-ip-address | -f first-ttl | -m max-ttl | -p port | -q nqueries | -w timeout ] * host

  • -a: specifies the source address. If this parameter is not specified, the IP address of the outbound interface is used as the source IP address of outgoing packets.

  • -f: specifies the initial TTL. If the number of hops is smaller than the initial TTL, the source host receives no TTL-expired packet. If a maximum TTL is set, the initial TTL must be smaller than the maximum TTL.

  • -m: specifies the maximum TTL. The maximum TTL is usually set to the number of hops through which a Tracert packet passes. If an initial TTL is set, the maximum TTL must be larger than the initial TTL. By default, the maximum TTL value is 30.

  • -p: specifies the UDP port number of the destination.
    • If no UDP port number is specified for the destination, when you run the Tracertcommand, a port with the port number greater than 32768 is randomly chosen for the destination to receive tracert packets.
    • Before specifying the UDP port number for the destination, ensure that the port is not in use; otherwise, the Tracert fails.
  • -q: specifies the number of UDP packets sent each time. You can increase this value to ensure that UDP packets can reach the destination host if network quality is low. By default, 3 UDP packets are sent each time.

  • -w: sets the timeout interval of Response messages. If a gateway sends a message indicating TTL timeout, " * " is displayed. You are advised to increase the timeout interval when the network is unstable and the transmission speed is low. The default timeout interval is 5000 ms.

  • host: indicates an IP address or a domain name. If it is a domain name, the device performs DNS resolution and displays the resolved IP address.

The Tracert function varies with the operating system of the PC. The Windows operating system is used as an example for illustration.

tracert [ -d ] [ -h maximum_hops ] [ -j host-list ] [ -w timeout ] host

  • -d: indicates that the host name is not resolved.

  • -h: specifies the maximum TTL.

  • -j: specifies the loose source address routing list.

  • -w: sets the timeout interval of UDP packets, in milliseconds.

  • host: specifies the domain name or IP address of the destination host.

Description of the Tracert Command Output

<HUAWEI> tracert 10.135.18.118
 traceroute to  10.135.18.118(10.135.18.118), max hops: 30 ,packet length: 40,press CTRL_C to break
 1 192.168.200.100 10 ms  2 ms  2 ms
 2  *  *  *
 3 10.135.18.118 10 ms  1 ms  2 ms

Information displayed in a line includes the number, IP address where the packet reaches, and three response times. * * * displayed in the second line indicates that the Ping and Tracert operations are not supported on this node.

The Ping command can only determine whether the destination is reachable, whereas the Tracertcommand can detect potential loops on a network. If you track an address and the same address is displayed multiple times, a route loop exists.

9.4 Packet Capture

Capturing Service Packets

If a device fails to forward traffic correctly, configure the packet capture function to capture service packets for analysis. This allows the device to process invalid packets on time promptly, ensuring that network data can be transmitted correctly.

Format

capture-packet { interface interface-type interface-number | acl acl-number } * [ vlan vlan-id | cvlancvlan-id ] * destination terminal [ car cir car-value | time-out time-out-value | packet-num number | packet-len { length | total-packet } ] *

7b670aae0a894c5c82d843d1698f8b97 NOTE:

The device does not support the total-packet parameter in V200R010C00 and later versions.

Parameters

Parameter

Description

Value

interface interface-type interface-number

Captures packets on a specified interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

acl acl-number

Captures packets matching a specified ACL.

The value is an integer.
  • Versions earlier than V200R010: The value ranges from 2000 to 4999.
  • V200R010: The value ranges from 2000 to 5999 for S5720EI, S6720EI, and S6720S-EI, and ranges from 2000 to 4999 for the other models.

vlan vlan-id

Captures packets from a specified VLAN.

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

cvlan cvlan-id

Captures packets with a specified inner VLAN ID.

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

destination

Indicates the destination to which captured packet information is sent.

-

terminal

Displays captured packet information on a terminal.

-

car cir car-value

Specifies the rate at which packets are captured.

The value is an integer that ranges from 8 to 256, in kbit/s. The default value is 64 kbit/s.

time-out time-out-value

Specifies the timeout period for capturing packets. The system stops capturing packets after the specified timeout period expires.

The value is an integer that ranges from 1 to 300, in seconds. By default, the timeout period is 60s.

packet-num number

Specifies the number of packets to be captured. The system stops capturing packets after the specified number of packets are captured.

The value is an integer that ranges from 1 to 1000. The default value is 100.

packet-len length

Specifies the length of captured packets that can be displayed or stored.

The value is an integer that ranges from 20 to 1518, in bytes. The default value is 64 bytes.

NOTE:

The value ranges from 20 to 64 in V200R010C00 and later versions.

total-packet

Displays the content of the entire captured packet.

-

Views

System view

Precautions

The packet capture configuration is not saved in the configuration file and becomes invalid when packet capture is complete.

The device can capture only incoming packets and cannot capture outgoing packets.

Wait until the capture-packet command is completed before running this command again.

The system limits the rate of captured packets. The default rate limit is 64 kbit/s. If the rate of packets exceeds the limit, some packets may be discarded.

The device cannot capture the packets of BFD, 802.1ag and VBST.

Capturing Packets Sent to the CPU

When a CPU fault occurs, configure the packet capture function to capture packets sent to the CPU for analysis. This allows the device to process invalid packets promptly, ensuring that the CPU works properly.

Format

capture-packet cpu [ vlan vlan-id | acl acl-number ] * destination terminal [ time-out time-out-value | packet-num number | packet-len { length | total-packet } ] *

7b670aae0a894c5c82d843d1698f8b97 NOTE:

The device does not support the total-packet parameter in V200R010C00 and later versions.

Parameters

Parameter

Description

Value

acl acl-number

Captures packets matching a specified ACL.

The value is an integer.
  • Versions earlier than V200R010: The value ranges from 2000 to 4999.
  • V200R010: The value ranges from 2000 to 5999 for S5720EI, S6720EI, and S6720S-EI, and ranges from 2000 to 4999 for the other models.

vlan vlan-id

Captures packets from a specified VLAN.

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

destination

Indicates the destination to which captured packet information is sent.

-

terminal

Displays captured packet information on a terminal.

-

time-out time-out-value

Specifies the timeout period for capturing packets. The system stops capturing packets after the specified timeout period expires.

The value of time-out-value is an integer that ranges from 1 to 300, in seconds. By default, the timeout period is 60s.

packet-num number

Specifies the number of packets to be captured. The system stops capturing packets after the specified number of packets are captured.

The value of number is an integer that ranges from 1 to 1000. The default value is 100.

packet-len length

Specifies the length of captured packets that can be displayed or stored.

The value of length is an integer that ranges from 20 to 1518, in bytes. The default value is 64 bytes.

NOTE:

The value ranges from 20 to 64 in V200R010C00 and later versions.

total-packet

Displays the content of the entire captured packet.

-

Views

System view

Precautions

The packet capture configuration is not saved in the configuration file, and becomes invalid when packet capture is complete.

Wait until the capture-packet cpu command is completed before running this command again.

When the CPU usage is above 80%, executing this command will cause the CPU usage to continue increasing.

9.5 BootROM Diagnosis Menu Overview

Only the S1720GFR, S2720, S2750, S5700LI, S5700S-LI (excluding S5700S-28X-LI-AC and S5700S-52X-LI-AC) support the BootROM menu.

In the BootROM main menu, press Ctrl+E to display the diagnosis menu.

304e94ccc8f944209f56ef3cec973068 NOTICE:

The diagnosis menu is used to commission device performance during the device production and assembly processes. You are advised not to use the diagnosis menu. If required, follow the instructions of the technical support personnel.

The display menus vary according to the device model.

Do as follows to enter the diagnosis menu:

Press Ctrl+B or Ctrl+E to enter BootROM menu ... 3
password:         //Enter the BootROM password. The initial password is Admin@huawei.com.          
          BootROM  MENU

    1. Boot with default mode
    2. Enter serial submenu
    3. Enter startup submenu
    4. Enter ethernet submenu
    5. Enter filesystem submenu
    6. Modify BootROM password   //V200R006 and earlier versions: Modify BootROM password; V200R007 and later versions: Enter password submenu
    7. Clear password for console user
    8. Reboot
    (Press Ctrl+E to enter diag menu) 

Enter your choice(1-8):        //Press Ctrl+E to enter the diagnosis menu.
                                                                                
                                                                                
    Waring: The diag menu is only used for diagnose.                            
            Do not use this menu without the guidance of developer,             
            otherwise the software may be broken.                               
                                                                                
                                                                                
                                                                                
                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 
Table 9-2 Description of the BootROM diagnosis menu

Item

Description

1. Equip test

Enter the equipment test submenu. You can set the equipment software flag bit in this menu to facilitate equipment software startup and device commissioning.

2. Reserved

Reserved item.

3. RPS test

Enter the RPS test submenu. You can perform an RPS performance test in this menu for RPS-capable devices.

4. POE test

Enter the PoE test submenu. You can perform a PoE performance test in this menu for PoE-capable devices.

5. DFX target test

Modify test object of equipment software.

An equipment software test includes main board test and subcard test. The system performs a main board test by default. You can modify the test object in this menu. The operations are as follows:
Note: Test DFX target will change the board tested in DFT software.             
      Test DFX target? Yes or No(Y/N): y                                        
                                                                                
 Choose DFX target:                                                             
 1. MainBoard      2. SubCard                                                   
Please input slot ID:    //Enter the object ID.

6. Reserved

Reserved item.

7. Aging test

Enter the aging test submenu. This menu is used to test whether the read-write function of protocol stacks from the storage device, memory, and CPU is normal.

8. E-Label barcode and MAC test

Enter the e-label and MAC test submenu. You can view the device's e-label, PCB version, and subcard type in this menu.

9. Reserved

Reserved item.

10. Startup file test

Test the correctness of the startup file (system software).

The startup file specified by a user may not match the device or have been damaged. You can use this menu to test the file correctness. If an error is detected, replace the system software.

11. Image test

Enter the mirror test submenu.

12. Return to main menu

Return to the BootROM main menu.

9.5.1 Equipment Test Submenu

Select 1 in the diagnosis menu to enter the equipment test submenu.

                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 1
                                                                                
                                                                                
                   EQUIP TEST SUBMENU                                           
                                                                                
   1. Load DFT package             2. Load DFD package                              
   3. Reserved                     4. Reserved                                  
   5. RTC test                     6. Reserved                                  
   7. Power test                   8. Reserved                                  
   9. Reserved                    10. Return to upper menu                      
Enter your choice(1-10): 
Table 9-3 Description of the equipment test submenu

Item

Description

1. Load DFT package

Start the equipment package.

NOTE:

For S5700EI, S5700HI and S6700EI, the value is 1. Reserved item.

2. Load DFD package

Start the maintenance package.

NOTE:

The equipment package and the maintenance package are the same package but provide different test items in different startup modes.

For S5700HI and S6700EI, the value is 2. Reserved item.

3. Reserved

Reserved item.

4. Reserved

Reserved item.

5. RTC test

Test the RTC chip. RTC is the device's clock unit. You can use this menu to test the accuracy of recorded RTC time. This menu consists of three options.
  • Set RTC time: Set the RTC time.
  • Get RTC time: Obtain the RTC time.
  • RTC time test: Test the accuracy of the RTC time. The test lasts 60s.

6. Reserved

Reserved item.

7. Power test

Test the working status of the device's power supply unit.

8. Reserved

Reserved item.

9. Reserved

Reserved item.

10. Return to upper menu

Return to the upper-level menu.

9.5.2 RPS Test Submenu

7b670aae0a894c5c82d843d1698f8b97 NOTE:

This menu is valid for RPS-capable devices only.

Select 3 in the diagnosis menu to enter the RPS test submenu.
                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 3
                                                                                
                                                                                
                   RPS TEST SUBMENU                                             
                                                                                
   1. Query test                   2. E-Label load                              
   3. Environment monitor test     4. Indicator light test                      
   5. E-Label verify               6. Return to upper menu                      
Enter your choice(1-6):
Table 9-4 Description of the RPS test submenu

Item

Description

1. Query test

Check the RPS power status. You can view the voltage, T2C status, version, and fan information of the RPS power.

2. E-Label load

Load the RPS power e-label.

3. Environment monitor test

Test the RPS temperature detection chip and display the current temperature.

4. Indicator light test

Test whether the RPS power indicators are operating properly.

5. E-Label verify

Test the read function of the RPS power e-label.

6. Return to upper menu

Return to the upper-level menu.

9.5.3 PoE Test Submenu

7b670aae0a894c5c82d843d1698f8b97 NOTE:

c

Select 4 in the diagnosis menu to enter the PoE test submenu.

                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 4
                                                                                
                                                                                
                   POE TEST SUBMENU                                             
                                                                                
   1. Init POE                     2. Query interrupt                           
   3. Clear interrupt              4. Display POE state reg                     
   5. Version test                 6. Reset POE                                 
   7. Return to upper menu                                                      
Enter your choice(1-7): 
Table 9-5 Description of the PoE test sub-menu

Item

Description

1. Init POE

Initialize the PoE subcard.

2. Query interrupt

Obtain PoE subcard interrupt information.

3. Clear interrupt

Delete PoE subcard interrupt information.

4. Display POE state reg

Display the status register value of the PoE subcard.

5. Version test

Display the PoE subcard version.

6. Reset POE

Reset the PoE subcard.

7. Return to upper menu

Return to the upper-level menu.

9.5.4 Aging Test Submenu

Select 7 in the diagnosis menu to enter the aging test submenu.
                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 7
                                                                                
                                                                                
                   AGING FLAG TEST SUBMENU                                      
                                                                                
   1. Set aging flag               2. Get aging flag                            
   3. Clear aging flag             4. Display aging result                      
   5. Return to upper menu                                                      
Enter your choice(1-5):  
Table 9-6 Description of the aging test submenu

Item

Description

1. Set aging flag

Set the aging test flag.

2. Get aging flag

Obtain the aging test flag.

3. Clear aging flag

Delete the aging test flag.

4. Display aging result

Display the aging test result.

5. Return to upper menu

Return to the upper-level menu.

9.5.5 E-Label and MAC Test Submenu

Select 8 in the diagnosis menu to enter the e-label and MAC test submenu.

                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 8
                                                                                
                                                                                
                   E-LABEL and MAC TEST SUBMENU                                 
                                                                                
   1. Read E-lable test            V200R005C00&C01: 2. Load E-lable test. Other versions: 2. Reserved
   3. Reserved                     4. Read MAC address                          
   5. Reserved                     6. Read ict barcode                          
   7. Reserved                     8. Read SubCard pcb Ver info                 
   9. Reserved                    10. Read SubCard board type                   
  11. Return to upper menu                                                      
Enter your choice(1-11): 
Table 9-7 Description of the e-label and MAC test submenu

Item

Description

1. Read E-lable test

Display the device's e-label. The e-label of various components, including the main board, POE DIMM, fan, and power module, can be displayed.

V200R005C00&C01: 2. Load E-lable test. Other versions: 2. Reserved
  • V200R005C00&C01: Load the e-label and display the e-label of various components such as POE DIMM.
  • Other versions: Reserved item.

3. Reserved

Reserved item.

4. Read MAC address

Display the device's MAC address.

5. Reserved

Reserved item.

6. Read ict barcode

Display the device's barcode.

7. Reserved

Reserved item.

8. Read SubCard pcb Ver info

Display the subcard PCB version.

9. Reserved

Reserved item.

10. Read SubCard board type

Display the subcard type.

11. Return to upper menu

Return to the upper-level menu.

9.5.6 Mirror Test Submenu

Select 11 in the diagnosis menu to enter the mirror test submenu.

                     DIAG MENU                                                  
                                                                                
   1. Equip test                 2. Reserved                                    
   3. RPS test                   4. POE test                                    
   5. DFX target test            6. Reserved                                    
   7. Aging test                 8. E-Label barcode and MAC test                
   9. Reserved                  10. Startup file test                           
  11. Image test                12. Return to main menu                         
Enter your choice(1-12): 11
                                                                                
                                                                                
                   IMAGE TEST SUBMENU                                           
                                                                                
   1. Reserved                     2. Build image                               
   3. Reserved                     4. Reserved                                  
   5. Reset board                  6. Return to upper menu                      
Enter your choice(1-6): 
Table 9-8 Description of the mirror test submenu

Item

Description

1. Reserved

Reserved item.

2. Build image

Generate image files and export them to the FTP serverthrough the management interface. Before using this menu, connect the device's management interface to the FTP server.

3. Reserved

Reserved item.

4. Reserved

Reserved item.

5. Reset board

Reset the card.

6. Return to upper menu

Return to the upper-level menu.

9.6 BootLoad Diagnosis Menu Overview

Only the S5710-X-LI, S5700S-28X-LI-AC, S5700S-52X-LI-AC, S5720SI, S5720S-SI, S5720EI, S5720HI, S6720EI, S5720LI, S5720S-LI and S6720S-EI support the BootLoad menu.

In the BootLoad main menu, press Ctrl+E to display the diagnosis menu.

304e94ccc8f944209f56ef3cec973068 NOTICE:

The diagnosis menu is used to commission device performance during the device production and assembly processes. You are advised not to use the diagnosis menu. If required, follow the instructions of the technical support personnel.

Do as follows to enter the diagnosis menu:

Press Ctrl+B or Ctrl+E to enter BootLoad menu ... 3
password:         //Enter the BootLoad password. The initial password is Admin@huawei.com.          
        BootLoad Menu

     1. Boot with default mode
     2. Enter serial submenu
     3. Enter startup submenu
     4. Enter ethernet submenu
     5. Enter filesystem submenu
     6. Modify BootLoad password   //V200R006 and earlier versions: Modify BootLoad password; V200R007 and later versions: Enter password submenu
     7. Clear password for console user
     8. Reboot
    (Press Ctrl+E to enter diag menu)//Press Ctrl+E to enter the diagnosis menu.


Enter your choice(1-8): 
******************************************************************
* You have entered Engineering Mode. In this mode, any operation *
* may cause irreversible damage to the device. Please note!      *
******************************************************************


        DIAG  MENU

     1. Equip test
     2. Reserved
     3. Reserved
     4. POE test
     5. Reserved
     6. Reserved
     7. Aging test
     8. E-Label barcode and MAC test
     9. Reserved
    10. Startup file test
    11. Image test
    12. Return to main menu
Enter your choice(1-12):
Table 9-9 Description of the BootLoad diagnosis menu

Item

Description

1. Equip test

Enter the equipment test submenu. You can set the equipment software flag bit in this menu to facilitate equipment software startup and device commissioning.

2. Reserved

Reserved item.

3. Reserved

Reserved item.

4. POE test

Enter the PoE test submenu. You can perform a PoE performance test in this menu for PoE-capable devices.

5. Reserved

Reserved item.

6. Reserved

Reserved item.

7. Aging test

Enter the aging test submenu. This menu is used to test whether the read-write function of protocol stacks from the storage device, memory, and CPU is normal.

8. E-Label barcode and MAC test

Enter the e-label and MAC test submenu. You can view the device's e-label, PCB version, and subcard type in this menu.

9. Reserved

Reserved item.

10. Startup file test

Test the correctness of the startup file (system software).

The startup file specified by a user may not match the device or have been damaged. You can use this menu to test the file correctness. If an error is detected, replace the system software.

11. Image test

Enter the mirror test submenu.

12. Return to main menu

Return to the BootLoad main menu.

9.6.1 Equipment Test Submenu

Select 1 in the diagnosis menu to enter the equipment test submenu.

        DIAG  MENU                                                              
                                                                                
     1. Equip test                                                              
     2. Reserved                                                                
     3. Reserved                                                                
     4. POE test                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Aging test                                                              
     8. E-Label barcode and MAC test                                            
     9. Reserved                                                                
    10. Startup file test                                                       
    11. Image test                                                              
    12. Return to main menu                                                     
                                                                                
Enter your choice(1-12): 1                                                      
                                                                                
        EQUIP TEST SUBMENU                                                      
                                                                                
     1. Load DFX package                                                        
     2. Reserved                                                                
     3. Reserved                                                                
     4. Reserved                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Reserved                                                                
     8. Reserved                                                                
     9. Reserved                                                                
    10. Return to upper menu                                                    
                                                                                
Enter your choice(1-10):      
Table 9-10 Description of the equipment test submenu

Item

Description

1. Load DFX package

Start the equipment package.

2. Reserved

Reserved item.

3. Reserved

Reserved item.

4. Reserved

Reserved item.

5. Reserved

Reserved item.

6. Reserved

Reserved item.

7. Reserved

Reserved item.

8. Reserved

Reserved item.

9. Reserved

Reserved item.

10. Return to upper menu

Return to the upper-level menu.

9.6.2 PoE Test Submenu

7b670aae0a894c5c82d843d1698f8b97 NOTE:

This menu is valid for PoE-capable devices only.

Select 4 in the diagnosis menu to enter the PoE test submenu.

        DIAG  MENU                                                              
                                                                                
     1. Equip test                                                              
     2. Reserved                                                                
     3. Reserved                                                                
     4. POE test                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Aging test                                                              
     8. E-Label barcode and MAC test                                            
     9. Reserved                                                                
    10. Startup file test                                                       
    11. Image test                                                              
    12. Return to main menu                                                     
                                                                                
Enter your choice(1-12): 4                                                      
                                                                                
        POE TEST SUBMENU                                                        
                                                                                
     1. Init POE                                                                
     2. Query interrupt                                                         
     3. Clear interrupt                                                         
     4. Display POE state reg                                                   
     5. Version test                                                            
     6. Reset POE                                                               
     7. Load POE E-LABEL                                                        
     8. Return to upper menu                                                    
                                                                                
Enter your choice(1-8):      
Table 9-11 Description of the PoE test submenu

Item

Description

1. Init POE

Initialize the PoE subcard.

2. Query interrupt

Obtain PoE subcard interrupt information.

3. Clear interrupt

Delete PoE subcard interrupt information.

4. Display POE state reg

Display the status register value of the PoE subcard.

5. Version test

Display the PoE subcard version.

6. Reset POE

Reset the PoE subcard.

7. Load POE E-LABEL

Load the elabel of a PoE subcard.

8. Return to upper menu

Return to the upper-level menu.

9.6.3 Aging Test Submenu

Select 7 in the diagnosis menu to enter the aging test submenu.
        DIAG  MENU                                                              
                                                                                
     1. Equip test                                                              
     2. Reserved                                                                
     3. Reserved                                                                
     4. POE test                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Aging test                                                              
     8. E-Label barcode and MAC test                                            
     9. Reserved                                                                
    10. Startup file test                                                       
    11. Image test                                                              
    12. Return to main menu                                                     
                                                                                
Enter your choice(1-12): 7                                                      
                                                                                
        AGING TEST Submenu                                                      
                                                                                
     1. Set aging flag                                                          
     2. Get aging flag                                                          
     3. Clear aging flag                                                        
     4. Display aging result                                                    
     5. Return to upper menu                                                    
                                                                                
Enter your choice(1-5):     
Table 9-12 Description of the aging test submenu

Item

Description

1. Set aging flag

Set the aging test flag.

2. Get aging flag

Obtain the aging test flag.

3. Clear aging flag

Delete the aging test flag.

4. Display aging result

Display the aging test result.

5. Return to upper menu

Return to the upper-level menu.

9.6.4 E-Label and MAC Test Submenu

Select 8 in the diagnosis menu to enter the e-label and MAC test submenu.

        DIAG  MENU                                                              
                                                                                
     1. Equip test                                                              
     2. Reserved                                                                
     3. Reserved                                                                
     4. POE test                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Aging test                                                              
     8. E-Label barcode and MAC test                                            
     9. Reserved                                                                
    10. Startup file test                                                       
    11. Image test                                                              
    12. Return to main menu                                                     
                                                                                
Enter your choice(1-12): 8                                                      
                                                                                
        E-LABEL and MAC TEST Submenu                                            
                                                                                
     1. Read E-lable test                                                       
     2. Reserved                                                                
     3. Reserved                                                                
     4. Read MAC address                                                        
     5. Reserved                                                                
     6. Read ict barcode                                                        
     7. Reserved                                                                
     8. Reserved                                                                
     9. Reserved                                                                
    10. Reserved                                                                
    11. Return to upper menu                                                    
                                                                                
Enter your choice(1-11):      
Table 9-13 Description of the e-label and MAC test submenu

Item

Description

1. Read E-lable test

Display the device's e-label. The e-label of various components including the main board, POE DIMM, fan, and power module can be displayed.

2. Reserved

Reserved item.

3. Reserved

Reserved item.

4. Read MAC address

Display the device's MAC address.

5. Reserved

Reserved item.

6. Read ict barcode

Display the device's barcode.

7. Reserved

Reserved item.

8. Reserved

Reserved item.

9. Reserved

Reserved item.

10. Reserved

Reserved item.

11. Return to upper menu

Return to the upper-level menu.

9.6.5 Mirror Test Submenu

Select 11 in the diagnosis menu to enter the mirror test submenu.

        DIAG  MENU                                                              
                                                                                
     1. Equip test                                                              
     2. Reserved                                                                
     3. Reserved                                                                
     4. POE test                                                                
     5. Reserved                                                                
     6. Reserved                                                                
     7. Aging test                                                              
     8. E-Label barcode and MAC test                                            
     9. Reserved                                                                
    10. Startup file test                                                       
    11. Image test                                                              
    12. Return to main menu                                                     
                                                                                
Enter your choice(1-12): 11                                                     
                                                                                
        IMAGE TEST SUBMENU                                                      
                                                                                
     1. Reserved                                                      
     2. Reserved                                                                
     3. Reserved                                                                
     4. Reserved                                                                
     5. Reserved                                                                
     6. Return to upper menu                                                    
                                                                                
Enter your choice(1-6):      
Table 9-14 Description of the mirror test submenu

Item

Description

1. Reserved

Reserved item.

2. Reserved

Reserved item.

3. Reserved

Reserved item.

4. Reserved

Reserved item.

5. Reserved

Reserved item.

6. Return to upper menu

Return to the upper-level menu.

From group: Switch
  • x
  • convention:

WoodWood  Admin   Created Sep 26, 2017 11:34:58 Helpful(0) Helpful(0)

S1720&S2700&S3700&S5700&S6700 Series Switches Product Troubleshooting - Preliminary-9 Common Fault Diagnostic Commands
  • x
  • convention:

Responses

Reply
You need to log in to reply to the post Login | Register

Notice:To ensure the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but not limited to politically sensitive content, content concerning pornography, gambling, drug abuse and trafficking, content that may disclose or infringe upon others' intellectual properties, including commercial secrets, trade marks, copyrights, and patents, and personal privacy. Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see“ Privacy Policy.”
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top