11.3.2.3 Lab - Testing Network Latency With Ping and Traceroute
11.3.2.3 Lab - Testing Network Latency With Ping and Traceroute
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.
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
1 PC (Windows 7 or 8 with Internet access)
© 2021 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 5
Lab - Testing Network Latency with Ping and Traceroute
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 Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only. This setting has been deprecated
<output omitted>
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.
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
© 2021 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 5
Lab - Testing Network Latency with Ping and Traceroute
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
© 2021 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 5
Lab - Testing Network Latency with Ping and Traceroute
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> tracert www.arin.net > traceroute_arin.txt
C:\Users\User1> tracert www.lacnic.net > traceroute_lacnic.txt
C:\Users\User1> tracert www.afrinic.net > traceroute_afrinic.txt
C:\Users\User1> tracert 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.
Trace complete.
In this example, it took less than 1 ms to receive a reply from the default gateway (192.168.1.1). In hop
count 6, the round trip to 68.1.1.7 took an average of 71 ms. For the round trip to the final destination at
www.arin.net took an average of 72 ms.
Between lines 5 and 6, there is more network delay as indicated by the round trip time increase from an
average of 11 ms to 71 ms
© 2021 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 5
Lab - Testing Network Latency with Ping and Traceroute
b. Perform the same analysis with the rest of the tracert results.
What can you conclude regarding the relationship between the roundtrip time and geographical location?
If the location is further away it will take longer for a response
Reflection
1. The tracert and ping results can provide important network latency information. What do you need to do if
you want an accurate baseline picture regarding network latency for your network?
For a better average measure data over a prolonged period, checking the ping everyday and comparing daily
averages can help measure network latency
2. How can you use the baseline information?
Use baseline information to formulate baseline data
© 2021 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 5