[Contents] [Prev] [Next] [Index] [Report an Error]


Step 1: Use Loopback Addresses

Purpose

You can ping one router from another router by specifying the other router's loopback address as the IP address in the ping and traceroute commands. In this step, R6 and R5 both ping and traceroute each other.

Action

To ping and traceroute between R5 and R6, enter the following JUNOS command-line interface (CLI) operational mode commands:

user@host> ping remote-host count requests
user@host> traceroute remote-host

Sample Output

The following sample output is from R6 to R5, as shown in the network topology in Figure 17:

user@R6> ping 10.0.0.5 count 3 
PING 10.0.0.6 (10.0.0.6): 56 data bytes
64 bytes from 10.0.0.6: icmp_seq=0 ttl=255 time=0.298 ms
64 bytes from 10.0.0.6: icmp_seq=1 ttl=255 time=0.237 ms
64 bytes from 10.0.0.6: icmp_seq=2 ttl=255 time=0.273 ms

--- 10.0.0.6 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.237/0.269/0.298/0.025 ms

user@R6> traceroute 10.0.0.5 
traceroute to 10.0.0.5 (10.0.0.5), 30 hops max, 40 byte packets
 1  10.1.26.1 (10.1.26.1)  0.626 ms  0.530 ms  0.489 ms
 2  10.1.12.1 (10.1.12.1)  0.546 ms  0.534 ms  0.507 ms
 3  10.0.0.5 (10.0.0.5)  0.749 ms  0.694 ms  0.686 ms

user@R5> ping 10.0.0.6 count 3 
PING 10.0.0.6 (10.0.0.6): 56 data bytes
64 bytes from 10.0.0.6: icmp_seq=0 ttl=253 time=0.875 ms
64 bytes from 10.0.0.6: icmp_seq=1 ttl=253 time=0.815 ms
64 bytes from 10.0.0.6: icmp_seq=2 ttl=253 time=0.819 ms

--- 10.0.0.6 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.815/0.836/0.875/0.027 ms

user@R5> traceroute 10.0.0.6 
traceroute to 10.0.0.6 (10.0.0.6), 30 hops max, 40 byte packets
 1  10.1.15.1 (10.1.15.1)  0.635 ms  39.951 ms  0.526 ms
 2  10.1.12.2 (10.1.12.2)  0.555 ms  0.535 ms  0.515 ms
 3  10.0.0.6 (10.0.0.6)  0.769 ms  0.720 ms  0.674 ms

What It Means

The sample output shows a successful ping and traceroute between the R6 and R5 loopback (lo0) addresses. The ping is successful because the loopback addresses of both routers are advertised to their directly connected neighbors.

The output for the traceroute command shows the path from R6 to R5, which is through R2.

NOTE: A ping command might lose packets due to rate limiting of Internet Message Control Protocol (ICMP) packets on the specified host.



[Contents] [Prev] [Next] [Index] [Report an Error]