Day 4: IP Addressing and Subnetting
π Date: 3-2-2025
The Internet Protocol (IP) Addressing system is the foundation of modern networking, enabling devices to communicate over the Internet and private networks. Whether youβre streaming a video, sending an email, or browsing a website, IP addressing ensures that data reaches the correct destination.
In this article, we'll explore IPv4 vs. IPv6, Public vs. Private IPs, the basics of subnetting, and how CIDR notation helps manage IP networks efficiently.
What is an IP Address? (IPv4 vs. IPv6)
An IP address is a unique numerical identifier assigned to devices for communication over a network. There are two versions in use today:
1οΈβ£ IPv4 (Internet Protocol version 4)
β Format: 32-bit address (e.g., 192.168.1.1)
β Total Addresses: ~4.3 billion
β Uses Dotted Decimal Notation
β Example: 192.168.0.1
β Limitation: Due to the rapid growth of the Internet, IPv4 addresses are running out.
2οΈβ£ IPv6 (Internet Protocol version 6)
β Format: 128-bit address (e.g., 2001:db8::1)
β Total Addresses: 340 undecillion (virtually unlimited)
β Uses Hexadecimal Notation
β Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
β Advantage: Provides a much larger address space and improved security features.
π Why IPv6? The demand for unique IP addresses is growing with IoT devices, cloud computing, and global digital expansion. IPv6 ensures the Internet can scale without address shortages.
Public vs. Private IP Addresses
IP addresses are categorized into public and private based on their accessibility on the Internet.
Public IP Address
β Assigned by Internet Service Providers (ISPs)
β Unique across the Internet
β Used to identify devices globally
β Example: 8.8.8.8 (Googleβs DNS Server)
Private IP Address
β Used within local networks (LANs)
β Not routable on the Internet
β Helps conserve public IPs
β Examples:
- Class A: 10.0.0.0 β 10.255.255.255
- Class B: 172.16.0.0 β 172.31.255.255
- Class C: 192.168.0.0 β 192.168.255.255
π‘ Key Point: Private IPs require Network Address Translation (NAT) to communicate with the Internet.
Introduction to Subnetting and Why Itβs Important
Subnetting is the process of dividing a larger IP network into smaller, more manageable sub-networks (subnets). It improves network efficiency, security, and performance.
β Why Subnetting?
- Efficiently utilizes IP addresses by reducing waste.
- Enhances network security by isolating sensitive parts of the network.
- Reduces network congestion by segmenting traffic.
- Enables better network management and scalability.
How to Calculate Subnets (CIDR Notation)
CIDR (Classless Inter-Domain Routing) is a method used to allocate IP addresses more efficiently.
Understanding CIDR Notation
CIDR uses a slash (/) followed by the number of bits used for the network portion. For example:
- 192.168.1.0/24 β 24 bits for network, 8 bits for hosts
- 10.0.0.0/16 β 16 bits for network, 16 bits for hosts
Subnet Calculation Example
If you have 192.168.1.0/24 and want to create 4 subnets:
- Formula: 2^x β₯ Number of subnets
- x = Number of bits borrowed from host portion
- 2Β² = 4 β Borrow 2 bits β Subnet mask: /26 (255.255.255.192)
Resulting subnets:
| Subnet | Network Address | Usable IPs | Broadcast Address |
|--------|----------------|-----------|------------------|
| 1 | 192.168.1.0/26 | 192.168.1.1 - 192.168.1.62 | 192.168.1.63 |
| 2 | 192.168.1.64/26 | 192.168.1.65 - 192.168.1.126 | 192.168.1.127 |
| 3 | 192.168.1.128/26 | 192.168.1.129 - 192.168.1.190 | 192.168.1.191 |
| 4 | 192.168.1.192/26 | 192.168.1.193 - 192.168.1.254 | 192.168.1.255 |
π‘ Key Takeaway: Subnetting allows for better resource allocation and network organization.
Conclusion
Understanding IP addressing and subnetting is essential for network engineers, system administrators, and developers.
β IPv4 vs. IPv6 β IPv6 solves the address exhaustion issue.
β Public vs. Private IPs β Private IPs need NAT for Internet access.
β Subnetting β Helps optimize and secure networks.
β CIDR Notation β Efficient way to manage IP allocations.
π Coming up in Day 5: We'll dive into Routing & Packet Forwardingβa crucial concept for how data moves across networks! Stay tuned. π
Top comments (0)