{"id":28388,"date":"2017-10-15T17:01:20","date_gmt":"2017-10-15T11:31:20","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=28388"},"modified":"2017-10-15T17:01:20","modified_gmt":"2017-10-15T11:31:20","slug":"network-layer-ipv4-datagram-fragmentation-delays","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/network-layer-ipv4-datagram-fragmentation-delays\/","title":{"rendered":"Network Layer | Ipv4 Datagram Fragmentation and Delays"},"content":{"rendered":"<p><strong>Why IPv4 Datagram Fragmentation required?<\/strong><br \/>\nDifferent Networks may have different maximum transmission unit (MTU), for example due to differences in LAN technology. <span id=\"more-142721\"><\/span>When one network wants to transmit datagrams to a network with a smaller MTU, the routesrs on path may fragment and reassemble datagrams.<\/p>\n<p><strong>How is Fragmentation done?<\/strong><br \/>\nWhen a packet is received at the router, destination address is examined and MTU is determined. If size of the packet is bigger than the MTU, and the \u2018Do not Fragment (DF)\u2019 bit is set to 0 in header, then the packet is fragmented into parts and sent one by one. The maximum size of each fragment is the MTU minus the IP header size (Minimum 20 bytes and Maximum 60 bytes).[ad type=&#8221;banner&#8221;]\n<p>Each fragment is converted to a packet and the following changes happen in the datagram header:<\/p>\n<pre>   1. The total length field is changed to the size of\r\n      the fragment.\r\n   2. The More Fragment bit (MF bit) is set for all the\r\n      fragment packets except the last one.\r\n   3. The fragment offset field is set, based on the number \r\n      of fragment that is being set and the MTU.\r\n   4. Header Checksum is re-calculated.<\/pre>\n<p><strong>Example:<\/strong> For a data packet of 4000 bytes and MTU of 1500 bytes, we have actual data of 3980 bytes that is to be transmitted and 1480 bytes is the maximum data size that is permissible to be sent. So, there would be 3 fragments.<\/p>\n<pre>For the first fragment, \r\n     data size = 1480 bytes, offset = 0 and MF flag = 1.\r\n\r\nFor the second fragment, \r\n     data size = 1480 bytes, offset = 1480 and MF flag = 1.\r\n\r\nFor the third fragment, \r\n     data size = 1020 bytes, offset = 2960 and MF flag = 0.<\/pre>\n<p>An important point to be noted here is that all fragments would be having same identification number, thus indicating that all the fragments belong to the same parent data packet.[ad type=&#8221;banner&#8221;]\n<p><strong>Delays<\/strong><\/p>\n<pre>Processing delay:   Time\u00a0taken by the routers to process the data packet header.\r\n\r\nQueuing delay:      Time\u00a0taken by the data packet in routing queues.\r\n\r\nTransmission delay: Time\u00a0taken to load a data packet onto the transmission channel\r\n     D<sub>t<\/sub> = N\/R, \r\n       N: Number of bits to be transmitted \r\n       R: Rate or transmission speed of the channel\r\n\r\nPropagation delay - Time\u00a0taken by the data packet to reach from source to destination\r\n     D<sub>p<\/sub> = D\/S, \r\n       D: Distance between the source and the destination \r\n       S: is the speed of propagation<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Network Layer | Ipv4 Datagram Fragmentation and Delays &#8211; Network Layer &#8211; Different Networks may have different maximum transmission unit (MTU),<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82277,71771],"tags":[82892,82891,82889,82890,82887,82894,82888,82893],"class_list":["post-28388","post","type-post","status-publish","format-standard","hentry","category-computer-networks","category-cs-subjects","tag-fragment-offset-calculation","tag-fragmentation-in-networking-pdf","tag-ip-fragmentation-and-reassembly","tag-ip-fragmentation-tutorial","tag-ipv4-fragmentation-example","tag-ipv4-header","tag-ipv6-fragmentation-and-reassembly","tag-path-mtu-discovery"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/28388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=28388"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/28388\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=28388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=28388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=28388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}