in Computer Networks edited by
19,476 views
51 votes
51 votes

A TCP message consisting of $2100$  $bytes$ is passed to IP for delivery across two networks. The first network can carry a maximum payload of $1200$ $bytes$ per frame and the second network can carry a maximum payload of $400$ $bytes$ per frame, excluding network overhead. Assume that IP overhead per packet is $20$ $bytes$. What is the total IP overhead in the second network for this transmission?

  1. $\text{40 bytes}$
  2. $\text{80 bytes}$
  3. $\text{120 bytes}$
  4. $\text{160 bytes}$
in Computer Networks edited by
19.5k views

4 Comments

Here shouldn’t be the total overhead  is 100 B.-

See We have to send 2120 B (2100 B of data + 20 B of IP Header) but actually we are sending 6*20=120 B IP Header + 2100 B data so total we are sending (2100+120) = 2220 B.

So, Total overhead = (2220 – 2120) = 100 B.

Plz help...
0
0
SammanV your question is not clear to me, maybe you are asking how the overhead is not adding up to the answer provided here? if that's the case:

Total overhead will always be: 2220 – 2100 (Size of total packets in the end – total payload)
You are also including the header in the payload, that's why it is not adding up.
Remember, during fragmentation, we are discarding the header of the overall packet as new fragments will have “their” own header, which will be used for “their” identification, hence we don't need the parent info.
0
0
Noice question
0
0

6 Answers

74 votes
74 votes
Best answer

At source : TCP passes $2100B$ to IP layer. IP appends $20$B header and sends it to DLL and so on. ( We are interested in IP overhead, So lets consider DLL header to be negligible)

A router on the way has highest layer as Network Layer, So, complete TCP segment is fragmented. And in question $1200$ and $400$ are given as maximum payload without network overhead, means we are directly given the amount of data part of IP datagram a Frame can hold. [1200 doesn't contain IP header]

Router-1: $2120$B reach $R_1's$ network layer. It removes original IP header, fragments data part at IP and then appends IP header to all fragments and forwards. So, it divides $2100$ Bytes into two fragments of  size $1200$ and $900$.And  Both fragments are sent to $R_2$.

Router-2: Both fragments that reach $R_2$ exceed MTU at $R_2$. So, both are fragmented. First packet of $1200$B is fragmented into $3$ packets of $400$, $400$ and  $400$ Bytes respectively and Second packet of $900$B is fragmented into three fragments of $400$, $400$ and $100$ Bytes respectively.

Original data during fragmentation should not change. Only additional IP headers are added. So totally $6\;packets$ reach destination. And IP header is also an overhead because our main aim is to send data only.

Total IP Overhead $ = 6*20 = 120$B 

Hence, (C) is correct answer.



http://quiz.geeksforgeeks.org/gate-gate-it-2004-question-87/

edited by

4 Comments

will the overhead will be only 100bytes or 120 bytes?

If no fragmentation is done the ip header will be there of 20bytes.

if there is fragmentation instead of 1 there will be 6 packets at the destination

should the overhead be 5*20 = 100?
1
1
Wonderfully explained.thanks
0
0

what payload exactly is?

refer this link ==> https://www.geeksforgeeks.org/payload-in-computer-networks/

0
0
33 votes
33 votes

Maximum Payload of  1200 B per frame is given ,i.e , as the above picture says Payload = MSS, hence, it is different from packet size.

Answer is C). 

Question says TCP message is of size = 2100 B, hence header is encapsulated with the frame and send to IP layer, and IP layer when receives this message thinks it as complete data to be send .

To be send across the first network, It is fragmented into 2 payloads of sizes 1200 and 900 .

No need to add IP Header size with 2100B, as fragmentation acts on data/Payload and not the packet.

Now, since, IP thinks 2100B as the data so, it will directly fragment it and hence, no need to add any header.

Payload / Fragment 1: 1200 B  {1200 / 8 = 150, Except last fragment all the fragments should be divisible by 8}

Payload 2: 900 B

At the second network, 1200 B is fragmented into 400 B,400 B and 400 B .

Similarly, 900 B is fragmented into 400, 400 and 100 B.

Since, 2100 B is fragmented into 6 data payloads and Header is attached to all the payloads when they will be forwared to DLL layer. So, Total Overhead = 6 * 20 = 120 B


