Computer Networks/Ping/TTL
The ping command has an option to configure the Time To Live (TTL) of the packet to be transmitted. These activities will show you how to use the ping command with a custom TTL.
Preparation
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
Activity 1 - Ping with a Custom TTL
editTo ping with a custom TTL:
- Open a command prompt.
- Type ping 8.8.8.8 and press Enter. 8.8.8.8 is the IPv4 address of one of Google's public DNS servers.
- Observe the results. The ping request should be successful.
- Type ping -i 1 8.8.8.8 and press Enter.
- Observe the results. The ping request should fail with TTL expired in transit. The response should also indicate the IP address of the router where the TTL expired.
- Type ping -i 2 8.8.8.8 and press Enter.
- Observe the results. Then repeat the ping command, each time increasing the TTL (-i) parameter by one until the ping is successful again. The first TTL count which results in success indicates the number of routers or "hops" between your computer and Google's public DNS server.
- Close the command prompt to complete this activity.