The Significance of 4 in IP Addressing
The number 4 plays a crucial role in the world of IP addressing, particularly in IPv4, the fourth version of the Internet Protocol. This document explores the various ways in which the number 4 is significant in IP addressing, from the structure of IPv4 addresses to subnetting and CIDR notation. We'll delve into the technical aspects, historical context, and practical applications of this fundamental concept in networking.

by Ronald Legarski

IPv4: The Fourth Version of Internet Protocol
IPv4, or Internet Protocol version 4, is the fourth iteration of the Internet Protocol and has been the dominant protocol for packet-switched networks since its introduction in 1983. Despite the development of IPv6, IPv4 remains widely used due to its established infrastructure and compatibility.
The "4" in IPv4 signifies its version number, distinguishing it from earlier experimental versions and its successor, IPv6. This versioning system allows network administrators and devices to identify and handle different IP protocols correctly, ensuring proper communication across diverse network environments.
Structure of IPv4 Addresses
An IPv4 address consists of 32 bits, divided into four 8-bit octets. This structure is directly related to the number 4, as it creates four distinct segments within the address. Each octet is represented as a decimal number between 0 and 255, separated by periods (dots).
For example, the IP address 192.168.1.1 is composed of four octets: 192, 168, 1, and 1. This dotted-decimal notation makes IPv4 addresses more human-readable while maintaining their binary structure for network devices to process efficiently.
The Four Octets of IPv4
First Octet
Typically defines the network class (A, B, or C) and often represents the largest network segment.
Second Octet
Further refines the network identification, especially in Class B and C addresses.
Third Octet
Often used for subnetting in larger networks or to identify specific subnets within an organization.
Fourth Octet
Usually designates individual hosts within a network or subnet.
Four Billion Unique Addresses
The 32-bit structure of IPv4 allows for approximately 4.3 billion unique addresses (2^32). This number, while substantial, has proven insufficient for the explosive growth of internet-connected devices worldwide.
The limitation of roughly 4 billion addresses led to the development of techniques like NAT (Network Address Translation) and eventually the creation of IPv6. However, the "4 billion" figure remains a crucial benchmark in understanding the scale and limitations of IPv4 addressing.
Four Classes of IPv4 Addresses
Historically, IPv4 addresses were divided into four primary classes: A, B, C, and D. Each class was defined by the bit pattern in the first octet, determining the network and host portions of the address.
  • Class A: First bit is 0, range 1.0.0.0 to 126.255.255.255
  • Class B: First two bits are 10, range 128.0.0.0 to 191.255.255.255
  • Class C: First three bits are 110, range 192.0.0.0 to 223.255.255.255
  • Class D: First four bits are 1110, used for multicast addresses
Four-Bit CIDR Notation
Classless Inter-Domain Routing (CIDR) notation uses a forward slash followed by a number to indicate the network prefix length. This number can range from 0 to 32, with each increment representing one bit of the network prefix.
Interestingly, CIDR notation often uses multiples of 4 for subnet masks, aligning with the octet structure of IPv4 addresses. Common CIDR notations include /24, /28, and /32, each representing a different level of network segmentation and corresponding to specific subnet masks.
Quad-Dotted Decimal Notation
The representation of IPv4 addresses in dotted-decimal format is often referred to as "quad-dotted decimal notation." This terminology directly reflects the four-part structure of IPv4 addresses, with each part separated by a dot.
This notation system makes IPv4 addresses more manageable for human readers and administrators. It allows for quick visual parsing of address components, facilitating easier network troubleshooting and configuration tasks.
Four-Octet Subnet Masks
Subnet masks in IPv4 also follow the four-octet structure, mirroring the format of IP addresses. These masks use contiguous 1s to define the network portion and 0s for the host portion of an address.
Common subnet masks include 255.0.0.0 (for Class A networks), 255.255.0.0 (Class B), and 255.255.255.0 (Class C). The four-octet structure allows for flexible subnetting, enabling network administrators to create subnets of various sizes within their allocated IP address ranges.
Four Types of IPv4 Addresses
Unicast
Addresses assigned to individual network interfaces, used for one-to-one communication between devices.
Broadcast
Addresses used to send packets to all devices on a network, typically ending in .255 for a given subnet.
Multicast
Addresses used for one-to-many communication, allowing efficient distribution of data to multiple recipients.
The fourth type, anycast, is less common but used for routing to the nearest of a group of potential receivers in a network.
Four Octets in Private IP Ranges
Private IP address ranges, as defined in RFC 1918, also adhere to the four-octet structure of IPv4. These ranges are:
  • 10.0.0.0 to 10.255.255.255 (10/8 prefix)
  • 172.16.0.0 to 172.31.255.255 (172.16/12 prefix)
  • 192.168.0.0 to 192.168.255.255 (192.168/16 prefix)
