You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
IP addressing is the system that assigns a unique identifier to every device on a network. Subnetting is the practice of dividing a large network into smaller, more manageable sub-networks. These concepts are fundamental to network design and administration.
An IPv4 address is a 32-bit number, typically written in dotted decimal notation as four octets:
192.168.1.100
Binary: 11000000.10101000.00000001.01100100
Each octet can range from 0 to 255 (8 bits each).
Every IP address has two parts:
| Part | Purpose |
|---|---|
| Network portion | Identifies which network the device belongs to |
| Host portion | Identifies the specific device on that network |
The subnet mask determines where the network portion ends and the host portion begins.
| Subnet Mask | CIDR | Network Bits | Host Bits | Usable Hosts |
|---|---|---|---|---|
| 255.0.0.0 | /8 | 8 | 24 | 16,777,214 |
| 255.255.0.0 | /16 | 16 | 16 | 65,534 |
| 255.255.255.0 | /24 | 24 | 8 | 254 |
| 255.255.255.128 | /25 | 25 | 7 | 126 |
| 255.255.255.192 | /26 | 26 | 6 | 62 |
| 255.255.255.224 | /27 | 27 | 5 | 30 |
| 255.255.255.240 | /28 | 28 | 4 | 14 |
| 255.255.255.252 | /30 | 30 | 2 | 2 |
Formula: Usable hosts = 2^(host bits) - 2 (subtract the network address and broadcast address)
The original classful system divided addresses into classes:
| Class | Range | Default Mask | Networks | Hosts per Network |
|---|---|---|---|---|
| A | 1.0.0.0 – 126.255.255.255 | /8 | 126 | 16,777,214 |
| B | 128.0.0.0 – 191.255.255.255 | /16 | 16,384 | 65,534 |
| C | 192.0.0.0 – 223.255.255.255 | /24 | 2,097,152 | 254 |
| D | 224.0.0.0 – 239.255.255.255 | — | Multicast | — |
| E | 240.0.0.0 – 255.255.255.255 | — | Experimental | — |
Note: Classful addressing has been replaced by CIDR (Classless Inter-Domain Routing), which allows subnet masks of any length for more efficient allocation.
| Type | Purpose | Ranges |
|---|---|---|
| Private | Used within internal networks (not routable on the internet) | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 |
| Public | Globally unique, routable on the internet | Everything else (assigned by ISPs/RIRs) |
Devices on a private network access the internet through NAT (Network Address Translation), which maps private addresses to a public address.
| Address | Purpose |
|---|---|
| 127.0.0.1 | Loopback (localhost) — always refers to the local machine |
| 0.0.0.0 | Default route or "any" address |
| 255.255.255.255 | Limited broadcast (local network only) |
| 169.254.x.x | Link-local (APIPA) — auto-assigned when DHCP fails |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.