Skip to content
Related Articles
Open in App
Not now

Related Articles

Difference between Round trip time (RTT) and Time to live (TTL)

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 03 Aug, 2022
Improve Article
Save Article

1. Round Trip Time (RTT) :
The length of time taken by a data packet to be sent to a destination including the time it takes for an acknowledgement of that packet to be received back at the origin place.

image showing RTT

2. Time to live (TTL) :
The lifespan or life time of data that is being sent. Once after that specified time is over or elapsed the data will be discarded.
or it can also stated as number of hops that packet is set to exist in the network after which that packet is discarded. The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating in network.

Difference between Round trip time and Time to live :


Round trip time                                                                                                                                                                                                                                          

Time to live                                                                                                                                                                                                                                                                                    

1Also known as ping time.Also known as hop limit.
2Gives the total time taken to send data packet and to get an acknowledgment back from the destination.Gives the hop limit to travel in the network path. after that limit the packet will be discarded.
3It is an important for determining the connection on a local network or the larger Internet network, and used to diagnose the speed and reliability of network connections.Helps us to prevent the data packet from circulating indefinitely in the routers path.                                                                                                                                  
4The round trip time is not stored anywhere, it will be calculated when the acknowledgement comes from destination.It is an 8-bit field stored in IP header.                                
5It can be any value, because it depends on many factors.Maximum value that can be set to TTL is 255 since its the maximum value that we can produce with 8-bits.
6It depends on many factors like distance, no. of hops, server response time etc.It depends on system, It is set initially by the system which is sending the packet.
7RTT is measured in milliseconds.TTL is measured in seconds.

How to find RTT and TTL ?

Example 1. pinging

We can find RTT and TTL using ping command. Open you terminal or command prompt and type the below command to see the RTT and TTL to


You will see the screen similar to this.

Each line starting with word reply is reply from the server to client for the packet sent, In the above example we got 4 replies which means that we sent 4 packets.
The values marked with red box is RTT ( Round trip time) which is shown in milliseconds since it’s measured in milliseconds
and the values marked with blue box is TTL ( Time to live) measured in seconds.

So average RTT for above ping is (230+231+236+230) / 4 = 231.75 ms
The TTL above ping is 235 seconds or 235 hops

Example 2. pinging

Pinging with the help of below command 


After running the above command you will see screen similar to this


So average RTT for above ping is (48+62+56+44) / 4 = 52.5 ms
The TTL above ping is 114 seconds or 114 hops.


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!