{"id":28384,"date":"2017-10-15T17:11:16","date_gmt":"2017-10-15T11:41:16","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=28384"},"modified":"2017-10-15T17:11:16","modified_gmt":"2017-10-15T11:41:16","slug":"network-layer-introduction-ipv4-datagram-header","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/network-layer-introduction-ipv4-datagram-header\/","title":{"rendered":"Network Layer | Introduction and IPv4 Datagram Header"},"content":{"rendered":"<p>Network layer is the third layer (from bottom) in the OSI Model.<\/p>\n<p><strong>Responsibilities of Network Layer:<\/strong><\/p>\n<pre><strong>Packet forwarding\/Routing of packets:<\/strong> Relaying of data packets from one network segment\r\n                                      to another by nodes in a computer network\r\n\r\n<strong>Connectionless communication(IP):<\/strong>     A data transmission method used in packet switched \r\n                                      networks in which each data unit is separately \r\n                                      addressed and routed based on information carried \r\n                                      by it\r\n\r\n<strong>Fragmentation of data packets:<\/strong>        Splitting of data packets that are too large to be\r\n                                      transmitted on the network<\/pre>\n<p>There are two types of network transmission techniques, circuit switched network and packet switched network.<\/p>\n[ad type=&#8221;banner&#8221;]\n<p><strong>Circuit Switch vs Packet Switch<\/strong><br \/>\nIn circuit switched network, a single path is designated for transmission of all the data packets. Whereas, in case of a packet switched network, each packet may be sent through a different path to reach the destination.<\/p>\n<p>In a circuit switched network, the data packets are received in order whereas in a packet switched network, the data packets may be received out of order.<\/p>\n<p><strong>IPv4:<\/strong><br \/>\nIPv4 is a connectionless protocol used for packet switched networks. It operates on best effort delivery model, in which neither delivery is guaranteed, nor proper sequencing or avoidance of duplicate delivery is assured.<br \/>\nIPv4 uses 32-bit (4 byte) addressing, which gives 2<sup>32<\/sup> addresses. IPv4 addresses are written in the dot decimal notation, which comprises of four octets of the address expressed individually in decimal and separated by periods, for instance, 192.168.1.5.<\/p>\n[ad type=&#8221;banner&#8221;]\n<p><strong>IPv4 Datagram Header<\/strong><br \/>\nSize of the header is 20 to 60 bytes.<\/p>\n<pre><em><strong>VER:<\/strong><\/em>   Version of the IP protocol (4 bits), which is 4 for IPv4\r\n\r\n<em><strong>HLEN:<\/strong><\/em>  IP header length (4 bits), which is the number of 32 bit \r\n       words in the header. Minimum value for this field is 5\r\n       and the maximum is 15\r\n\r\n<em><strong>Type of service:<\/strong> <\/em>Low Delay, High Throughput, Reliability (8 bits)\r\n\r\n<em><strong>Total Length:<\/strong> <\/em>   Length of header + Data (16 bits), which has a \r\n                 minimum value 20 bytes and maximum is 65,535 bytes\r\n\r\n<em><strong>Identification:<\/strong><\/em>  Unique Packet Id for identifying the group of \r\n                 fragments of a single IP datagram (16 bits)\r\n\r\n<em><strong>Flags:<\/strong><\/em>           3 flags of 1 bit each : reserved bit (must be zero),\r\n                 do not fragment flag, more fragments flag (same order)\r\n\r\n<em><strong>Fragment Offset:<\/strong><\/em> Specified in terms of number of 8 bytes, which has \r\n                 the maximum value of 65,528 bytes\r\n\r\n<em><strong>Time to live:<\/strong><\/em>  Datagram\u2019s lifetime (8 bits), It prevents the datagram \r\n               to loop in the network\r\n\r\n<em><strong>Protocol:<\/strong> <\/em>    Name of the protocol to which the data is to be passed \r\n              (8 bits)\r\n\r\n<em><strong>Header Checksum:<\/strong><\/em>  16 bits header checksum for checking errors in the \r\n                  datagram header\r\n\r\n<em><strong>Source IP address:<\/strong><\/em> 32 bits IP address of the sender\r\n\r\n<em><strong>Destination IP address:<\/strong><\/em> 32 bits IP address of the receiver\r\n\r\n<em><strong>Option:<\/strong><\/em> Optional information such as source route<\/pre>\n[ad type=&#8221;banner&#8221;]\n","protected":false},"excerpt":{"rendered":"<p>Network Layer | Introduction and IPv4 Datagram Header &#8211; Network Layer &#8211; Network layer is the third layer (from bottom) in the OSI Model<\/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":[82878,82871,82877,82874,82875,82872,82873,82876],"class_list":["post-28384","post","type-post","status-publish","format-standard","hentry","category-computer-networks","category-cs-subjects","tag-ethernet-header","tag-ipv4-header-format-explanation","tag-ipv4-header-format-pdf","tag-ipv4-pdf","tag-ipv6-datagram-format","tag-ipv6-header","tag-tcp-header-format","tag-udp-header-format"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/28384","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=28384"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/28384\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=28384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=28384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=28384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}