IPv4 Datagram Header Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report IP stands for Internet Protocol and v4 stands for Version Four (IPv4). IPv4 was the primary version brought into action for production within the ARPANET in 1983. IP version four addresses are 32-bit integers which will be expressed in decimal notation. In this article, we will discuss about IPv4 datagram header.IPv4 is a connectionless protocol used for packet-switched networks. Internet Protocol Version 4 (IPv4) is the fourth revision of the Internet Protocol and a widely used protocol in data communication over different kinds of networks. IPv4 is a connectionless protocol used in packet-switched layer networks, such as Ethernet. It provides a logical connection between network devices by providing identification for each device. There are many ways to configure IPv4 with all kinds of devices – including manual and automatic configurations – depending on the network type. IPv4 uses 32-bit addresses for Ethernet communication in five classes: A, B, C, D and E. Classes A, B, and C have a different bit length for addressing the network host. Class D addresses are reserved for multicasting, while class E addresses are reserved for military purposes. IPv4 uses 32-bit (4-byte) addressing, which gives 232 addresses. IPv4 addresses are written in the dot-decimal notation, which comprises four octets of the address expressed individually in decimal and separated by periods, for instance, 192.168.1.5. Characteristics of IPv4IPv4 could be a 32-Bit IP Address.IPv4 could be a numeric address, and its bits are separated by a dot.The number of header fields is twelve and the length of the header field is twenty.It has Unicast, broadcast, and multicast style of addresses.IPv4 supports VLSM (Virtual Length Subnet Mask).IPv4 uses the Post Address Resolution Protocol to map to the MAC address.RIP may be a routing protocol supported by the routed daemon.Networks ought to be designed either manually or with DHCP.Packet fragmentation permits from routers and causing host.IPv4 Datagram HeaderVERSION: Version of the IP protocol (4 bits), which is 4 for IPv4 HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The minimum value for this field is 5 and the maximum is 15. Type of service: Low Delay, High Throughput, Reliability (8 bits) Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the maximum is 65,535 bytes. Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits) Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag (same order) Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of 65,528 bytes. Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by restricting the number of Hops taken by a Packet before delivering to the Destination.Protocol: Name of the protocol to which the data is to be passed (8 bits) Header Checksum: 16 bits header checksum for checking errors in the datagram header Source IP address: 32 bits IP address of the sender Destination IP address: 32 bits IP address of the receiver Option: Optional information such as source route, record route. Used by the Network administrator to check whether a path is working or not.IPv4 Datagram HeaderDue to the presence of options, the size of the datagram header can be of variable length (20 bytes to 60 bytes). IPv4 Header in Computer Network Visit Course IPv4 Header in Computer Network IPv4 Header Field- Internet Header Length in Computer Network IPv4 Header – Part3 in Computer Network IPv4 Header Field- Options in Computer Network Comment More info K kartik Follow Improve Article Tags : Computer Networks Network Layer Explore Computer Network BasicsBasics of Computer Networking4 min readTypes of Computer Networks7 min readIntroduction to Internet10 min readNetwork Devices9 min readWhat is OSI Model? - Layers of OSI Model11 min readTCP/IP Model6 min readDifference Between OSI Model and TCP/IP Model2 min readPhysical LayerPhysical Layer in OSI Model3 min readTypes of Network Topology9 min readTransmission Modes in Computer Networks (Simplex, Half-Duplex and Full-Duplex)6 min readTransmission Media in Computer Networks7 min readData Link LayerData Link Layer in OSI Model4 min readWhat is Switching?5 min readVirtual LAN (VLAN)7 min readFraming in Data Link Layer6 min readError Control in Data Link Layer4 min readFlow Control in Data Link Layer4 min readPiggybacking in Computer Networks5 min readNetwork LayerNetwork Layer in OSI Model5 min readIntroduction of Classful IP Addressing10 min readClassless Addressing in IP Addressing7 min readWhat is an IP Address?14 min readIPv4 Datagram Header4 min readDifference Between IPv4 and IPv67 min readDifference between Private and Public IP addresses6 min readIntroduction To Subnetting8 min readWhat is Routing?10 min readNetwork Layer Protocols9 min readTransport LayerTransport Layer in OSI Model5 min readTransport Layer Protocols9 min readWhat is TCP (Transmission Control Protocol)?5 min readUser Datagram Protocol (UDP)10 min readSession Layer & Presentation LayerSession Layer in OSI model6 min readPresentation Layer in OSI model4 min readSecure Socket Layer (SSL)10 min readPPTP Full Form - Point-to-Point Tunneling Protocol5 min readMultipurpose Internet Mail Extension (MIME) Protocol4 min readApplication LayerApplication Layer in OSI Model5 min readClient-Server Model3 min readWorld Wide Web (WWW)6 min readIntroduction to Electronic Mail4 min readWhat is a Content Distribution Network and how does it work?4 min readProtocols in Application Layer7 min readAdvanced TopicsWhat is Network Security?7 min readComputer Network | Quality of Service and Multimedia7 min readAuthentication in Computer Network4 min readEncryption, Its Algorithms And Its Future10 min readIntroduction of Firewall in Computer Network7 min readMAC Filtering in Computer Network10 min readWi-Fi Standards Explained4 min readWhat is Bluetooth?6 min readGenerations of wireless communication2 min readCloud Networking11 min readPracticeTop 50 Plus Networking Interview Questions and Answers for 202415+ min readTop 50 TCP/IP Interview Questions and Answers 202515+ min readNetwork Fundamentals Interview Questions - Computer Networks15+ min readLast Minute Notes for Computer Networks14 min readComputer Network - Cheat Sheet15+ min read Like