Each of these ranges utilizes the four-octet format, allowing organizations to efficiently allocate and manage private addresses within their networks.
Four-Byte AS Numbers
While not directly related to IP addresses, Autonomous System (AS) numbers, crucial in BGP routing, have transitioned from 2-byte to 4-byte formats. This change was necessitated by the growth of the internet, similar to the transition from IPv4 to IPv6.
The move to 4-byte AS numbers expanded the available AS number space from 65,536 to over 4 billion, mirroring the scale of IPv4 addresses. This transition highlights the recurring theme of "4" in networking, from address octets to byte lengths in critical identifiers.
Four Key Components of an IP Packet
An IPv4 packet consists of several components, but four are particularly crucial:
  1. Source IP Address (4 bytes)
  1. Destination IP Address (4 bytes)
  1. Protocol field (1 byte, but significant for Layer 4 protocols)
  1. Header Checksum (2 bytes, ensuring packet integrity)
These components, especially the source and destination addresses, rely on the four-octet structure of IPv4 addresses for proper packet routing and delivery.
Four-Bit Differentiated Services Field
In the IPv4 header, the Differentiated Services (DS) field, which replaced the original Type of Service (ToS) field, includes a 4-bit Differentiated Services Codepoint (DSCP). This 4-bit value is crucial for Quality of Service (QoS) implementations in networks.
The 4-bit DSCP allows for 16 distinct service classes, enabling network administrators to prioritize different types of traffic. This granularity in traffic classification and prioritization is essential for managing complex network environments effectively.
Four-Bit Fragment Offset Field
The IPv4 header includes a 13-bit Fragment Offset field, which is used when an IP packet needs to be fragmented. While the field itself is 13 bits, it's measured in units of 8 bytes (64 bits), which is equivalent to 4 16-bit words.
This 4-word alignment in the Fragment Offset field ensures efficient processing of fragmented packets by network devices. It allows routers and hosts to quickly reassemble fragmented packets by aligning fragments on 32-bit boundaries.
Four-Byte MTU in IPv4
The Maximum Transmission Unit (MTU) in IPv4 networks is typically set to 1500 bytes. This value is often represented as a 4-byte (32-bit) field in network configurations and protocols like ICMP.
The 4-byte representation of MTU allows for values up to 4,294,967,295 bytes, far exceeding practical MTU sizes. However, this 32-bit field ensures compatibility with potential future network technologies that might support larger packet sizes, maintaining the theme of "4" in IPv4-related concepts.
Four Levels of NAT
1
Static NAT
One-to-one mapping between private and public IP addresses.
2
Dynamic NAT
Many-to-many mapping from a pool of private to public addresses.
3
PAT (Port Address Translation)
Many-to-one mapping, using ports to distinguish connections.
4
Twice NAT
Translates both source and destination addresses in certain scenarios.
Four-Layer TCP/IP Model
While the OSI model has seven layers, the TCP/IP model, which is more commonly used in practical networking, has four layers. This four-layer model aligns well with the IPv4 addressing scheme:
  1. Network Access Layer (corresponds to Physical and Data Link in OSI)
  1. Internet Layer (where IP addressing occurs)
  1. Transport Layer (TCP and UDP)
  1. Application Layer (combines Session, Presentation, and Application from OSI)
This four-layer model simplifies network understanding while still covering all essential aspects of data communication.
Four Basic Network Devices
In IPv4 networking, four fundamental types of devices are commonly used:
  • Hubs (Layer 1) - Simple signal repeaters
  • Switches (Layer 2) - Intelligent frame forwarding based on MAC addresses
  • Routers (Layer 3) - IP packet forwarding between different networks
  • Firewalls (Layer 3/4+) - Security devices filtering traffic based on various criteria
