Logical Addressing: IPv4 and IPv6
1. Concept of Logical Addressing
While physical (MAC) addresses identify network interface cards on a local link, Logical (IP) Addresses provide a globally unique, hierarchical addressing scheme that enables packets to be routed across heterogeneous internetworks worldwide.
+--------------------------------------------------------------------------+
| LOGICAL ADDRESS COMPARISON |
+------------------------------+-------------------------------------------+
| Feature | IPv4 | IPv6 |
+------------------------------+-------------------------------------------+----------------------------+
| Address Length | 32 bits (4 bytes) | 128 bits (16 bytes) |
| Total Address Space | 2^32 ≈ 4.3 billion | 2^128 ≈ 3.4 x 10^38 |
| Notation | Dotted-decimal: 192.168.1.1 | Hexadecimal: 2001:db8::1 |
| Header Size | 20–60 bytes (variable options) | 40 bytes (fixed) |
| Checksum in Header | Yes (recalculated each hop) | None (eliminated for speed)|
| Address Resolution | ARP (broadcasts) | ICMPv6 Neighbor Discovery |
| Configuration | Manual / DHCP | SLAAC / DHCPv6 |
| Broadcast Support | Yes (Limited & Directed) | None (Replaced by Multicast|
+------------------------------+-------------------------------------------+----------------------------+
2. IPv4 Logical Addressing
An IPv4 Address is a 32-bit number written as four decimal octets separated by periods (192.168.10.1).
A. Classful Addressing:
Originally divided into 5 distinct classes based on the high-order bits:
| Class | Leading Bits | 1st Octet | Default Mask | Usable Networks | Usable Hosts / Network | Purpose |
|---|---|---|---|---|---|---|
| A | 0... |
(/8) |
Huge global networks | |||
| B | 10... |
(/16) |
Medium-to-large enterprises | |||
| C | 110... |
(/24) |
Small local networks | |||
| D | 1110... |
None | — | — | Multicasting | |
| E | 1111... |
None | — | — | Reserved / Experimental |
B. Special IPv4 Addresses:
- Loopback:
127.0.0.1(127.0.0.0/8) for testing the local host protocol stack. - Limited Broadcast:
255.255.255.255(floods local physical wire; stopped by routers). - Private IP Ranges (RFC 1918):
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16. - APIPA:
169.254.0.0/16(auto-configured if DHCP is unreachable).
C. Subnetting & CIDR (Classless Inter-Domain Routing):
In CIDR, a slash notation (/n) defines the prefix length:
- Network ID: Result of bitwise
IP AND Mask. - Directed Broadcast: Result of bitwise
IP OR (NOT Mask).
3. IPv6 Logical Addressing
IPv6 expands address length to 128 bits, solving global IPv4 address exhaustion.
Address Representation & Abbreviation Rules:
Written as 8 groups of 4 hexadecimal digits separated by colons:
- Omit Leading Zeros:
0DB8DB8,00000,00088. - Double Colon Compression (
::): Replace contiguous all-zero groups with::at most once per address:
IPv6 Address Scopes:
- Global Unicast (
2000::/3): Publicly routable on the Internet. - Link-Local (
fe80::/10): Auto-configured per interface; routable only within the local physical subnet. - Unique Local (
fc00::/7): Private enterprise intranets (non-routable on public Internet). - Loopback (
::1/128): Local testing. - Multicast (
ff00::/8): Replaces broadcast entirely (ff02::1reaches all link-local nodes). - Anycast: One-to-nearest delivery among a group of servers sharing the same IP.
4. IPv6 Header Advantages
The IPv6 base header is streamlined to a fixed 40-byte size:
- Flow Label (20 bits): High-speed hardware handling of real-time multimedia flows.
- Next Header (8 bits): Links to modular extension headers (Hop-by-Hop, Routing, Fragment, IPsec).
- Hop Limit (8 bits): Replaces IPv4 TTL.
- Zero Checksum: Eliminates per-hop checksum recalculation overhead.
5. IPv4 to IPv6 Migration Mechanisms
- Dual Stack: Operating systems run both IPv4 and IPv6 stacks concurrently.
- Tunneling (6to4, Teredo): Encapsulating IPv6 packets inside IPv4 packets across IPv4 transit networks.
- Translation (NAT64 / DNS64): Translating IPv6 packet headers directly into IPv4 packets.
6. Key Exam Questions & Numericals
- Given IP
172.16.45.10with mask/20, calculate the Network Address, Broadcast Address, and number of usable hosts.- Prefix Mask =
255.255.240.0. - Host bits .
- 3rd octet of IP: ; Mask: .
- Bitwise AND: .
- Network ID:
- Broadcast ID:
- Usable Hosts: .
- Prefix Mask =
- Why does IPv6 eliminate the Broadcast address?
- Broadcast packets interrupt every CPU on the entire local network segment to parse packets that are mostly unwanted. IPv6 replaces broadcast with targeted Multicast, ensuring only interested nodes wake up to process the packets.
- What is the purpose of the IPv6 Link-Local address?
- It allows nodes on the same local physical link to communicate, exchange routing protocols, and perform neighbor discovery out-of-the-box before any global IP configuration or DHCP assignment.