in Computer Networks retagged by
10,212 views
15 votes
15 votes

Consider two hosts $P$ and $Q$ connected through a router $R$. The maximum transfer unit $\text{(MTU)}$ value of the link between $P$ and $R$ is $1500$ bytes, and between $R$ and $Q$ is $820$ bytes.

A $\text{TCP}$ segment of size $1400$ bytes was transferred from $P$ to $Q$ through $R$, with $\text{IP}$ identification value as $\textsf{0x1234}.$ Assume that the $\text{IP}$ header size is $20$ bytes. Further, the packet is allowed to be fragmented, i.e., $\textsf{Don’t Fragment (DF)}$ flag in the $\text{IP}$ header is $\textit{not}$ set by $P$.

Which of the following statements is/are correct?

  1. Two fragments are created at $R$ and the $\text{IP}$ datagram size carrying the second fragment is $620$ bytes.
  2. If the second fragment is lost, $R$ will resend the fragment with the $\text{IP}$ identification value $\textsf{0x1234}.$
  3. If the second fragment is lost, $P$ is required to resend the whole $\text{TCP}$ segment.
  4. $\text{TCP}$ destination port can be determined by analysing $\textit{only}$ the second fragment.
in Computer Networks retagged by
by
10.2k views

4 Comments

@SagarGateoverflow As it's not mentioned $explicitly$ about TCP Header, we don't need to consider it. Whereas, IP Header is $explicitly$ mentioned. So we need to consider only the IP Header. Hence Datagram size becomes = $1400+20 = 1420B$ at $P$.
1
1

@SagarGateoverflow bro in IP the datagram is devided into fragment 

datagram = tcp segmet + Ip header

segment = msg (payload )+ tcp header 

here tcp segment size is given here so here we not need to minus the ip header size if datagram size = 1400 B given in this question then the fragmented datagram size would be 600 Byte

0
0

Look into the best answer

the sender has no way of knowing what kind of fragmentation occurred,

 

i think this line should be replaced  with this 

the reciever  has no way of knowing what kind of fragmentation occurred, 

 

if i am wrong please correct me and explain this option c ? 

0
0

4 Answers

17 votes
17 votes
Best answer

A is correct as you can follow the process of IPv4 fragmentation and you will get $620B$ fragments as described in the statement.

C is correct as fragmentation happened at the router and the sender has no way of knowing what kind of fragmentation occurred, so it will resend the whole TCP segment.

For B to be true, the original sender must retransmit the packet data in a datagram with the same IPv4 ID field as before, i.e. $0X1234$. Take a look at RFC 1122 to see what they say about retransmitting with the same ID field (text below).

First of all, it says that retaining the ID field is optional. Secondly, it says that due to certain constraints, this is not practical, and therefore not believed to be useful (so it does not really happen in practice).

B’s statement implies that the router will definitely resend a fragment with $0X1234$ ID, which can only happen if the sender resends the whole segment with the same ID number, but there is no such guarantee. Therefore B is false.

When sending an identical copy of an earlier datagram, a
host MAY optionally retain the same Identification field in
the copy.
Some Internet protocol experts have maintained that
when a host sends an identical copy of an earlier
datagram, the new copy should contain the same
Identification value as the original.  There are two
suggested advantages:  (1) if the datagrams are
fragmented and some of the fragments are lost, the
receiver may be able to reconstruct a complete datagram
from fragments of the original and the copies; (2) a
congested gateway might use the IP Identification field
(and Fragment Offset) to discard duplicate datagrams
from the queue.

However, the observed patterns of datagram loss in the
Internet do not favor the probability of retransmitted
fragments filling reassembly gaps, while other
mechanisms (e.g., TCP repacketizing upon
retransmission) tend to prevent retransmission of an
identical datagram [IP:9].  Therefore, we believe that
retransmitting the same Identification field is not
useful.

 

selected by

4 Comments

In option A the datagram fragment size should be 640 na instead of 620 . Because datagram consist of header also . Please correct me .
0
0
What will be the answer if inn option D . They have said "TCP destination port can be recognized by only first fragment" . OR "TCP destination port can be recognized by all fragment ".
0
0
Destination MTU = 820 =  800B of data + 20B header

So, packet's payload division (total = 1400) = 800B in 1st fragment + 600 in 2nd fragment

Actual packet sizes = 820B + 620B
1
1
12 votes
12 votes

A,C is the correct answer.

D is incorrect because, when reassembly is done at Receiver, both fragments become a single TCP segment. based on that, destination port is found.

And, ID number gets changed on retransmission as the frame is lost, it is connection oriented. 

I hope my explanation helps.

Thanks.

1 comment

edited by

why have u taken the total data as 1420 B on the senders side??? … as it is clearly given in the question that the data at the sender side is 1400 B and the ip header is 20B so we have to break down 1400 B into 1380B + 20B header before transmitting it to the R and now as we have already splitted data then at R there is no need to split the data again .. so we will pass  it as  800B+20B in first fragment and 580B+20B in second fragment  so this way the size of the second fragment will become 600 B and not 620B…

anything wrong with my reasoning??

EDIT : I understood my mistake !

0
0
9 votes
9 votes

Answer: A,C

Option A) At $P$, datagram size is : $1400+20(IP header)$ = $1420B$, with identification number $0x1234$

When it passes through router $R$, since the MTU of $R-Q$ is $820B$, the datagram needs fragmentation at Router $R$.

First fragment : $800B$ (data) + $20B$ (IP Header) with identification number $0x1234$.

Second fragment :  $600B$ (data) + $20B$ (IP Header) with identification number $0x1234$. Hence Option A is True. 

Option B) When a fragment is lost, router doesn't resend the same fragment again, that too with same Identification Number. The whole TCP segment needs to be resent again and again fragmentation happens at router $R$. The Identification number may or may not be same as $0x1234$. 

When sending an identical copy of an earlier datagram, a
host MAY optionally retain the same Identification field in
the copy.

Source: RFC 1122

This makes Option B False and Option C True.  

Option D) Destination Port is a $16 bits$ number, just after the first $16 bits$ of Source Port number.  It is included in TCP header of every segment. During reassembly, which happens at the destination,  the TCP destination port be determined by analyzing any of the fragments and not only the second fragment. Hence Option D is False.

 

 

edited by

1 comment

Nice
1
1
0 votes
0 votes

According to me, the answer is option A, C and D

A- because of fragmentation

C because P doesn’t know anything about fragmentation so will re-transmit the whole segment.

D because when the segments gets fragmented, the fragments also contain the TCP header info. In the TCP header there is information about the destination and source port number. Hence the port number can be derieved from the second fragment.

 

Please correct me   @  @Bikram sir

 

edited by

1 comment

The option is saying that destination port can only be determined by second fragment

Not true can be found from any fragment

1
1
Answer:

Related questions