5.8k views

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 links within each $\text{ISP}$ and across the two $\text{ISP}$s, are all point-to-point optical links. The initial value of the $\text{TTL}$ field is $32$. The maximum possible value of the $\text{TTL}$ field when $R$ receives the datagram is _______.

edited | 5.8k views
0
If original packet is encapsulated by some other stuff then also TTL value does not change.

Each time a packet visits  network layer it decrements it's TTL field. Source initializes it and others decreaments it. Inside LAN it never goes to network layer, it is forwarded from data link layer itself.. in routers it goes upto network layer to make a routing decision.. and the router decrements it because the packet has visited the network layer.. and at the receiver too, the packet has visited the network layer and network layer will do it's job and decrements the TTL value.

There are $5$ routers, So Network Layer will be visited $5$ times  and $1$ time on  destination

So, TTL $= 26$

PS:) A receiver decrements TTL value and then checks whether it is $0$ (or) not. So, $26$ is the answer (not $27$)

by Active (2k points)
edited by
+2

TTL expiration is intended to cause datagrams to be discarded by routers, but not by the destination host.

http://networkengineering.stackexchange.com/questions/10929/when-is-an-ipv4-ttl-decremented-and-what-is-the-drop-condition

http://searchnetworking.techtarget.com/definition/time-to-live

http://www.linfo.org/time-to-live.html

I did not get any source where it is mentioned that..

2.RECEIVER reject the packet due to TTL=0 (previously it was 1 before arriving at Receiver)

Plz give a reference for above.

+3
receiver accepts the packet even if TTL=0.
TTL expiration is intended to cause datagrams to be discarded by routers, but not by the destination host.
0
@sushmita  u mean if intial value of TTL=5 then final value of TTL become -1 ?
0
I have also never read that TTL is decremented by the receiver .Please provide some authenticated source to the same
0
no, the last router in the picture will discard the datagram as soon as TTL becomes 0.
0
but the question is that what is TTL when receiver receives the pkt , on receiving TTL is 27 then further operation will be done  isn't it?.
+2
NO,  BECAUSE THE RECEIVER WILL RECEIVE THE PACKET AFTER IT HAS PASSED THROUGH THE NETWORK LAYER AND ONCE IT PASSES THE NETWORK LAYER TTL, WILL BE DECREMENTED.
+1
Thanks..
+1
0

Any source for action on TTL by receiving host?? I doubt whether the receiver will decrement TTL or not.

Quoting from  RFC1812

1.

Note in particular that a router MUST NOT check the TTL of a packet except when forwarding it.

2.

TTL expiration is intended to cause datagrams to be discarded by routers, but not by the destination host.  Hosts that act as routers by forwarding datagrams must therefore follow the router's rules for TTL.

it mentions action on TTL only when hosts act as a router. nothing is specified on how receiving host should handle that value. any light on this, please?

0
first we have to decrement the TTL and then check >=0 at the receiver and >0 at the router
0
If at the receiver the TTL is 0 after decrement will the packet be discarded?
0
NO , but it will send ICMP message which says packet is recieved but some port error.
0
no thats what i wrote above >=0 after decrement  it will accept
0

Why port error if TTL is zero?

+1
there is no port error if ttl is 0 for the traceroute application the sender sends packets in such a way that TTL expires at every routers at the route so we can know thier IP address and finally how will it know that the destination is reached only by placing a dummy udp packet with invalid port number so it gets back an ICMP packet DESTINATION PORT UNREACHABLE so it can succesfully trace the route
0
this is what i call port error in informal way : dummy udp packet with invalid port number
0
people wont understand it in that short manner try to elaborate :)
0
@Venkat Sai
This is one particular case of TTL=0 at the receiver end and the sender has knowingly send wrong port number.

But can there be a case where TTL=0 and port number is valid?What happens in that case?Packet is successfully accepted by the receiver?
0
once the reciever receives the packet it decrements the value of TTL and checks if >=0 then it accepts in case of router decrements and checks >0 it forwards it else it discards it and sends an icmp to the sender
0

@rahul sharma

Yes, if the receiver receives a packet with TTL = 0, it accepts it.

If this receiver was to forward to the packet, it would have dropped the packet.

https://tools.ietf.org/html/rfc1812#section-4.2.2.9

0

Sumaiya23:- What do you mean by

:If this receiver was to forward to the packet, it would have dropped the packet.

0
Hosts that act as routers by forwarding datagrams must therefore follow the router's rules for TTL.

0
Any source that TTL will also be decremented by receiving host?
+6

TTL is decremented by the receiving host as well.

Following is a snip of how traceroute works from forouzan 4ed

+5

See if this is correct

@router first TTL values is decremented and then check TTL > 0 if yes forward... If it is zero means packet cant take further hops(as TTL ==> No of hops packet can take) and it is still not at destination hence discard.

@reciever as first TTL value is decremented and checked TTL >=0  if yes accept

At router or destination we will never have TTL = negative

since earlier router would have got TTL = 0 before and discarded it.

0
Correct.
0
Does only Network layer decrements TTL? What about DLL and PL ?
0
Tracer route trick is a good MCQ question.
0

@jatin khachane 1

It means once if packet comes to the reciever it wontw be discarded because of TTL value

TTL field reduced at each router, there are total 5 routers and finally at receiver.

=32 -(5+1)=26
by Loyal (5.9k points)
TTL only decrement at router and at dstination.It is very very important to keep under your mind untill exam finish.

So Total router=5

Destintion=1

Intial TTL value=32

by Loyal (10k points)
ans 22
by Loyal (5.2k points)
0

http://gate.iitk.ac.in/GATE2015/docs/KEYS2014/CS02_2014.pdf
0
It's the routers that decrements TTL field right?? And diagram there are 5 routers...

So it should be 32 - 5 = 27?? how it got decrement by 6?? from where one extra coming??
+10
Before accepting the packet, receiver also decreases the TTL value & accepts the packet if TTL >= 0.

In this case, 5 is decrement by 5 routers and 1 is decrement by the receiver. So, total of 6.

Therefore, 32-6 = 26
+16
ok..ok got.. each time a packet visit a network layer it decrements it's TTL field.. source initializes it and others decreaments it.. inside LAN it never goes to network layer, it is forwarded from data link layer itself.. in routers it goes upto network layer to make a routing decision.. and the router decrements it because the packet has visited the network layer.. and at the receiver too the packet has visited the network layer and network layer will do it's job and decrements the TTL value and checks whether it has reached zero, and the router blindly discards it if it reached zero doesn't matter this packet belongs to the receiver itself..!!
0
correctly said :-)
0
When R receives packet then TTL = 27,and it decrements it to make 26. Shouldn't 27 be answer??
0

@Vicky

TTL expiration is intended to cause datagrams to be discarded by routers, but not by the destination host.

http://networkengineering.stackexchange.com/questions/10929/when-is-an-ipv4-ttl-decremented-and-what-is-the-drop-condition

http://searchnetworking.techtarget.com/definition/time-to-live

http://www.linfo.org/time-to-live.html

I did not get any source where it is mentioned that..