Your Gateway to a Career in Network Engineering
IP Addressing: The Foundation of Network Communication
This section covers the versions of IP, the traditional address classes, special-use ranges, and the essential techniques used to manage and organize IP addresses: subnetting and supernetting.
IPv4 vs. IPv6: The Old and The New
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Size | 32-bit | 128-bit |
| Address Format | Dot-Decimal (192.168.1.1) | Hexadecimal (2001:db8::8a2e:370:7334) |
| Total Addresses | ~4.3 Billion | ~340 Undecillion |
IPv4 Address Classes & Special-Use Ranges
Originally, IPv4 addresses were divided into "classes" (A, B, C, D, E). This system, known as classful addressing, is now considered obsolete and has been replaced by more flexible Classless Inter-Domain Routing (CIDR). However, understanding classes is still important for context, especially as they define the original private IP ranges.
Traditional IPv4 Address Classes
| Class | First Octet Range | Default Subnet Mask | Primary Use |
|---|---|---|---|
| Class A | 1 - 126 | 255.0.0.0 (/8) | Very large networks. |
| Class B | 128 - 191 | 255.255.0.0 (/16) | Medium to large networks. |
| Class C | 192 - 223 | 255.255.255.0 (/24) | Small networks. |
| Class D | 224 - 239 | N/A | Reserved for Multicast traffic. |
| Class E | 240 - 255 | N/A | Reserved for experimental use. |
Major Reserved and Special-Purpose Addresses
| Address / Range | Common Name | Purpose |
|---|---|---|
0.0.0.0 | Default Route | Represents the "route to anywhere." |
127.0.0.0 /8 | Loopback Address | Points to the local host (e.g., 127.0.0.1). |
169.254.0.0 /16 | APIPA / Link-Local | Auto-assigned address when a DHCP server is unreachable. |
10.0.0.0/8172.16.0.0/12192.168.0.0/16 | Private Addresses | Reserved for use within private networks (Not internet-routable). |
Fundamental Address Rules
Within any network, the host bits determine the address type:
- All Host Bits are 0: Network Address (identifies the network).
- All Host Bits are 1: Broadcast Address (targets all devices on the network).
- Mix of 0s and 1s: Valid, assignable IP Address for a device.
Subnetting: Dividing a Network
Subnetting is the process of taking one large network and breaking it down into multiple smaller subnets by "borrowing" bits from the Host portion of an IP address.
Example 1: Subnetting a /24 Network into 2 Subnets (/25)
Step 1: Identify Goal & Borrow Bits
We start with the network 192.168.1.0/24. To create 2 subnets, we need to borrow 1 bit from the host portion (since 21 = 2).
Step 2: Define the New Subnet Mask
The original mask is /24. We add the 1 borrowed bit: 24 + 1 = 25. The new mask is /25 or 255.255.255.128.
Step 3: List Subnet Combinations
We list the combinations for the single borrowed bit (0 and 1).
Subnet 1: 11000000.10101000.00000001.00000000 Subnet 2: 11000000.10101000.00000001.10000000
Step 4: Convert to Decimal
| Subnet | Network Address | Broadcast Address |
|---|---|---|
| 1 | 192.168.1.0 /25 | 192.168.1.127 |
| 2 | 192.168.1.128 /25 | 192.168.1.255 |
Example 2: Subnetting a /24 Network into 4 Subnets (/26)
Step 1: Identify Goal & Borrow Bits
We start with network 192.168.10.0/24. To create 4 subnets, we need to borrow 2 bits (since 22 = 4).
Step 2: Define the New Subnet Mask
The original mask is /24. We add the 2 borrowed bits: 24 + 2 = 26. The new mask is /26 or 255.255.255.192.
Step 3: List Subnet Combinations
We list the combinations for the two borrowed bits (00, 01, 10, 11).
Subnet 1: 11000000.10101000.00001010.00000000 Subnet 2: 11000000.10101000.00001010.01000000 Subnet 3: 11000000.10101000.00001010.10000000 Subnet 4: 11000000.10101000.00001010.11000000
Step 4: Convert to Decimal
| Subnet | Network Address | Broadcast Address |
|---|---|---|
| 1 | 192.168.10.0 /26 | 192.168.10.63 |
| 2 | 192.168.10.64 /26 | 192.168.10.127 |
| 3 | 192.168.10.128 /26 | 192.168.10.191 |
| 4 | 192.168.10.192 /26 | 192.168.10.255 |
Supernetting (Route Summarization): Combining Networks
Supernetting is the opposite of subnetting. Its purpose is to combine multiple smaller networks into a single summary route to make routing tables smaller and more efficient.
A Step-by-Step Supernetting Example
Let's reverse the process and summarize the four /26 networks we just created back into a single route.
Step 1: Find the Common Prefix
By listing the networks in binary, we see that the first 24 bits are identical across all four networks. This is our common prefix.
Step 2: Calculate the Summary Route
The summary route is the common prefix, with the remaining bits set to zero. The mask is the length of the common prefix.
The result is 192.168.10.0 /24.