Cyber Services / All lessons / Diploma in Network Technology / IP Addressing & Subnetting

IP Addressing & Subnetting

Module 4 of 36 · 4 min read · Free to read

MODULES ↓ Command blocks have a COPY button

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

FeatureIPv4IPv6
Address Size32-bit128-bit
Address FormatDot-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

ClassFirst Octet RangeDefault Subnet MaskPrimary Use
Class A1 - 126255.0.0.0 (/8)Very large networks.
Class B128 - 191255.255.0.0 (/16)Medium to large networks.
Class C192 - 223255.255.255.0 (/24)Small networks.
Class D224 - 239N/AReserved for Multicast traffic.
Class E240 - 255N/AReserved for experimental use.

Major Reserved and Special-Purpose Addresses

Address / RangeCommon NamePurpose
0.0.0.0Default RouteRepresents the "route to anywhere."
127.0.0.0 /8Loopback AddressPoints to the local host (e.g., 127.0.0.1).
169.254.0.0 /16APIPA / Link-LocalAuto-assigned address when a DHCP server is unreachable.
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
Private AddressesReserved 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
SubnetNetwork AddressBroadcast Address
1192.168.1.0 /25192.168.1.127
2192.168.1.128 /25192.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
SubnetNetwork AddressBroadcast Address
1192.168.10.0 /26192.168.10.63
2192.168.10.64 /26192.168.10.127
3192.168.10.128 /26192.168.10.191
4192.168.10.192 /26192.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.

Modules (36) ← Diploma in Network Technology