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-
The intermediate routers between source and destination need the following information in IP header-
- Identification Number
- Source IP Address
- Version field indicates the version of IP used.
- This information is required to process the packet appropriately based on its version.
- 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.
- Identification number field identifies the fragments of the same datagram.
- This information is required while re-assembling the datagram fragments.
- 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.
Fragmentation of a datagram is needed in-
- Datagram circuit only
- Virtual circuit only
- Both (A) and (B)
- 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.
What are all the fields required from IP header to allow the destination to perform reassembly of fragments?
- Identification, MF, Offset, Header length and Total length
- MF, Offset and Destination IP
- MF, Datagram length, Source IP
- MF, Options and Offset
Clearly, Option (A) is correct.
The checksum in IP must be recomputed at every router because of change in ____ fields.
- TTL, Options, Identification Number, Offset
- TTL, Options, Datagram Length, Offset
- TTL, Options, Data, Offset
- TTL, Header Length, Offset, ToS
Clearly, Option (B) is correct.
If the value available in “fragment offset” field of IP header is 100, then the number of bytes ahead of this fragment is ___ ?
- 100 B
- 400 B
- 800 B
- 200 B
- 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.
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?
- Loose source routing
- Trace route
- Strict source routing
- Internet Time Stamp
Clearly, Option (C) is correct.
The checksum computation in IP header includes-
- IP header only
- IP header and data
- IP header and Pseudo header
- 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.
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?
- 22, 44, 66, 88
- 0, 22, 44
- 0, 22, 44, 66
- 22, 44, 66
- MTU size of the destination network = 200 bytes
- IP header length = 20
- 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
- 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,
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.