The original version of IP, IPv4 is still very much in-use and alive across the globe. Addresses are 32 bits long, with groups of eight bits (octets) shown divided by a period. IPv4 address include "192.168.1.1", "126.96.36.199", "127.0.0.1", and many more. The total range of IPv4 addresses is shown below:
0.0.0.0 - 255.255.255.255
All IPv4 addresses in the world are somewhere within that range. Each subnet is a "slice" of the much larger address space.
- Public Addresses
- Private Addresses
- Loopback Addresses
- APIPA Addresses
- Multicast Addresses
- Broadcast Addresses
- Classful Addresses
Most IPv4 addresses are publicly-routable, typical addresses. They can be used on devices like routers to send data across public networks like the internet. Putting a public address on an internet-facing resource like a web or mail server makes it available to users in other networks. Examples of public addresses include "188.8.131.52", "184.108.40.206", and "220.127.116.11".
Most ISP subscribers have a single public address assigned on their router, and private addresses are used internally for LAN devices like printers and desktops.
Special address blocks inside the full range have been set aside for internal use by RFC-1918. These blocks include the following:
|Network Prefix||Address Range||Total Addresses|
|10/8||10.0.0.0 - 10.255.255.255||16,777,216|
|172.16/12||172.16.0.0 - 172.31.255.255||1,048,576|
|192.168/16||192.168.0.0 - 192.168.255.255||65,536|
These addresses can be used in private networks like homes or businesses, and they don't have to be registered. Unfortunately, these private blocks aren't routable on the internet, so a mechanism like NAT must be used to translate connections from private to public addresses.
The use of private addresses slowed the exhaustion of IPv4 addresses, but it's reached the point where IPv6 adoption is becoming a requirement.
The 127.0.0.0/8 network is reserved for local or "Loopback" interfaces. Typically 127.0.0.1 is assigned to the first network interface. Other 127.0.0.0/8 addresses can be assigned to other loopback addresses as needed. The 127.0.0.0/8 address block is routable, but most ISPs blackhole this range at the edge of their network.
RFC-3927 defined the Automatic Private IP Addressing (APIPA) block for use as Link-Local addresses. The 169.254.0.0/16 network is reserved for APIPA. DHCP clients that cannot get an address lease will automatically assign themselves an APIPA address. While using the APIPA address block for internal networking is possible, it is not recommended. Some organizations monitor networks for the presence of 169.254.X.X traffic, which means hosts are failing to auto-configure (DHCP, PXE-Boot, etc.)
Multicast addresses are set aside for special multicast (one-to-many) traffic. Some of these addresses include the following:
|18.104.22.168||All OSPF Routers|
The 255.255.255.255 address is set aside for broadcast traffic on the local network. Anything sent to this address is received by all hosts, but not routed from one network to another.
Early in the history of IPv4, address blocks were broken up into classes with different, static sizes. When IP addresses were assigned to organizations, they were in one class or another depending on how many hosts their network had. Routers and routing protocols only worked with addresses in these monolithic classes. The following classes were defined historically:
|Class||Address Range||Block Size (host bits)||Addresses||Usage|
|Class A||0.0.0.0 - 127.255.255.255||24||16,777,216||Large networks|
|Class B||22.214.171.124 - 126.96.36.199||16||65,536||Medium networks|
|Class C||192.0.0.0 - 188.8.131.52||8||256||Small networks|
|Class D||184.108.40.206 - 220.127.116.11||--||--||Multicast|
|Class E||240.0.0.0 - 255.255.255.255||--||--||Reserved|
As IPv4 addresses were rapidly consumed with more companies and individuals coming online, large classful blocks could no longer be assigned. Classless assignment of IPv4 addresses is now standard across the globe, with subscribers only getting as many public IP addresses as they can provide justification for.