IP Address Formats: Understanding IPv4 and IPv6 Addressing

Learn about IPv4 and IPv6 IP address formats. This guide explains the structure of IPv4 addresses (dotted decimal notation), their classful and classless addressing schemes, and the transition to the longer, more efficient IPv6 addresses.



IP Address Formats: IPv4 and IPv6

Introduction to IP Addresses

Every device connected to a network needs a unique IP (Internet Protocol) address to communicate. IP addresses are numerical labels that identify devices and allow data to be routed across networks. There are two main versions of IP addressing: IPv4 and IPv6.

IPv4 Addresses

IPv4 (Internet Protocol version 4) uses a 32-bit address, typically written as four decimal numbers (octets) separated by dots (e.g., 192.168.1.1). Each octet ranges from 0 to 255.

Early IP Address Classes:

Originally, IPv4 addresses were divided into five classes (A, B, C, D, E). Classes A, B, and C were the most commonly used. Each class had a different number of bits allocated for the network portion and the host portion of the address.

Class First Bits Network Bits Host Bits Address Range
A 0 8 24 0.0.0.0 - 127.255.255.255
B 10 16 16 128.0.0.0 - 191.255.255.255
C 110 24 8 192.0.0.0 - 223.255.255.255
D 1110 - - 224.0.0.0 - 239.255.255.255 (Multicast)
E 1111 - - 240.0.0.0 - 255.255.255.255 (Reserved)

IPv4 Address Structure:

An IPv4 address is 32 bits, divided into four 8-bit octets. Each octet is represented as a decimal number (0-255).

IPv6 Addresses

IPv6 (Internet Protocol version 6) addresses the limitations of IPv4's limited address space. IPv6 uses 128-bit addresses, represented in hexadecimal format and divided into eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Leading zeros can be omitted, and consecutive zeros can be compressed using "::" (double colon) notation.

Subnetting Example (IPv4)

Subnetting divides a network address into smaller subnetworks. Let's say we have a Class A address 11.65.27.1. If we want 6 bits for the subnet, the subnet mask would be 255.255.255.192. Performing a bitwise AND operation between the IP address and the subnet mask gives the subnet address.

Conclusion

IP addresses are fundamental to networking. IPv4, while widely used, has a limited address space. IPv6 addresses this limitation with its vastly larger address space. Understanding IP address formats is crucial for network administration and troubleshooting.