GeeksforGeeks App
Open App
Browser
Continue

# GATE | GATE-CS-2014-(Set-2) | Question 35

In the diagram shown below L1 is an Ethernet LAN and L2 is a Token-Ring LAN. An IP packet originates from sender S and traverses to R, as shown. The link within each ISP, and across two ISPs, are all point to point optical links. The initial value of TTL is 32. The maximum possible value of TTL field when R receives the datagram is

(A) 25
(B) 24
(C) 26
(D) 28

Explanation: TTL(Time to Live) – It is a mechanism that limits the lifespan of a packet in a computer network. It is implemented with the help of a counter or timestamp which is set by the sender of the packet and embedded in the packet itself. It represents the maximum lifetime of a packet in the network. When a packet routes through a network, each router checks the current value of its TTL, if the TTL value is not zero then only the router accepts the packet, and decrements its value by 1. This process takes place at every router. If some router founds the TTL value of the incoming packet to be 0, then it simply discards/destroys the packet ( because the lifetime of the packet is over, and hence the packet is not eligible to be in the network ).

One of the main purposes of setting the TTL value and doing all this process is to ensure that there is no undelivered packet in the network which is circulating indefinitely, and to avoid the problem of duplicate delivery of the same packet, which may arise in the case of network congestion.

Now, routing decisions are taken place at the network layer. hence we have to see in the above question that when the packet is going through the network layer.

LANs work at Data Link Layer only, hence the packet doesn’t reach network layer in LANs.

So in the question above, Except LANs, at all other points routing decisions have to be taken. Hence TTL value will be checked and manipulated at those points/routers.

At Receiver end also, the packet has to go through the network layer so as to reach to application layer, hence Receiver will also check and decrement the TTL value.

So there are 6 routers in the above diagram. Initially TTL value was 32, so at the Receiver it will become 32 – 6 = 26.

My Personal Notes arrow_drop_up