Hence, DLL layer will receive total Data = 2100 + 120 = 2220 B and DLL will treat it as a complete data to be sent and DLL header will be encapsulated in DLL frame.

edited by

16 Comments

why do we have to make it a multiple of 8 ?
0
0
is this correct. here they have mentioned maximum payload therefore we are not considering the headers in the maximum size. had they mentioned MTU we would also have to consider the headers of 20B?
–1
–1

Because segment offset is a 13 bit field and total length is 16 bit field,  so we have to make sure that offset is offset field is a factor of 8 so as to match total length, 2^16 / 2^13 = 8 wink

0
0
Fragmentation offset is measured in multiple of 8 bytes. Offset is starting byte number in a fragment. If there are n fragments, till n-1 each fragment should contain multiple of 8 bytes. But for the last fragment there is no such restriction I guess.

Please comment.
0
0
@ram,

you are right, last offset need not to be a multiple of 8
1
1
Admin,

Please update the selected answer "900 bytes instead of 904 bytes"
0
0
@arjun sir tcp message contain header ??
0
0

Total we have done fragmentation 8 times , 2 times in network A and 6 times in network B so y cant the answer be 160bytes

0
0
TCP message is header + data

or only data>?????
0
0
@kapil why 20 bytes for tcp header is not considered.....as TCP message is header + data
0
0

Shreyans Dhankhar 

In question it is asking for Total overhead not Total sum of IP Header..Note: we have to calculate Overhead not total sum of IP Header which we got..

20 Data is Recquired by IP header is damn sure and if we get extra then its will be Overhead

In above You are calculating 6*20=120 and you are saying that 120 is overhead but 120-20=100 ovehead becz 20 will recquire for damn sure.

Suppose you have to 376 instead of 2100 then at

First Network 376 will be pass

and at Second Network 376 will be pass

one IP header is recquired that is 20 ..and Now we calculate Total IP Overhead which is ( 20 According to YOu but I think it is not OVERHEAD )

According to me In this case Total OVERHEAD is 0.

120 is the correct answer but the way you are explaining in last few paragraph is not seems to be correct ..

Why not people NOTICE that it is asking for "Total OVERHEAD" not total sum of IP Header  

Look Below mcjoshi explaination that he got 7*20=140 but overhead is 140-20=120

6
6
According to figure payload of Ethernet frame doesn't even contain TCP header but while doing fragmentation we take ip packet data that includes TCP header. So why r we not adding 20?
3
3
Not asked but packets are always fragmented in multiple of 8 bytes even if it is last fragment so payload 2 will be 904 in size..result wont be affected here.
0
0
Question says across two ,Does this mean that these are two independent networks ?Or does this mean one after another?

In answer it is assumed one after another.Is this correct meaning?

Altough answer remains same in both cases
2
2
Why you haven't considered TCP header?

the total packet size excluding IP header should be (2100+20 = 2120)
0
0
in last line of the answer it should be ip header is encapsuated in dll frame .
0
0
27 votes
27 votes

It is written in the question maximum payload 1200 bytes/ frame and 400/bytes per frame excluding n/w overhead it means i/p header added by n/w layer is not considered. answer will be (C).

$Remark:$ MTU are 1220 bytes and 420 Bytes for the networks A and B respectively

3 Comments

since it is written without network overhead that is why we have not considered ip header right?
0
0

@Manu Thakur one thing I am not getting that when the packet is passed through the NW 1 and it is divided into 1200 and 900 there also ip header is added ,so here it will be 20*2=40 byte ,so the total overhead = 120+40= 160

0
0
best
0
0
1 vote
1 vote
As per question Ip overhead is 20 bytes. so for 1st network the 2100 bytes will be divided into <packet size,Ip overhead> =<1180,20> and <920,20> as capacity for 1st network 1200 bytes .. and for 2nd network it will be <380,20>,<380,20>,<380,20>,<380,20>,<380,20>,<280,20> as the MSS for 2nd network is  20 Bytes ... so total overhead for 2nd network is 20*6= 120 bytes ..

so option c... correct me if i am wrong ...
edited by

1 comment

Read mcjoshi's answer.. 1200 is payload size not packet size.
6
6
Answer:

Related questions