IP Addressing Explained: IPv4, IPv6, and Subnetting Basics


Every device on a network needs an IP address to communicate — it’s like the phone number or street address of your computer, phone, or smart device. Understanding IP addressing is essential for anyone starting out in networking, especially if you’re preparing for CCNA or CompTIA Network+ certifications.
This guide covers the basics of IPv4, IPv6, and subnetting to help you grasp these critical concepts.
What is an IP Address?
An IP (Internet Protocol) address is a unique identifier assigned to each device on a network, allowing it to send and receive data.
There are two main versions in use today:
- IPv4 (Internet Protocol version 4)
- IPv6 (Internet Protocol version 6)
IPv4 Basics
IPv4 is the most widely used version of IP.
- Format: Four numbers separated by dots (called “dotted decimal”), e.g.,
192.168.1.1
- Size: 32-bit address space
- Range: 0.0.0.0 to 255.255.255.255
- Total addresses: ~4.3 billion
IPv4 addresses are divided into:
- Network portion: Identifies the network.
- Host portion: Identifies the specific device.
Example:
192.168.1.1/24
→192.168.1
is the network,.1
is the host.
IPv4 Address Classes (historical, but useful to know):
- Class A: 1.0.0.0 – 126.0.0.0
- Class B: 128.0.0.0 – 191.255.0.0
- Class C: 192.0.0.0 – 223.255.255.0
IPv6 Basics
IPv6 was created to solve IPv4 address exhaustion.
- Format: Eight groups of four hexadecimal digits, e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334
- Size: 128-bit address space
- Total addresses: ~340 undecillion (enough for every grain of sand on Earth and beyond)
Key IPv6 improvements:
- Larger address space
- Built-in security (IPSec)
- Simplified routing and configuration
What is Subnetting?
Subnetting is the process of dividing a larger network into smaller, more efficient subnetworks (subnets).
Benefits of subnetting:
- Reduces broadcast traffic
- Improves security and performance
- Makes IP address management easier
IPv4 Subnetting Basics
An IPv4 address is often combined with a subnet mask or CIDR notation:
- Subnet mask:
255.255.255.0
- CIDR notation:
/24
Example:
192.168.1.0/24
→ 256 addresses (254 usable for hosts)192.168.1.0/26
→ 64 addresses (62 usable for hosts)
Subnetting determines:
- Network address
- Broadcast address
- Range of usable host addresses
Simple Subnetting Example
Given 192.168.1.0/24
, if you split it into four /26 subnets, you get:
192.168.1.0/26
→ 192.168.1.1–192.168.1.62192.168.1.64/26
→ 192.168.1.65–192.168.1.126192.168.1.128/26
→ 192.168.1.129–192.168.1.190192.168.1.192/26
→ 192.168.1.193–192.168.1.254
IPv6 and Subnetting
IPv6 uses prefix lengths instead of subnet masks:
- Example:
2001:db8::/64
IPv6 has a huge address space, so subnetting is often used for organizing networks, not conserving addresses.
Why IP Addressing Matters
- Ensures devices can communicate properly
- Enables efficient routing of data
- Supports network design, scaling, and security
Conclusion
Understanding IPv4, IPv6, and subnetting is foundational for anyone working in networking. Whether configuring a home router or designing a large enterprise network, solid IP addressing knowledge helps ensure smooth, secure, and scalable communication.