Private and Public IPv4 Addresses
The problem with IPv4 is its limited address space, consisting of only 32 bits, which results in a finite number of unique IP addresses (about 4.3 billion). With the proliferation of devices connected to the internet, this address exhaustion is a significant issue.
To address this, private and public IP addresses were created. Private IPs are reserved for use within private networks, such as homes or organizations, and they're not routable on the public internet. The private IP address ranges for each class are:
- Class A: 10.0.0.0 to 10.255.255.255
- Class B: 172.16.0.0 to 172.31.255.255
- Class C: 192.168.0.0 to 192.168.255.255
Public IPs, on the other hand, are globally unique and used for communication on internet. Public IP address ranges are managed by Regional Internet Registries (RIRs) under the oversight of the Internet Assigned Numbers Authority (IANA). IANA allocates blocks of public IPs to RIRs, who, in turn, distribute them to internet service providers (ISPs) and organizations.
IANA ensures the coordinated allocation of global IP resources, while RIRs manage and allocate public IP address space regionally. This system helps efficiently manage the remaining IPv4 addresses. In IPv4 addressing, the public IP address ranges for Class A, B, and C are as follows:
- Class A: The public IP address range for class A addresses starts from 1.0.0.0 and goes up to 127.255.255.255, with exclusion of the private range. However, a significant portion of this range is reserved for special purposes such as 127.0.0.0/8 (loopback), so only IPs up to 126.255.255.255 are usable.
- Class B: The public IP address range for class B addresses begins with 128.0.0.0 and goes up to 191.255.255.255, excluding the private range.
- Class C: The public IP address range for class C addresses ranges from 192.0.0.0 to 223.255.255.255, excluding the private range.
Note: It's important to note that due to the exhaustion of IPv4 addresses, the availability of new, unused addresses in these ranges is extremely limited, and many organizations have transitioned to IPv6 to address the scarcity of IPv4 addresses.
Reserved IPv4 Addresses
Unlike IP addresses that can be assigned to individual devices within a network, certain addresses are reserved and serve specific purposes, like identifying networks or broadcasting data. Reserved IP addresses ensure efficient network management and communication, and some of them are:
- Network Address: This is the first IP address in the subnet's range, typically ending with “.0” in the last octet. It represents the entire network and is used for routing and identification, not individual device assignments.
- Local Broadcast Address: This IP address (255.255.255.255) broadcasts data to all devices within a specific network segment. It's useful for network-wide communication, discovering local devices, and communicating with a DHCP server. The local broadcast is never routed beyond the local network or subnet.
- Directed Broadcast Address: This IP address is a broadcast address of a specific subnet within a network, such as 192.168.1.255 for the 192.168.1.0/24 subnet. When sending data to this IP, it enables communication with all devices in a particular subnet.
- Local Loopback Address: This IP address (127.0.0.1) is reserved for internal testing and communication within the device. It allows software to test network functionality without transmitting data on the actual network.
- All Zeros Address: This IP address (0.0.0.0) serves various purposes, such as representing the default route or indicating an unknown or uninitialized IP address on a device.