Mastering IP Addressing: The Bedrock of Networking


๐ What Is an IP Address?
An IP (Internet Protocol) address is a unique number assigned to each device in a network. It helps devices find and communicate with each other. IP addresses are essential for sending data across networks and are used in both IPv4 and IPv6 systems.
IP addressing operates at Layer 3 (Network Layer) of the OSI Model.
There are two main versions:
IPv4: 32-bit, dotted-decimal format (e.g.,
192.168.1.1
)IPv6: 128-bit, hexadecimal format (e.g.,
2001:0db8:85a3::8a2e:0370:7334
)
๐ For you: How are IPs assigned? Learn about static vs. dynamic (DHCP) allocation.
๐งฑ Anatomy of an IPv4 Address
IPv4 = 32 bits, divided into 4 octets (8 bits each)
Example: 192.168.10.5
โ 11000000.10101000.00001010.00000101
An IPv4 address consists of:
Network ID โ Identifies the network
Host ID โ Identifies the device within that network
The subnet mask determines which bits belong to the network and which to the host.
๐ท๏ธ IPv4 Address Classes (Legacy)
Class | Starting Bits | Range (1st Octet) | Default Subnet Mask | Use |
A | 0 | 0 - 127 | 255.0.0.0 | Large networks |
B | 10 | 128 โ 191 | 255.255.0.0 | Medium networks |
C | 110 | 192 โ 223 | 255.255.255.0 | Small networks |
D | 1110 | 224 โ 239 | N/A | Multicast |
E | 1111 | 240 โ 255 | N/A | Experimental |
Class A Notes:
127.x.x.x
is reserved for loopback; โผ16.77 million IPs are unusable for hosts.0.x.x.x
is reserved for default routing.Assignable IP range:
1.x.x.x
to126.x.x.x
Class D & E Notes:
Not assignable to hosts.
224.x.x.x
are used for multicast.
๐ For you: Study the difference between directed and local broadcast addresses.
๐ Public vs. Private IPs
As per RFC-1918, private addresses are non-routable on the public internet and meant for internal networks. These IPs are reserved by IANA:
Class | Private Range |
A | 10.0.0.0 โ 10.255.255.255 |
B | 172.16.0.0 โ 172.31.255.255 |
C | 192.168.0.0 โ 192.168.255.255 |
To access the internet, NAT (Network Address Translation) is used to translate private IPs to a public address.
๐ For you: Understand how NAT works and where it's configured (router/firewall).
๐ Subnetting in Brief
A subnet is a smaller, manageable part of a larger IP network. Subnetting improves organization, enhances performance, and boosts security. Subnets are created using a subnet mask, which defines which part of the IP is the network and which is the host.
Key Concepts:
Subnet Mask: Indicates division of network and host portions.
CIDR Notation:
/24
= 255.255.255.0Formulas:
Hosts per subnet:
2^H - 2
(H = host bits)Number of subnets:
2^N
(N = subnet bits)
Example:
Given: 192.168.10.0/26
Subnet mask:
255.255.255.192
Host bits: 2 โ
2^2 = 4
โ2 usable IPs
Usable ranges:
192.168.10.0/26
โ192.168.10.1 - 192.168.10.62
Next subnets:
192.168.10.64/26
,192.168.10.128/26
, etc.
๐ For you: Compare classful addressing with CIDR (classless) in real scenarios.
๐ก IPv6 in Brief
IPv6 solves IPv4 exhaustion using 128-bit addresses and eliminates broadcasts in favor of:
Unicast โ one-to-one
Multicast โ one-to-many
Anycast โ one-to-nearest
Example: 2001:0db8:0000:0000:0000:ff00:0042:8329
โ Shortened to 2001:db8::ff00:42:8329
Key IPv6 Types:
Global Unicast: Routable on the internet
Link-Local:
FE80::/10
โ used for local communicationMulticast:
FF00::/8
Loopback:
::1
๐ For you: Explore the differences among unicast, multicast, broadcast, and anycast.
๐ง Real-World Relevance (Beyond the Exam)
Misconfigured IPs often cause network outages.
Subnetting affects routing efficiency and broadcast control.
Proper IP planning avoids conflicts, improves security, and eases troubleshooting.
๐ Summary Table
Concept | IPv4 | IPv6 |
Address Length | 32 bits | 128 bits |
Format | Decimal (4 octets) | Hexadecimal (8 blocks) |
Broadcast | Yes | No |
NAT | Required | Not needed |
Header Size | 20 bytes | 40 bytes |
โ Thought-Provoking Questions
What is the purpose of the loopback address?
How does a loopback address differ from a loopback interface on routers/switches?
Why are broadcasts blocked or dropped by routers and Layer 3 switches?
Why is NAT unnecessary in IPv6?
Subscribe to my newsletter
Read articles from Nakshatra Sirohi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