Each of these devices plays a crucial role in managing and securing IPv4 networks, from simple connectivity to complex routing and security implementations.
Four Common IPv4 Routing Protocols
OSPF
Open Shortest Path First, a link-state routing protocol widely used in large enterprise networks.
BGP
Border Gateway Protocol, the core routing protocol of the Internet, used for inter-AS routing.
RIP
Routing Information Protocol, a distance-vector protocol suitable for small to medium-sized networks.
EIGRP
Enhanced Interior Gateway Routing Protocol, a Cisco proprietary protocol combining features of distance-vector and link-state protocols.
Four Types of ICMP Messages
ICMP (Internet Control Message Protocol) is crucial for IPv4 network diagnostics and error reporting. Four common types of ICMP messages are:
  1. Echo Request and Reply (used by ping)
  1. Destination Unreachable
  1. Time Exceeded (used in traceroute)
  1. Redirect (for optimizing routing paths)
These ICMP message types help in troubleshooting connectivity issues, identifying network problems, and optimizing network performance in IPv4 environments.
Four Key IPv4 Header Fields
The IPv4 header contains several fields, but four are particularly significant for basic packet forwarding:
  • Version (4 bits, always set to 4 for IPv4)
  • Header Length (4 bits, specifying the number of 32-bit words in the header)
  • Total Length (16 bits, indicating the entire packet size)
  • Time to Live (8 bits, preventing infinite loops in routing)
These fields are essential for routers to process and forward IPv4 packets correctly, ensuring efficient and accurate data transmission across networks.
Four Stages of DHCP
1
DHCP Discover
Client broadcasts a request for an IP address.
2
DHCP Offer
Server responds with an available IP address.
3
DHCP Request
Client requests the offered IP address.
4
DHCP Acknowledge
Server confirms the IP address assignment.
Four Types of ARP Messages
Address Resolution Protocol (ARP) is crucial for mapping IPv4 addresses to MAC addresses. Four types of ARP messages are commonly used:
  1. ARP Request (broadcast to find the MAC address for an IP)
  1. ARP Reply (unicast response with the requested MAC address)
  1. Reverse ARP Request (RARP, to find an IP address for a known MAC)
  1. Gratuitous ARP (unsolicited ARP reply, used to update ARP caches)
These ARP message types ensure efficient communication between devices on IPv4 networks by maintaining accurate IP-to-MAC address mappings.
Four Common IPv4 Subnetting Scenarios
Four IPv4 Address Conservation Techniques
As the IPv4 address space became depleted, several techniques were developed to conserve addresses:
  1. Network Address Translation (NAT)
  1. Classless Inter-Domain Routing (CIDR)
  1. Private IP addressing (RFC 1918)
  1. Variable Length Subnet Masking (VLSM)
These techniques have been crucial in extending the lifespan of IPv4 addressing, allowing continued growth of the Internet despite the limited address space.
Four Stages of IP Packet Processing
1
Receiving
The packet is received at the network interface and passed to the IP layer.
2
Decapsulation
The IP header is examined and removed, revealing the payload.
3
Routing Decision
The destination IP is checked against the routing table to determine the next hop.
4
Forwarding
The packet is encapsulated with a new header and sent to the next hop or local process.
Four Key IPv4 Security Concerns
IPv4 networks face several security challenges, with four primary concerns being:
  • IP Spoofing: Attackers forge source IP addresses to bypass security measures
  • ARP Poisoning: Malicious mapping of IP to MAC addresses to intercept traffic
  • DHCP Starvation: Exhausting available IP addresses to deny service to legitimate users
  • Routing Table Poisoning: Injecting false routes to redirect traffic maliciously
Addressing these concerns requires a combination of network security best practices, proper configuration, and ongoing monitoring of IPv4 networks.
Four IPv4 QoS Mechanisms
Quality of Service (QoS) in IPv4 networks is crucial for managing traffic priorities. Four key QoS mechanisms are:
  1. DiffServ (Differentiated Services): Using the DSCP field in the IP header
  1. IntServ (Integrated Services): Resource reservation for specific flows
  1. Traffic Shaping: Controlling the rate of data transmission
  1. Priority Queuing: Assigning different priorities to different types of traffic
These mechanisms allow network administrators to ensure critical applications receive necessary bandwidth and low latency, even in congested network conditions.
The Future Beyond IPv4
While IPv4 has been the backbone of internet addressing for decades, its limitations have led to the development of IPv6. The transition from IPv4 to IPv6 marks a significant shift from 32-bit to 128-bit addresses, vastly expanding the available address space. However, the legacy of IPv4 and its four-octet structure continues to influence network design and management practices. As we move forward, understanding both IPv4 and IPv6 becomes crucial for network professionals, ensuring smooth operations in mixed environments and facilitating the gradual transition to the next generation of internet protocols.