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
pingandtraceroutecommands. In this step,R6andR5both ping and traceroute each other.Action
To ping and traceroute between
R5andR6, enter the following JUNOS command-line interface (CLI) operational mode commands:user@host>pingremote-hostcountrequestsuser@host>tracerouteremote-hostSample Output
The following sample output is from
R6toR5, as shown in the network topology in Figure 17:user@R6>ping 10.0.0.5 count 3PING 10.0.0.6 (10.0.0.6): 56 data bytes64 bytes from 10.0.0.6: icmp_seq=0 ttl=255 time=0.298 ms64 bytes from 10.0.0.6: icmp_seq=1 ttl=255 time=0.237 ms64 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 lossround-trip min/avg/max/stddev = 0.237/0.269/0.298/0.025 msuser@R6>traceroute 10.0.0.5traceroute to 10.0.0.5 (10.0.0.5), 30 hops max, 40 byte packets1 10.1.26.1 (10.1.26.1) 0.626 ms 0.530 ms 0.489 ms2 10.1.12.1 (10.1.12.1) 0.546 ms 0.534 ms 0.507 ms3 10.0.0.5 (10.0.0.5) 0.749 ms 0.694 ms 0.686 msuser@R5>ping 10.0.0.6 count 3PING 10.0.0.6 (10.0.0.6): 56 data bytes64 bytes from 10.0.0.6: icmp_seq=0 ttl=253 time=0.875 ms64 bytes from 10.0.0.6: icmp_seq=1 ttl=253 time=0.815 ms64 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 lossround-trip min/avg/max/stddev = 0.815/0.836/0.875/0.027 msuser@R5>traceroute 10.0.0.6traceroute to 10.0.0.6 (10.0.0.6), 30 hops max, 40 byte packets1 10.1.15.1 (10.1.15.1) 0.635 ms 39.951 ms 0.526 ms2 10.1.12.2 (10.1.12.2) 0.555 ms 0.535 ms 0.515 ms3 10.0.0.6 (10.0.0.6) 0.769 ms 0.720 ms 0.674 msWhat It Means
The sample output shows a successful ping and traceroute between the
R6andR5loopback (lo0) addresses. The ping is successful because the loopback addresses of both routers are advertised to their directly connected neighbors.The output for the
traceroutecommand shows the path fromR6toR5, which is throughR2.
NOTE: A
pingcommand might lose packets due to rate limiting of Internet Message Control Protocol (ICMP) packets on the specified host.