Lab - Testing Network Latency with Ping and Traceroute (Instructor Version) Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only Topology Objectives Part 1: Use Ping to Document Network Latency Part 2: Use Traceroute to Document Network Latency Background / Scenario To obtain realistic network latency statistics, this activity must be performed on a live network Be sure to check with your instructor for any local security restrictions against using the ping command on the network Instructor Note: Some institutions disable ICMP echo replies throughout the network Before students begin this activity, make sure there are no local restrictions related to ICMP datagrams This activity assumes that ICMP datagrams are not restricted by any local security policy The purpose of this lab is to measure and evaluate network latency over time, and during different periods of the day to capture a representative sample of typical network activity This will be accomplished by analyzing the return delay from a distant computer with the ping command Return delay times, measured in milliseconds, will be summarized by computing the average latency (mean) and the range (maximum and minimum) of the delay times Required Resources PC (Windows or with Internet access) Part 1: Use Ping to Document Network Latency In Part 1, you will examine network latency of several websites in different parts of the globe This process can be used in an enterprise production network to create a performance baseline Step 1: Verify connectivity Ping the following Regional Internet Registry (RIR) websites to verify connectivity: C:\Users\User1> C:\Users\User1> C:\Users\User1> C:\Users\User1> ping ping ping ping www.arin.net www.lacnic.net www.afrinic.net www.apnic.net Note: Because www.ripe.net does not reply to ICMP requests, it cannot be used for this lab © 2017 Cisco and/or its affiliates All rights reserved This document is Cisco Public Page of Lab - Testing Network Latency with Ping and Traceroute Note: If the websites are resolved to IPv6 addresses, the option -4 can be used to resolve to IPv4 addresses if desired The command becomes ping -4 www.arin.net Step 2: Collect network data You will collect a sufficient amount of data to compute statistics on the ping output by sending out 25 echo requests to each address listed in Step Record the results for each website to text files a At the command prompt, type ping to list the available options C:\Users\User1> ping Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name Options: -t -a -n count -l size -f -i TTL -v TOS Ping the specified host until stopped To see statistics and continue - type Control-Break; To stop - type Control-C Resolve addresses to hostnames Number of echo requests to send Send buffer size Set Don't Fragment flag in packet (IPv4-only) Time To Live Type Of Service (IPv4-only This setting has been deprecated b Using the ping command with the count option, you can send 25 echo requests to the destination as illustrated below Furthermore, it will create a text file with filename of arin.txt in the current directory This text file will contain the results of the echo requests C:\Users\User1> ping –n 25 www.arin.net > arin.txt Note: The terminal remains blank until the command has finished, because the output has been redirected to a text file, arin.txt, in this example The > symbol is used to redirect the screen output to the file and overwrite the file if it already exists If appending more results to the file is desired, replace > with >> in the command c Repeat the ping command for the other websites © 2017 Cisco and/or its affiliates All rights reserved This document is Cisco Public Page of Lab - Testing Network Latency with Ping and Traceroute C:\Users\User1> ping –n 25 www.afrinic.net > afrinic.txt C:\Users\User1> ping –n 25 www.apnic.net > apnic.txt C:\Users\User1> ping –n 25 www.lacnic.net > lacnic.txt Step 3: Verify data collection To see the results in the file created, use the more command at the command prompt C:\Users\User1> more arin.txt Pinging www.arin.net [192.149.252.76] with 32 bytes of data: Reply from 192.149.252.76: bytes=32 time=108ms TTL=45 Reply from 192.149.252.76: bytes=32 time=114ms TTL=45 Reply from 192.149.252.76: bytes=32 time=112ms TTL=45 Reply from 192.149.252.75: bytes=32 time=111ms TTL=45 Reply from 192.149.252.75: bytes=32 time=112ms TTL=45 Reply from 192.149.252.75: bytes=32 time=112ms TTL=45 Ping statistics for 192.149.252.75: Packets: Sent = 25, Received = 25, Lost = (0% loss), Approximate round trip times in milli-seconds: Minimum = 107ms, Maximum = 121ms, Average = 111ms Note: Press the Spacebar to display the rest of the file or press q to exit To verify that the files have been created, use the dir command to list the files in the directory Also the wildcard * can be used to filter only the text files C:\Users\User1> dir *.txt Volume in drive C is OS Volume Serial Number is 0A97-D265 Directory of C:\Users\User1 02/07/2013 02/07/2013 02/07/2013 02/07/2013 12:59 PM 1,642 afrinic.txt 01:00 PM 1,615 apnic.txt 12:40 PM 1,641 arin.txt 12:58 PM 1,589 lacnic.txt File(s) 6,487 bytes Dir(s) 34,391,453,696 bytes free Record your results in the following table Minimum Maximum Average www.afrinic.net 359 ms 389 ms 369 ms www.apnic.net 201 210 204 www.arin.net 107 121 112 www.lacnic.net 216 226 218 Compare the delay results How is delay affected by geographical location? © 2017 Cisco and/or its affiliates All rights reserved This document is Cisco Public Page of Lab - Testing Network Latency with Ping and Traceroute In most instances, the response time is longer when compared to the physical distance to the destination Part 2: Use Traceroute to Document Network Latency The routes traced may go through many hops and a number of different ISPs depending on the size of the ISPs and the location of the source and destination hosts The traceroute commands can also be used to observe network latency In Part 2, the tracert command is used to trace the path to the same destinations in Part The command tracert is the Windows version of the traceroute command The tracert command uses ICMP TTL Exceed packets and ICMP echo replies to trace the path Step 1: Use the tracert command and record the output to text files Copy the following commands to create the traceroute files: C:\Users\User1> C:\Users\User1> C:\Users\User1> C:\Users\User1> tracert tracert tracert tracert www.arin.net > traceroute_arin.txt www.lacnic.net > traceroute_lacnic.txt www.afrinic.net > traceroute_afrinic.txt www.apnic.net > traceroute_apnic.txt Note: If the websites are resolved to IPv6 addresses, the option -4 can be used to resolve to IPv4 addresses if desired The command becomes tracert -4 www.arin.net > traceroute_arin.txt Step 2: Use the more command to examine the traced path a Use the more command to access the content of these files: C:\Users\User1> more traceroute_arin.txt Tracing route to www.arin.net [192.149.252.75] over a maximum of 30 hops: 10 11 12 C:\Users\User1> tracert tracert tracert tracert –d –d –d –d www.arin.net > traceroute_d_arin.txt www.lacnic.net > traceroute_d_lacnic.txt www.afrinic.net > traceroute_d_afrinic.txt www.apnic.net > traceroute_d_apnic.txt b Use the more command to access the content of these files: C:\Users\User1> more traceroute_d_arin.txt Tracing route to www.arin.net [192.149.252.75] over a maximum of 30 hops: 10 11 12