The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+19 votes
3.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 _______.

asked in Computer Networks by Veteran (103k points)
edited by | 3.8k views
0
If original packet is encapsulated by some other stuff then also TTL value does not change.

4 Answers

+47 votes
Best answer

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$)

answered by Active (2.1k points)
edited by
+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?
0

TTL is decremented by the receiving host as well.

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

 

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

=32 -(5+1)=26
answered by Loyal (6.1k points)
+12 votes
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

When Packet reaches the receiver=32-(5+1)=26
answered by Loyal (9k points)
–5 votes
ans 22
answered by Loyal (5.2k points)
0
Answer as per official Answer Key is 26

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??
+9
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
+13
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..

1.RECEIVER also decrease TTL.(1st link is against this statement.)

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

Plz give a reference for above.

Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

41,063 questions
47,662 answers
147,318 comments
62,381 users