IP Header | IP Fragmentation | Problems

Spread the love

IP Fragmentation-

 

Before you go through this article, make sure that you have gone through the previous article on IP Fragmentation.

 

We have discussed-

  • IP Fragmentation is a process of dividing the datagram into fragments during its transmission.
  • It is performed by intermediary devices at destination side at network layer.

 

Also Read- IP Header

 

In this article, we will discuss practice problems based on IP Header and IP Fragmentation.

 

PRACTICE PROBLEMS BASED ON IP HEADER AND IP FRAGMENTATION-

 

Problem-01:

 

The intermediate routers between source and destination need the following information in IP header-

  1. Version
  2. Protocol
  3. Identification Number
  4. Source IP Address

 

Solution-

 

Option-A:

 

  • Version field indicates the version of IP used.
  • This information is required to process the packet appropriately based on its version.

 

Option-B:

 

  • Protocol field indicates the next level protocol.
  • This information is required by the router to accept or discard the packet if its buffer is full.
  • Based on the priority, router takes its decision.

 

Option-C:

 

  • Identification number field identifies the fragments of the same datagram.
  • This information is required while re-assembling the datagram fragments.

 

Option-D:

 

  • Source IP Address field indicates the IP Address of the source.
  • This information is required by the router to send ICMP packet to the source.
  • ICMP packet informs the source that its packet has been discarded.

 

Thus, All these fields are required in the IP Header.

 

Problem-02:

 

Fragmentation of a datagram is needed in-

  1. Datagram circuit only
  2. Virtual circuit only
  3. Both (A) and (B)
  4. None

 

Solution-

 

  • Each network has its Maximum Transmission Unit (MTU).
  • If the size of data packet is greater than MTU, then it will have divided into fragments to transmit it through the network.
  • So, fragmentation may be required in datagram circuits as well as virtual circuits.
  • Thus, Option (C) is correct.

 

Problem-03:

 

What are all the fields required from IP header to allow the destination to perform reassembly of fragments?

  1. Identification, MF, Offset, Header length and Total length
  2. MF, Offset and Destination IP
  3. MF, Datagram length, Source IP
  4. MF, Options and Offset

 

Solution-

 

Clearly, Option (A) is correct.

 

Problem-04:

 

The checksum in IP must be recomputed at every router because of change in ____ fields.

  1. TTL, Options, Identification Number, Offset
  2. TTL, Options, Datagram Length, Offset
  3. TTL, Options, Data, Offset
  4. TTL, Header Length, Offset, ToS

 

Solution-

 

Clearly, Option (B) is correct.

 

Problem-05:

 

If the value available in “fragment offset” field of IP header is 100, then the number of bytes ahead of this fragment is ___ ?

  1. 100 B
  2. 400 B
  3. 800 B
  4. 200 B

 

Solution-

 

  • Fragment offset field use a scaling factor of 8.
  • If Fragment offset field value = 100, then fragment offset = 8 x 100 = 800.
  • It suggests 800 bytes of data is ahead of this fragment.
  • Thus, Option (C) is correct.

 

Problem-06:

 

When the source does not trust the routers to route properly or source wishes to make sure that the packet does not stray from specified path, what options can be used?

  1. Loose source routing
  2. Trace route
  3. Strict source routing
  4. Internet Time Stamp

 

Solution-

 

Clearly, Option (C) is correct.

 

Problem-07:

 

The checksum computation in IP header includes-

  1. IP header only
  2. IP header and data
  3. IP header and Pseudo header
  4. None

 

Solution-

 

  • Checksum computation in IP header includes IP header only.
  • Errors in the data field are handled by the encapsulated protocol.
  • Thus, Option (A) is correct.

 

Problem-08:

 

Suppose a router receives an IP packet containing 600 data bytes and has to forward the packet to a network with maximum transmission unit of 200 bytes. Assume that IP header is 20 bytes long. What are fragment offset values for divided packets?

  1. 22, 44, 66, 88
  2. 0, 22, 44
  3. 0, 22, 44, 66
  4. 22, 44, 66

 

Solution-

 

Given-

  • MTU size of the destination network = 200 bytes
  • IP header length = 20

 

Now,

  • Maximum amount of data that can be sent in one fragment = 200 – 20 = 180 bytes.
  • Amount of data sent in a fragment must be a multiple of 8.
  • So, maximum data sent that can be in one fragment = 176 bytes.

 

Thus, 4 fragments are created-

  • 1st fragment contains 176 bytes of data.
  • 2nd fragment contains 176 bytes of data.
  • 3rd fragment contains 176 bytes of data.
  • 4th fragment contains 72 bytes of data

 

So,

  • Fragment offset value for 1st fragment = 0
  • Fragment offset value for 2nd fragment = 176 / 8 = 22
  • Fragment offset value for 3rd fragment = (176+176) / 8 = 44
  • Fragment offset value for 4th fragment = (176 + 176 + 176) / 8 = 66

 

Thus, Option (C) is correct.

 

To watch video solution and practice other problems,

Watch this Video Lecture

 

Next Article- Transmission Control Protocol | TCP

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
IP Header | IP Fragmentation | Problems
Article Name
IP Header | IP Fragmentation | Problems
Description
Practice Problems based on IP Header and IP Fragmentation. IPv4 Header contains information required during the data packet transmission. IP Fragmentation is a process of dividing datagram into fragments.
Author
Publisher Name
Gate Vidyalay
Publisher Logo

Spread the love