IPv4 and IPv6 Addressing
IPv4 Addressing
Definition: IPv4 (Internet Protocol version 4) is the fourth version of the Internet Protocol (IP). It is the most widely used IP version for connecting devices to the internet.
Format:
- IPv4 addresses are 32-bit numerical labels.
- Represented in decimal format as four octets separated by periods (e.g., 192.168.1.1).
- Each octet can range from 0 to 255.
Classes:
- Class A:
0.0.0.0to127.255.255.255(large networks) - Class B:
128.0.0.0to191.255.255.255(medium-sized networks) - Class C:
192.0.0.0to223.255.255.255(small networks) - Class D:
224.0.0.0to239.255.255.255(multicast) - Class E:
240.0.0.0to255.255.255.255(experimental)
Special Addresses:
- Private Addresses:
- Class A:
10.0.0.0to10.255.255.255 - Class B:
172.16.0.0to172.31.255.255 - Class C:
192.168.0.0to192.168.255.255
- Class A:
- Loopback Address:
127.0.0.1 - Broadcast Address:
255.255.255.255
Limitations:
- Limited address space (about 4.3 billion addresses).
- Exhaustion of available addresses.
IPv6 Addressing
Definition: IPv6 (Internet Protocol version 6) is the successor to IPv4, designed to address the limitations and address exhaustion of IPv4.
Format:
- IPv6 addresses are 128-bit numerical labels.
- Represented in hexadecimal format as eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
- Leading zeros in each group can be omitted, and consecutive groups of zeros can be replaced with “::” (e.g., 2001:db8:85a3::8a2e:370:7334).
Special Addresses:
- Unicast Addresses: Identifies a single interface.
- Global Unicast: Globally unique (e.g., 2000::/3).
- Link-Local: Used within a single network segment (e.g., fe80::/10).
- Multicast Addresses: Identifies multiple interfaces (e.g., ff00::/8).
- Anycast Addresses: Assigned to multiple interfaces, with packets delivered to the nearest one.
- Loopback Address:
::1 - Unique Local Addresses (ULA):
fc00::/7
Advantages:
- Vast address space (2^128 addresses).
- Improved routing efficiency and hierarchical addressing.
- Simplified packet header for better performance.
- Enhanced security features (mandatory IPsec support).
- Auto-configuration capabilities.
Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Length | 32 bits | 128 bits |
| Address Format | Decimal (e.g., 192.168.1.1) | Hexadecimal (e.g., 2001:db8::1) |
| Address Space | ~4.3 billion addresses | Virtually unlimited (2^128 addresses) |
| Header Complexity | More complex | Simplified |
| Configuration | Manual or DHCP | Auto-configuration (stateless) |
| Security | Optional (IPsec) | Mandatory (IPsec) |
IPv4 and IPv6 are both critical for networking, with IPv6 designed to overcome the limitations of IPv4 and ensure the continued growth and scalability of the internet.