IPv4 Addressing
Classful addressing, subnetting, Variable Length Subnet Masking (VLSM), and CIDR.
What is an IP Address? The Internet's Postal System
Imagine the internet as a global city. For a letter (a packet of data) to get from your house to a friend's, it needs a precise address. In the world of computer networks, this unique identifier is the IP Address (Internet Protocol Address). Every device connected to a network that uses the Internet Protocol (computers, smartphones, servers, smart TVs) needs an IP address to communicate, send, and receive data.
IPv4, which stands for Internet Protocol version 4, was the first widely used version and remains a foundational technology of the internet. It provides the logical addressing system that directs traffic across interconnected networks.
The Structure of an IPv4 Address
An IPv4 address is a 32-bit number. Because computers work with binary, the address is fundamentally a sequence of 32 ones and zeros. To make these addresses easier for humans to read and work with, this 32-bit sequence is broken down into four 8-bit sections.
Octets and Dotted-Decimal Notation
- Bits and Octets: The 32 bits are divided into four groups of eight bits. Each 8-bit group is called an .
- Dotted-Decimal Notation: Each octet is converted from its binary value to a decimal number (from 0 to 255). These four decimal numbers are then written out, separated by dots. This format is known as "dotted-decimal notation."
Example: From Binary to Decimal
Consider the IP address for a local router: 192.168.1.1.
The full 32-bit binary representation is: 11000000.10101000.00000001.00000001
Classful Addressing: The Original Blueprint
Imagine the internet as a global city. For a letter (a packet of data) to get from your house to a friend's, it needs a precise address. In the world of computer networks, this unique identifier is the IP Address (Internet Protocol Address). Every device connected to a network that uses the Internet Protocol (computers, smartphones, servers, smart TVs) needs an IP address to communicate, send, and receive data.
Every IP address has two parts:
- Network ID: The part that identifies the specific network a device belongs to (like a street name). All devices on the same network share the same network ID.
- Host ID: The part that identifies a unique device on that network (like a house number).
Class A: For Giant Networks
Leading Bits: The first bit of the first octet is always 0.
Address Range: 0.0.0.0 to 127.255.255.255.
Network/Host Split: The first octet is the Network ID, and the last three octets are the Host ID (8 bits network, 24 bits host).
Number of Networks: networks. (Network 0 and 127 are reserved).
Hosts per Network: hosts. (We subtract 2 because one address identifies the network itself and another is the broadcast address).
Default Subnet Mask: 255.0.0.0.
Use Case: Intended for a few very large organizations, like major tech companies or government bodies. A famous example is IBM being assigned the network.
Class B: For Medium to Large Networks
Leading Bits: The first two bits are always 10.
Address Range: 128.0.0.0 to 191.255.255.255.
Network/Host Split: The first two octets are the Network ID, and the last two are the Host ID (16 bits network, 16 bits host).
Number of Networks: networks.
Hosts per Network: hosts.
Default Subnet Mask: 255.255.0.0.
Use Case: Designed for universities, large corporations, and ISPs. For example, a large university might have been assigned a Class B network to provide addresses to all its departments and student devices.
Class C: For Small Networks
Leading Bits: The first three bits are always 110.
Address Range: 192.0.0.0 to 223.255.255.255.
Network/Host Split: The first three octets are the Network ID, and the final octet is the Host ID (24 bits network, 8 bits host).
Number of Networks: networks.
Hosts per Network: hosts.
Default Subnet Mask: 255.255.255.0.
Use Case: The most common class, intended for small businesses and home networks.
Classes D and E: Special Purpose
Class D (Multicast): Range 224.0.0.0 to 239.255.255.255. Leading bits are 1110. These addresses are not assigned to individual hosts but are used for .
Class E (Experimental): Range 240.0.0.0 to 255.255.255.255. Leading bits are 1111. This block of addresses was reserved for future or experimental use and is not used on the public internet.
The Problems of Classful Addressing
While simple in concept, the rigid structure of classful addressing quickly proved to be highly inefficient and unsustainable for the growing internet. The main issues were:
- Massive Address Waste: The fixed block sizes were extremely wasteful. For example, a company with 300 employees needed more than a Class C network (254 hosts), so it had to be assigned an entire Class B network. This provided them with 65,534 host addresses, meaning over 65,000 addresses () were wasted and unavailable for anyone else.
- Rapid Address Exhaustion: This inefficiency led to the rapid depletion of available IPv4 addresses, particularly in the most desirable Class A and B ranges. It became clear that the entire IPv4 address space would run out much faster than anticipated.
- Large Routing Tables: In a classful world, routers on the internet backbone had to maintain a separate entry for every single network. As the number of Class C networks exploded, these routing tables grew to an unmanageable size, consuming memory and processing power.
The conclusion was clear: classful addressing had become unworkable due to its wastefulness and scalability limitations. This crisis spurred the development of more flexible addressing and routing techniques to save the internet from address exhaustion. These modern solutions, which will be covered in later topics, include subnetting, Variable Length Subnet Masking (VLSM), and ultimately Classless Inter-Domain Routing (CIDR).