Ping and tracert example

Network requirements

As shown in Figure 4, Device A failed to Telnet to 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.

Figure 4: Network diagram

Test procedure

  1. Use the ping command to test connectivity between Device A and Device C.

    <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. The output shows that Device A and Device C cannot reach each other.

  3. Use the tracert command to identify failed nodes:

  4. # Enable sending of ICMP timeout packets on Device B.

    <DeviceB> system-view
    [DeviceB] ip ttl-expires enable
    
  5. # Enable sending of ICMP destination unreachable packets on Device C.

    <DeviceC> system-view
    [DeviceC] ip unreachables enable
    
  6. # Execute the tracert command 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, that Device A and Device B can reach each other, and that an error occurred on the connection between Device B and Device C.

  7. Use the debugging ip icmp command on Device A and Device C to verify that they can send and receive the specific ICMP packets, or use the display ip routing-table command to verify the availability of active routes between Device A and Device C.