HomeIPv4

IPv4

Internet Protocol version 4 (IPv4) is the fourth iteration of the Internet Protocol and remains the cornerstone of most packet-switched networks worldwide. Each IPv4 address is a 32-bit number usually written in dotted-decimal form, this being four octets separated by full stops, for example 192.168.1.10. This 32-bit addressing scheme allows for just over 4.29 billion unique addresses, which are divided into ranges for public routing, private networks and special purposes.

An IPv4 packet comprises a variable-length header (minimum 20 bytes) and a payload. The header begins with version and header‐length fields, followed by a Type of Service byte (now used for Differentiated Services). A 16-bit Total Length field indicates the entire packet size. Identification, Flags and Fragment Offset fields enable large packets to be split into fragments for networks with smaller maximum transmission units; each fragment carries the same Identification but a distinct offset so fragments can be reordered and reassembled at the destination. The Time To Live field prevents packets from looping indefinitely by decrementing at each hop. If it reaches zero the packet is discarded. A Protocol field specifies which transport-layer protocol follows (for example TCP 6 or UDP 17), and a 16-bit Header Checksum guards against corruption in the header alone. Optional fields at the end of the header permit features such as source routing, packet timestamps or security markings, though they are rarely used in modern deployments.

Routers forward IPv4 packets hop by hop, examining only the Destination Address in the header to select the next interface. Because each packet is independent, they may traverse different paths and arrive out of order. End hosts rely on transport-layer mechanisms or applications themselves to restore sequence. Subnetting and Classless Inter-Domain Routing (CIDR) allow network administrators to divide the address space into variable-length prefixes, improving address utilisation and enabling route aggregation. This reduces the size of routing tables across the global internet.