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:

  1. Network ID โ€“ Identifies the network

  2. 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)

ClassStarting BitsRange (1st Octet)Default Subnet MaskUse
A00 - 127255.0.0.0Large networks
B10128 โ€“ 191255.255.0.0Medium networks
C110192 โ€“ 223255.255.255.0Small networks
D1110224 โ€“ 239N/AMulticast
E1111240 โ€“ 255N/AExperimental

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 to 126.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:

ClassPrivate Range
A10.0.0.0 โ€“ 10.255.255.255
B172.16.0.0 โ€“ 172.31.255.255
C192.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.0

  • Formulas:

    • 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 communication

  • Multicast: 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

ConceptIPv4IPv6
Address Length32 bits128 bits
FormatDecimal (4 octets)Hexadecimal (8 blocks)
BroadcastYesNo
NATRequiredNot needed
Header Size20 bytes40 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?

0
Subscribe to my newsletter

Read articles from Nakshatra Sirohi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nakshatra Sirohi
Nakshatra Sirohi