0
9.2kviews
Explain the fields that are related to fragmentation and reassembly of an IPv4 datagram.
1 Answer
1
590views

Fields Related to Fragmentation:

The fields that are related to fragmentation and reassembly of an IP datagram are the identification, flags, and fragmentation offset fields.

  • Identification:

    i. This 16-bit field identifies a datagram originating from the source host. The combination of the identification and source IP address must uniquely define a datagram as it leaves the source host.

    ii. To guarantee uniqueness, the IP protocol uses a counter to label the datagrams. The counter is initialized to a positive number.

    iii. When the IP protocol sends a datagram, it copies the current value of the counter to the identification field and increments the counter by one.

    iv. As long as the counter is kept in the main memory, uniqueness is guaranteed. When a datagram is fragmented, the value in the identification field is copied into all fragments.

    v. In other words, all fragments have the same identification number, which is also the same as the original datagram.

    vi. The identification number helps the destination in reassembling the datagram. It knows that all fragments having the same identification value should be assembled into one datagram.

  • Flags:

    i. This is a three-bit field. The first bit is reserved (not used). The second bit is called the do not fragment bit.

    ii. If its value is 1, the machine must not fragment the datagram. If it cannot pass the datagram through any available physical network, it discards the datagram and sends an ICMP error message to the source host. If its value is 0, the datagram can be fragmented if necessary.

    iii. The third bit is called the more fragment bit.

    iv. If its value is 1, it means the datagram is not the last fragment; there are more fragments after this one. If its value is 0, it means this is the last or only fragment.

enter image description here

  • Fragmentation offset:

    i. This 13-bit field shows the relative position of this fragment with respect to the whole datagram.

    ii. It is the offset of the data in the original datagram measured in units of 8 bytes. Figure shows a datagram with a data size of 4000 bytes fragmented into three fragments. The bytes in the original datagram are numbered 0 to 3999. The first fragment carries bytes 0 to 1399.

    iii. The offset for this datagram is 0/8= 0. The second fragment carries bytes 1400 to 2799; the offset value for this fragment is 1400/8= 175.

    iv. Finally, the third fragment carries bytes 2800 to 3999. The offset value for this fragment is 2800/8= 350.

enter image description here

The value of the offset is measured in units of 8 bytes. This is done because the length of the offset field is only 13 bits long and cannot represent a sequence of bytes greater than 8191. This forces hosts or routers that fragment datagrams to choose the size of each fragment so that the first byte number is divisible by 8.

Please log in to add an answer.