- Table of Contents
-
- 13-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System Maintenance and Debugging Configuration
- 02-NQA Configuration
- 03-NTP Configuration
- 04-Clock Monitoring Configuration
- 05-IPC Configuration
- 06-SNMP Configuration
- 07-RMON Configuration
- 08-CWMP Configuration
- 09-Sampler Configuration
- 10-Mirroring Configuration
- 11-Protocol Packet Statistics Configuration
- 12-sFlow Configuration
- 13-Information Center Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
01-System Maintenance and Debugging Configuration | 201.76 KB |
You can use the ping command and the tracert command to verify the current network connectivity, and use the debug command to enable debugging and thus to diagnose system faults based on the debugging information.
Ping
Introduction
The ping command allows you to verify whether a device with a specified address is reachable, and to examine network connectivity.
The ping function is implemented through the Internet Control Message Protocol (ICMP):
1. The source sends an ICMP echo request to the destination.
2. The source determines whether the destination is reachable based on whether it receives an ICMP echo reply. If the destination is reachable, the source determines the following:
¡ The link quality, based on the numbers of ICMP echo requests sent and replies received.
¡ The distance between the source and destination, based on the round trip time of ping packets.
Configuring ping
To configure the ping function:
Task |
Command |
Remarks |
Check whether a specified address in an IP network is reachable. |
·
For an IPv4 network: · For an IPv6 network: |
Use either approach. Available in any view. |
|
NOTE: · When you configure the ping command for a low-speed network, H3C recommends that you set a larger value for the timeout timer (indicated by the -t parameter in the command). · Only the directly connected segment address can be pinged if the outgoing interface is specified with the -i argument. · For more information about the ping lsp command, see MPLS Command Reference. |
Ping configuration example
Network requirements
As shown in Figure 1, check whether Device A and Device C can reach each other. If they can reach each other, get the detailed information of routes from Device A to Device C.
Configuration procedure
# Use the ping command to display whether Device A and Device C can reach each other.
<DeviceA> ping 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.2.2: bytes=56 Sequence=1 ttl=254 time=205 ms
Reply from 1.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/41/205 ms
# Get the detailed information of routes from Device A to Device C.
<DeviceA> ping -r 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.2.2: bytes=56 Sequence=1 ttl=254 time=53 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/11/53 ms
The principle of ping –r is as shown in Figure 1.
1. The source (Device A) sends an ICMP echo request with the RR option being empty to the destination (Device C).
2. The intermediate device (Device B) adds the IP address (1.1.2.1) of its outbound interface to the RR option of the ICMP echo request, and forwards the packet.
3. Upon receiving the request, the destination device copies the RR option in the request and adds the IP address (1.1.2.2) of its outbound interface to the RR option. Then the destination device sends an ICMP echo reply.
4. The intermediate device adds the IP address (1.1.1.2) of its outbound interface to the RR option in the ICMP echo reply, and then forwards the reply.
5. Upon receiving the reply, the source device adds the IP address (1.1.1.1) of its inbound interface to the RR option. Finally, you can get the detailed information of routes from Device A to Device C: 1.1.1.1 <-> {1.1.1.2; 1.1.2.1} <-> 1.1.2.2.
Tracert
Introduction
To check whether a network is available, you can use the tracert command to trace the Layer 3 device involved in delivering an IP packet from source to destination. This is useful for identification of failed node(s) in the event of network failure.
Figure 2 Network diagram
The tracert function is implemented through ICMP, as shown in Figure 2:
1. The source (Device A) sends a packet with a TTL value of 1 to the destination (Device D). The UDP port of the packet is a port number that will not be used by any application of the destination.
2. The first hop (Device B) (the Layer 3 device that first receives the packet) responds by sending a TTL-expired ICMP error message to the source, with its IP address 1.1.1.2 encapsulated. In this way, the source device receives the address (1.1.1.2) of the first Layer 3 device.
3. The source device sends a packet with a TTL value of 2 to the destination device.
4. The second hop (Device C) responds with a TTL-expired ICMP error message, which gives the source device the address (1.1.2.2) of the second Layer 3 device.
5. The above process continues until the ultimate destination device is reached. No application of the destination uses this UDP port. Therefore, the destination replies a port unreachable ICMP error message with the destination IP address 1.1.3.2.
6. When the source device receives the port unreachable ICMP error message, it knows that the packet has reached the destination, and that it has received the addresses of all the Layer 3 devices involved in delivering the packet to the destination device (1.1.1.2, 1.1.2.2, 1.1.3.2).
Configuring tracert
Configuration prerequisites
For an IPv4 network:
· Enable sending of ICMP timeout packets on the intermediate device (the device between the source and destination devices). If the intermediate device is an H3C device, execute the ip ttl-expires enable command on the device. For more information about this command, see Layer 3—IP Services Command Reference.
· Enable sending of ICMP destination unreachable packets on the destination device. If the destination device is an H3C device, execute the ip unreachables enable command. For more information about this command, see Layer 3—IP Services Command Reference.
· If there is an MPLS network between the source and destination devices and you need to display the MPLS information during the tracert process, enable support for ICMP extensions on the source and intermediate devices. If the source and intermediate devises are H3C devices, execute the ip icmp-extensions compliant command on the devices. For more information about this command, see Layer 3—IP Services Command Reference.
For an IPv6 network:
· Enable sending of ICMPv6 timeout packets on the intermediate device (the device between the source and destination devices). If the intermediate device is an H3C device, execute the ipv6 hoplimit-expires enable command on the device. For more information about this command, see Layer 3—IP Services Command Reference.
· Enable sending of ICMPv6 destination unreachable packets on the destination device. If the destination device is an H3C device, execute the ipv6 unreachables enable command. For more information about this command, see Layer 3—IP Services Command Reference.
Tracert configuration
To configure tracert:
Task |
Command |
Remarks |
Display the routes from source to destination. |
· For an IPv4
network: ·
For an IPv4 network: |
Use either approach. Available in any view. |
|
NOTE: For more information about the tracert lsp command, see MPLS Command Reference. |
System debugging
Introduction to system debugging
The switch provides various debugging functions. For the majority of protocols and features supported, the system provides debugging information to help users diagnose errors.
The following two switches control the display of debugging information:
· Protocol debugging switch—Controls protocol-specific debugging information.
· Screen output switch—Controls whether to display the debugging information on a certain screen.
As Figure 3 illustrates, assume the device can provide debugging for the three modules 1, 2, and 3. The debugging information can be output on a terminal only when both the protocol debugging switch and the screen output switch are turned on.
Figure 3 The relationship between the protocol and screen output switch
Configuring system debugging
Administrators usually use the debugging commands to diagnose network failure. However, output of the debugging information may reduce system efficiency. Therefore, when debugging is completed, disable the debugging function that was used, or use the undo debugging all command to disable all debugging functions.
Output of debugging information depends on the configurations of the information center and the debugging commands of each protocol and functional module. Debugging information is commonly output to a terminal (including console or VTY) for display. You can also output debugging information to other destinations. For more information, see the chapter “Configuring the information center.”
To output debugging information to a terminal:
Step |
Command |
Remarks |
1. Enable the terminal monitoring of system information. |
terminal monitor |
Optional. The terminal monitoring on the console is enabled by default and that on the monitoring terminal is disabled by default. Available in user view. |
2. Enable the terminal display of debugging information. |
terminal debugging |
By default, the terminal display of debugging information is disabled. Available in user view. |
3. Enable debugging for a specified module. |
debugging { all [ timeout time ] | module-name [ option ] } |
By default, debugging for a specified module is disabled. Available in user view. |
4. Display the enabled debugging functions. |
display debugging [ interface interface-type interface-number ] [ module-name ] [ | { begin | exclude | include } regular-expression ] |
Optional. Available in any view. |
|
NOTE: You must configure the debugging, terminal debugging and terminal monitor commands before you can display the detailed debugging information on the terminal. For more information about the terminal debugging and terminal monitor commands, see Network Management and Monitoring Command Reference. |
Ping and tracert configuration example
|
NOTE: By default, Ethernet, VLAN, and aggregate interfaces are down. To configure such an interface, bring the interface up by executing the undo shutdown command. |
Network requirements
As shown in Figure 4, Device A failed to telnet Device C. Determine whether Device A and Device C can reach each other. If they cannot reach each other, locate the failed nodes in the network.
Configuration procedure
1. Use the ping command to display whether Device A and Device C can reach each other.
<DeviceA> ping 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 1.1.2.2 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
2. Device A and Device C cannot reach each other. Use the tracert command to determine failed nodes.
# Enable sending of ICMP timeout packets on Device B.
<DeviceB> system-view
[DeviceB] ip ttl-expires enable
# Enable sending of ICMP destination unreachable packets on Device C.
<DeviceC> system-view
[DeviceC] ip unreachables enable
# Locate the failed nodes on Device A.
<DeviceA> tracert 1.1.2.2
traceroute to 1.1.2.2(1.1.2.2) 30 hops max,40 bytes packet, press CTRL_C to break
1 1.1.1.2 14 ms 10 ms 20 ms
2 * * *
3 * * *
4 * * *
5
<DeviceA>
The output shows that Device A and Device C cannot reach other, Device A and Device B can reach each other, and an error occurred on the connection between Device B and Device C. Use the debugging ip icmp command to enable ICMP debugging on Device A and Device C to check whether the devices send or receive the specified ICMP packets, or use the display ip routing-table command to display whether Device A and Device C can reach each other.