retagged by
22,299 views
33 33 votes
Consider sending an $\text{IP}$ datagram of size $1420$ bytes (including $20$ bytes of $\text{IP}$ header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an $\text{MTU}$ (Maximum Transmission Unit) size of $542$ bytes, while the second link (router to receiver) has an $\text{MTU}$ size of $360$ bytes. The number of fragments that would be delivered at the receiver is ____________.

5 Answers

52 52 votes

Answer: 6

2 2 votes
Given intial ip datagram  with 1400bytes data+20 bytes header

Sender-------MTU(542 bytes)-------router-----------MTU(360bytes)-------receiver

At sender  1400 bytes of data is fragmented as   520 bytes(D)+20bytes(H)

                                                                              520 bytes(D)+20bytes(H)

                                                                              360bytes(D)+20bytes(H) {   where  D=== data, H ===Header}

At router there are 3 fragments to send to receiver the MTU size is 360 Bytes so, again fragmentation is required

  The   1st fragment of 520 Bytes of data is fragmented to 336 bytes(D) + 20 bytes (H)

                                                                                            184 bytes(D) +20 bytes(H)

  The   2st fragment of 520 Bytes of data is fragmented to 336 bytes(D) + 20 bytes (H)

                                                                                            184 bytes(D) +20 bytes(H)

  The   3st fragment of 360 Bytes of data is fragmented to 336 bytes(D) + 20 bytes (H)

                                                                                            24 bytes(D) +20 bytes(H)

 so, the final total fragments at the receiver is  6 fragments

 
2 2 votes

 Given:

  • Original IP datagram size: 1420 bytes (including 20-byte IP header)

  • Payload: 1420 - 20 = 1400 bytes

  • First Link MTU: 542 bytes

  • Second Link MTU: 360 bytes

  • Router is between the links


🔹 Step 1: Fragmentation at First Link (MTU = 542 bytes)

Max payload per fragment = MTU - IP header = 542 - 20 = 522 bytes

 IP fragmentation requires that all fragment payloads except the last be in multiples of 8 bytes.

Largest multiple of 8 ≤ 522 = 520 bytes

So:

  • Each fragment will carry 520 bytes of data

  • Last fragment will carry the remaining data

Let’s fragment the original 1400-byte payload.

➤ How many fragments?

  • First fragment: bytes 0–519

  • Second fragment: bytes 520–1039

  • Third fragment: bytes 1040–1399 (360 bytes)

So:

  • Fragment 1: 520 bytes

  • Fragment 2: 520 bytes

  • Fragment 3: 360 bytes
    Total = 3 fragments

➤ Fragment details (Sender → Router):

FragmentOffsetPayloadTotal LengthMF (More Fragments)
10520520+20=5401
2655205401
3130360360+20=3800

(Note: Offset is in units of 8 bytes. So offset = payload_bytes / 8)


🔹 Step 2: Fragmentation at Second Link (MTU = 360 bytes)

Now the router must re-fragment each of the 3 fragments (if necessary) to satisfy MTU = 360 bytes.

➤ Max payload per fragment on second link:

360 - 20 = 340 bytes → largest multiple of 8 ≤ 340 is 336 bytes

Let’s fragment each of the 3 fragments.


 Fragment 1 (Payload = 520 bytes)

  • Fragments:

    • F1.1: offset = 0, payload = 336

    • F1.2: offset = 336/8 = 42, payload = 184

      • Total: 336 + 184 = 520

FragmentOffsetPayloadTotal LengthMF
F1.103363561
F1.2421842041 (because more fragments still follow in original datagram)

 Fragment 2 (Payload = 520 bytes, original offset = 65)

  • Fragmented at offset 65×8 = 520

  • Fragments:

    • F2.1: offset = 520/8 = 65, payload = 336

    • F2.2: offset = (520 + 336)/8 = 107, payload = 184

FragmentOffsetPayloadTotal LengthMF
F2.1653363561
F2.21071842041

 Fragment 3 (Payload = 360 bytes, original offset = 130)

  • Fragmented at offset 130×8 = 1040

  • Fragments:

    • F3.1: offset = 130, payload = 336

    • F3.2: offset = 130 + 336/8 = 172, payload = 24

FragmentOffsetPayloadTotal LengthMF
F3.11303363561
F3.217224440 (this is the final fragment of the original datagram)

 Final Answer

➤ Total Number of Fragments Received at Receiver:

  • F1.1

  • F1.2

  • F2.1

  • F2.2

  • F3.1

  • F3.2
    Total = 6 fragments


 Summary of Fragment Info at Receiver:

Fragment| Offset |Payload| Total Length| MF
103363561
2421842041
3653363561
41071842041
51303363561
617224440

 

Answer:
Position:
Show:

Related questions

39 39 votes
5 5 answers
20.0k
20.0k views
Arjun asked Feb 16, 2024
20,023 views
Which of the following fields is/are modified in the $\text{IP}$ header of a packet going out of a network address translation $\text{(NAT)}$ device from an internal netw...
51 51 votes
11 answers 11 answers
26.6k
26.6k views
Sandeep Singh asked Feb 12, 2016
26,596 views
An IP datagram of size $1000$ $\text{bytes }$arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is $100$ $\text{by...
99 99 votes
12 answers 12 answers
43.7k
43.7k views
go_editor asked Feb 13, 2015
43,664 views
$\text{Host A}$ sends a $\text{UDP}$ datagram containing $8880\text{ bytes}$ of user data to $\text{host B}$ over an $\text{Ethernet LAN}.$ Ethernet frames may carry data...
66 66 votes
12 answers 12 answers
33.5k
33.5k views
go_editor asked Sep 28, 2014
33,455 views
An $IP$ router with a $\text{Maximum Transmission Unit (MTU)}$ of $1500$ bytes has received an $IP$ packet of size $4404\text{ bytes}$ with an $IP$ header of length $20\t...