in Computer Networks edited by
19,502 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

60 Comments

^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.

1
1
You mean to say fragmentation will be $1200 + 900 $ and then $400 + 400 + 400$ and $400 + 400 + 100$. So, $6$ fragments.
0
0

^yes. 2100 -> 1200 + 904 and then 1200-> 400 + 400 + 400 and 900-> 400 + 400 + 104. 

0
0

@mcjoshi

A TCP message consisting of 2100 bytes is passed to IP

It includes data + header and when given to IP, it thinks it as a complete data to be send

2
2
@Kapil 2100 = TCPH + TCPdata. IP thinks 2100 to be sent. right?? So, intermediate router fragments 2100B.

Still can't figure out what is wrong with my approach?
0
0

Router-1: 2120 reach destination network layer

how 2120 ? 

0
0
Transport layer at source sends 2100B to IP of source. IP appends it's 20B header and $R_1$ receives $2120$
0
0
IP fragments data/payload { not the packet }. That is a standard, right ?
2
2
Yes.
0
0

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

This means that the first network can carry 1200 Bytes of IP packet which includes 20B of IP header therefore the first network can carry at max 1176B(1180 not a multiple of 8 so 1176B) of TCP message.

4
4
@shivam, How data/payload has 20B of IP header ?

And what if question was max. frame size is or max. packet size is 1200 ?
1
1

Actually, it is getting confusing. The first network can carry a maximum payload of 1200 bytes per frame

Does this mean payload of frame i.e. 1200 bytes of IP packet  or here payload is used to mention 1200B of TCP Packet?

What I used above is  taking it as payload of frame, then taking 1180B of TCP packet.

2
2

@mcjoshi 


The first network can carry a maximum payload of 1200 bytes per frame

 but you are taking only 1176 payload ???  am i rt??

0
0

The first network can carry a maximum payload of 1200 bytes per frame

This mean payload of frame i.e. 1200 bytes of IP packet or 1180B of TCP packet. to be a multiple of 8 we use 1176B of TCp packet.

2
2
okk.  1176B of TCp packet. but we do fragmentation at NL . and at NL the packet size is 1200. and total msg size is 2100 B, which is to be fragmented into no. of packets less than MTU.
So it should be
 In either case, the original data will be fragmented into smaller packets (less than the smallest MTU) in order to allow it to be received by the final destination system.
0
0
We definitely do fragmentation at network layer but we do fragmentation of payload of IP packet (TCP packet) and then add 20B of header to each fragment. So 1200B - 20B = 1180B and to make a multiple of 8 we use 1176B of payload of IP. Thus 1176 + 20 = 1196B of frame payload.
2
2
then according to the above concept i m getting total ip overhead=140 bytes
4
4
This is what @mcjoshi is trying to explain and I think he is correct
2
2

QS says :

maximum payload of $1200$ bytes per frame

is nothing but MTU  = The maximum IP packet size that a frame can encapsulate depending in the underlying network.


According to me @mcjoshi explanation is correct except his diagram.

2
2

I was also thinking the same thing !  But didn't udnerstand this part

Total IP Overhead =7∗20=140B and IP overhead due to fragmentation =6∗20=120B

How is this " Ip overhead due to fragmentation calculated ? How does it coming to be 6*20 ? Not getting this one

1
1
Mcjoshi's answer is perfectly correct.
1
1
Will someone of u pls tell me How is this " Ip overhead due to fragmentation" calculated ?
1
1

^ if u divided one packet into 4 fragments(say) then for each fragment u will attach one IP header..initally u were having 1 header..now u are having 4..so overhead is of 3 headers(one header was obviously there)..

6
6
@Dulqar. What do you mean by IP overhead logically? Its the overhead due to IP protocol. Now, the overhead due to IP protocol is only due to its header.

So, calculate the header size.
1
1
Thank you so much :)
2
2
payload includes tcp header + tcp data + ip header..right??

payload is the actual data recieved by dat link layer.am i correct??so payload is MTU..
1
1

^ depends about which layer we are talking
here frame payload...frame means packet of DLL..so here payload will be IP header+ data..similarly fr other layers also...

2
2
@Debashish, $8 \nmid 1180$, that's why $1176$ is the data. [data part of all fragments except last one should be divisible by $8$]
2
2

