in Computer Networks edited by
477 views
1 vote
1 vote

In a host size for PDU of network layer is 17076 bytes, MTU size for that network is 200 bytes and  IPv4 header size is 20 bytes .find number of IP fragments

 
 
 
in Computer Networks edited by
by
477 views

2 Answers

0 votes
0 votes

MTU is 200 byte and ip header is 20 byte so In network we send only 200-20=180 byte data

But here Catch is We Can’t Send date packet size is 180 Because It is not divisible by 8 so we take nearest value to 180 which is divisible by 8. SO 176 is divisible by 8 Here We take my packet size 176 byte

-Divisible by 8 Because Offset = 1st byte Number/8

now  Ceil(17076/176) = 967 Packet we send.

3 Comments

why not minus 20 -byte header from 17076

0
0

You Can See Here – Why we not remove header size in pdu Gate cse 2012 Question

The protocol data unit (PDU) for the application layer in the Internet stack is
(A) Segment
(B) Datagram
(C) Message
(D) Frame


Answer: (C)

Explanation: The Protocol Data Unit  is the unit of communication at a particular layer.

 The Layer 1 (Physical Layer) PDU is the bit or, more generally, symbol 
 The Layer 2 (Data Link Layer) PDU is the frame.
 The Layer 3 (Network Layer) PDU is the packet.
 The Layer 4 (Transport Layer) PDU is the segment
              for TCP or the datagram for UDP.
 The Layer 5 (Application Layer) PDU is the data or message.
0
0
The answer is 97 fragments
0
0
0 votes
0 votes

Answer is 97.

Let's see MTU =200B 

So we can send maximum 200B at once. 

Here header size is 20B 

So we can send only 200-20=180B at once but we cannot send data of size not divisible by 8.

We need to send 176 of data + 20 byte in one packet

So number of fragments=17076/176=97.022727

97 fragments. 

But wait, there is some fraction part left (0.022727) 

Let's break it down

If we send 97 fragments with each 176 bytes, in total we are sending =97*176=17072bytes

But total data is 17076bytes i. e we are left with 4byte data. Should we send this with an extra fragment? 

Answer is NO.. because we are sending 196byte data in each fragments but the MTU is 200byte and as it is last byte we can send the remaining data along with this. 

So the last fragment I.e fragment no. 97 will contain total 200 byte of data.

1st fragment 0---175(176B+20B) 

2nd fragment 176---351(176B+20B

..... 

96th  fragment 16720---16895(176B+20B) 

97th fragment 16896---17076(180B+20B) 

If data was given atleast 1 byte extra then we might have to use another fragment for this. 

by

Related questions