Back to the 2023 paper

Module 3: Network Layer & Routing

20237m

Consider a router receiving an IP packet of header size 20 Bytes (having no optional fields) and payload size of 4000 Bytes. Now the router must transmit this packet across an Ethernet network, which has Maximum Transmission Unit (MTU) of 1500 Bytes. If the router attempts to send the maximum payload bits permissible in each attempt, how fragmentation is to be carried out to transmit the IP packet in the Ethernet network?

Worked SolutionAI Assisted

Solution

The IP packet has:

  • Header size = 20 bytes
  • Payload = 4000 bytes
  • MTU = 1500 bytes

The maximum payload that can fit in one fragment is:

150020=14801500 - 20 = 1480 bytes.

Since IPv4 fragment offsets are measured in units of 8 bytes, 1480 bytes is valid because 1480/8=1851480/8=185.

Therefore the 4000-byte payload is divided as:

  • Fragment 1: 1480 bytes payload
  • Fragment 2: 1480 bytes payload
  • Fragment 3: 1040 bytes payload

The fragment offsets are:

  • Fragment 1: 0/8=00/8=0
  • Fragment 2: 1480/8=1851480/8=185
  • Fragment 3: (1480+1480)/8=370(1480+1480)/8=370
Fragment Payload Total Length Fragment Offset MF bit
1 1480 bytes 1500 bytes 0 1
2 1480 bytes 1500 bytes 185 1
3 1040 bytes 1060 bytes 370 0

The MF (More Fragments) bit is 1 for the first two fragments and 0 for the final fragment.

Thus, the original packet is transmitted as three IPv4 fragments with offsets 0, 185, and 370.

Similar questions