Jump to content

Computer Networks/Ping/TTL

From Wikiversity

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

[edit | edit source]

To prepare for this activity:

  1. Start Windows.
  2. Log in if necessary.

Activity 1 - Ping with a Custom TTL

[edit | edit source]

To ping with a custom TTL:

  1. Open a command prompt.
  2. 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.
  3. Observe the results. The ping request should be successful.
  4. Type ping -i 1 8.8.8.8 and press Enter.
  5. 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.
  6. Type ping -i 2 8.8.8.8 and press Enter.
  7. 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.
  8. Close the command prompt to complete this activity.

Readings

[edit | edit source]

References

[edit | edit source]