17.4.6 Lab - Test Network Latency with Ping and Traceroute
Network Latency Measurement Lab
Introduction to Network Latency Testing
- The lab focuses on measuring network latency using ping and traceroute commands, requiring a live network setup with a PC connected to a router and the internet.
- The goal is to gather data on network latency over time and during various periods of the day for accurate representation.
Tools and Resources
- Participants will use their PCs to document network latency by pinging several websites across different global regions.
- Specific regional Internet registry (RIR) websites are suggested for testing connectivity:
lagnik.netfor Latin America
afrinic.netfor Africa
apnic.netfor Asia Pacific
Executing Ping Commands
- Users can choose between IPv4 or IPv6 addresses when executing ping commands. Option 4 allows resolution to IPv4 if needed.
- To collect sufficient data, participants should send out 25 echo requests per website, which may require administrative privileges depending on the operating system.
Data Collection Process
- The command syntax includes an option (
-n) to specify the number of echo requests; by default, it sends four but can be modified.
- Results from each ping command are redirected into text files using the greater than symbol (
>), which overrides existing files unless specified otherwise.
Analyzing Results
- After executing commands, users navigate to their directories to view results stored in text files.
- Example statistics include minimum, maximum, and average response times measured in milliseconds from multiple pings.
Comparative Analysis of Latency
- Users compare delay results based on geographical locations. For instance:
- Average latency from Latin America to
lagnik.netis approximately 408 milliseconds.
- Latency increases significantly when pinging African servers (
afrinic.net) at around 582 milliseconds due to distance.
Conclusion of Findings
Understanding Network Latency and Traceroute Commands
The Relationship Between Geographic Distance and Response Time
- The response time is longer when compared to the physical distance to the destination, indicating that greater geographic distance causes more delay.
Using Traceroute for Network Analysis
- The traceroute command traces the path data takes through various hubs and internet service providers, which can help observe network latency. It provides insights into how many hops are involved in reaching a destination.
- In Windows, the
tracertcommand serves as an equivalent to traceroute, utilizing ICMP packets to trace paths. Output can be recorded in text files for further analysis.
Analyzing Traceroute Results
- After executing a traceroute command, users can see multiple hops (e.g., 16 hops) indicating routers along the path to the destination server. Each hop's details include IP addresses and potential delays experienced at each stage.
- Users should calculate average ping times from multiple attempts to understand latency better; for example, averaging three pings gives a clearer picture of response times at specific hops.
Advanced Traceroute Options
- Adding options like
-dprevents resolution of IP addresses to hostnames during traceroutes, which may yield different results compared to standard commands that resolve names. This option helps focus on raw IP data without additional processing delays.
- Comparing outputs with and without certain options reveals differences in information provided by traceroutes—specifically regarding hostname resolution versus direct IP addressing.
Importance of Baseline Data in Network Latency Analysis
- To establish an accurate baseline for network latency, it is essential to perform detailed delay analyses over successive days and at different times of day. This allows for effective comparisons against current data trends.