I said only the diagram. not your numbers :). They are correct for sure. Offsets are in chunks of 8 bytes, so total fragment data size (excluding IP header) must be divisible by 8 so that offset numbers follow continuously (first offset number $\rightarrow$ $\text{data size} / 8$ $\rightarrow$ 2nd offset number $\rightarrow$ $\text{data size} / 8$ $\rightarrow$.......last fragment  offset number)

last IP fragment data size need not be divisible by because there are no more fragments and we need not set offset number anymore.

2
2
I couldn't understand which part of diagram is wrong. Please post a screenshot of that part.
1
1

You have two routers and three segments. In such a diagram segments represents one network. This representation you must have come across bridge port selection diagram. 

2
2
Two MTU's are given in the QS. That means two network segments have their own MTU limitations. Two routers and MTU's shown above I think not correct. A router  will only fragment seeing forwarding path (network) limitation.
2
2
Okk, Well i will study bridge port selection diagram after gate now.
3
3

This is what I was saying . This lines basically represent a network.

4
4
@Debashish. Yes, instead of 2, just 1 router is required. But, answer remains the same :)
2
2
There is one router and the initial fragmentation is done by the source and after that final fragmentation by router. Am I getting it right???@sushant @debashish
1
1
it divides 2100 Bytes into two fragments of  size 1176 and 924. How??

since IP packet data part in first network is 1220 will it not be 1216 AND 884.
2
2

maximum payload of 1200 bytes per frame is given in the QS:

A frame payload means MTU. It includes IP header + IP data.

You are saying - since IP packet data part in first network is 1220 : On what basis you concluded this ?

1
1

But in question 1200 and 400 bytes are maximum payload excluding network overheard

so after passing through it will it not be 1220 ?

And since 1220 nit divisible by 8 so 1216?

2
2

OK ! excluding network overheard , Then  1200 is not the MTU but TCP header + data

  • 1200 will be TCP header size + data  

 @ G.K.T  ..we need to fragment the data part only of a IP packet no need to add 20 Bytes here.

mcjoshi ..because of excluding network overheard : 2100 (does not includes IP header) = 1200(does not includes IP header) + 900(does not includes IP header) is ok. what you say ?

4
4

@Debashish

Did you check this answer http://quiz.geeksforgeeks.org/gate-gate-it-2004-question-87/

Or the diagram I gave above ? What includes payload ? and difference between payload and datagram ?

1
1

excluding network overhead was what i was missing. You are right :))

Although I have edited above answer, But please edit it if you think something more should be added.

$\color{green}{\tt\;Thanks\; Everyone\; :))\;}$

2
2

see, their playload ,,and this QS payload, there is a difference.

if the following statements are true then 1st answer to this problem is ok

  • 2100 Bytes includes only TCP header + data
  • 1200 Bytes does not include IP header (because of excluding network overheard in the QS)
2
2

@Kapil, I think main part was excluding network overhead. Suppose this is removed from above question, then $1200$B contains IPheader too. rt??

1
1
This is right . I saw in the above comments that payload = MTU. Fine now !!
2
2

@kapil ...frame payload in indeed MTU.

But in this QS , this payload meaning has been changed to excluding IP header.

4
4
@Debashish

No, I meant Network payload = MTU in my above comment :)

I know this, that MTU and Maximum frame size are different .
3
3
1200B is without IP header.
3
3
finally the best one.
4
4
Best answer!
4
4
I think in IPV4 fragmentation and de fragmentation is done at every router.So will the router wait until all the fragments of the packet are arrived?Will R1 wait until both 1200 byte and 900 byte fragment is arrived and then it will join them in one packet and forward? OR can it forward as soon as it received 1200 byte without waiting for 900?
1
1
routers never do reassembly of packets. Reassembly of fragmented packets is done at receiver.
2
2
If 1200 Bytes are without IP header,then 1200 is divisible by 8.So first fragment can be sent of 1200 bytes.But remaining 900 is not multiple of 8So we need to pad 4 bytes and make it 904?Can someone please clear this?
2
2
edited by
@rahul sharma 5 i too have same doubt it is clear now we dont need to make last frame as multiple of 8 because last frame is always less than MTU of the network we are operating so we dont need to add padding for last frame
1
1
4
4

pages from kroush ross

0
0
what if total fragmentation overhead is asked in question?
1
1
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

4 Comments

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