Introduction
Addressing in computer networks: mechanism to uniquely identify devices and resources for data delivery. Enables routing, switching, and communication across heterogeneous networks. Types: physical (hardware), logical (software). Crucial for scalability, interoperability, and network management.
"Without addressing, communication in networks becomes impossible; it is the cornerstone of all data exchange." -- Andrew S. Tanenbaum
Addressing Overview
Definition and Purpose
Addressing: assignment of identifiers to network entities. Purpose: enable identification, location, and communication. Supports routing, packet delivery, resource allocation.
Types of Addresses
Physical Address: hardware-based, immutable, Layer 2. Logical Address: software-based, configurable, Layer 3 and above. Port Address: identifies application endpoints.
Addressing Levels
Link Layer: MAC addresses. Network Layer: IP addresses. Transport Layer: port numbers. Application Layer: domain names, URLs.
Physical Addressing
MAC Addresses
Media Access Control (MAC) address: 48-bit unique identifier assigned to NICs. Format: six groups of two hexadecimal digits separated by colons or hyphens (e.g., 00:1A:2B:3C:4D:5E). Purpose: local network identification.
MAC Address Structure
First 24 bits: Organizationally Unique Identifier (OUI). Last 24 bits: NIC-specific identifier. Ensures global uniqueness.
Physical Addressing Role
Used in LAN communication, Ethernet frames, ARP resolution. Immutable by default but can be spoofed. Essential for frame delivery within broadcast domains.
Logical Addressing
Definition
Logical addresses assigned by software, hierarchical, routeable across networks. Examples: IPv4, IPv6 addresses. Dynamic or static assignment possible.
Network Layer Addressing
Enables internetwork communication. Independent of physical hardware. Supports routing decisions based on address prefixes.
Address Allocation
Managed by IANA and regional registries. Mechanisms: DHCP, manual configuration, SLAAC for IPv6. Ensures uniqueness within administrative domains.
IPv4 Addressing
Address Format
32-bit binary number, displayed as four octets in decimal separated by dots (dotted-decimal notation). Example: 192.168.1.1.
Address Classes
Class A, B, C for unicast; Class D for multicast; Class E reserved. Classful addressing deprecated but legacy support persists.
Public vs Private Addresses
Public addresses routable on the internet. Private addresses reserved for internal use (RFC 1918). NAT translates private to public addresses.
IPv4 Address Example Table
| Address Type | Range | Usage |
|---|---|---|
| Class A | 1.0.0.0 - 126.255.255.255 | Large networks |
| Class B | 128.0.0.0 - 191.255.255.255 | Medium networks |
| Class C | 192.0.0.0 - 223.255.255.255 | Small networks |
IPv6 Addressing
Address Format
128-bit hexadecimal number divided into eight 16-bit blocks separated by colons. Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Address Types
Unicast: one interface. Anycast: nearest interface in group. Multicast: multiple interfaces. No broadcast address in IPv6.
Address Abbreviation Rules
Leading zeros omission. Consecutive zero blocks replaced by :: once per address. Improves readability.
IPv6 Address Example Table
| Address Type | Prefix | Usage |
|---|---|---|
| Global Unicast | 2000::/3 | Internet routable |
| Link-Local | FE80::/10 | Local network segment |
| Multicast | FF00::/8 | Group communication |
Subnetting
Concept
Subnetting: dividing a network into smaller subnetworks. Improves address utilization, reduces broadcast domains, enhances security and performance.
Subnet Masks
Defines network and host portions of IP address. Expressed in dotted-decimal or CIDR notation (e.g., 255.255.255.0 or /24).
Subnet Calculation
Number of subnets: 2^n, where n = borrowed bits. Number of hosts per subnet: 2^h - 2, where h = remaining host bits.
Given:IP address: 192.168.1.0Subnet mask: 255.255.255.192 (/26)Calculation:- Borrowed bits (n): 2 (since 192 = 11000000)- Number of subnets: 2^2 = 4- Hosts per subnet: 2^(32-26) - 2 = 62Applications
Used to organize networks, optimize IP usage, isolate traffic for security, and improve routing efficiency.
Address Resolution Protocol (ARP)
Purpose
Translates logical IP addresses to physical MAC addresses. Essential for Ethernet communication in IPv4 networks.
Operation
Broadcasts ARP request for IP to MAC mapping. Receives ARP reply with MAC address. Stores mapping in ARP cache.
ARP Packet Structure
Includes hardware type, protocol type, hardware size, protocol size, opcode, sender MAC/IP, target MAC/IP.
ARP Packet Fields:- Hardware Type (HTYPE)- Protocol Type (PTYPE)- Hardware Size (HLEN)- Protocol Size (PLEN)- Operation (OPER): request or reply- Sender Hardware Address (SHA)- Sender Protocol Address (SPA)- Target Hardware Address (THA)- Target Protocol Address (TPA)Limitations
Vulnerable to spoofing attacks. Limited to broadcast domain. IPv6 uses Neighbor Discovery Protocol (NDP) instead.
Domain Name System (DNS)
Role in Addressing
Translates human-readable domain names to IP addresses. Enables user-friendly resource access.
DNS Hierarchical Structure
Root servers, top-level domains (TLDs), authoritative name servers. Distributed database model.
DNS Query Types
Recursive: client requests complete answer. Iterative: server returns best possible info. Types: A (IPv4), AAAA (IPv6), CNAME, PTR, MX.
DNS Resolution Process
Client sends query → resolver → root server → TLD server → authoritative server → IP returned.
Addressing Schemes
Unicast
One-to-one communication. Unique address per interface. Standard for most network traffic.
Multicast
One-to-many communication. Group addresses used to send packets to multiple receivers simultaneously.
Broadcast
One-to-all communication within a subnet. IPv4 supports broadcast; IPv6 does not.
Anycast
One-to-nearest communication. Same address assigned to multiple nodes; packet delivered to closest.
Routing and Addressing
Address Role in Routing
Logical addresses used to forward packets through interconnected networks. Routers examine destination address to determine next hop.
Hierarchical Addressing
Network portion identifies subnet or network. Host portion identifies specific device. Simplifies routing tables and aggregation.
Routing Protocols
Protocols (e.g., OSPF, BGP) use addressing to build routing tables. Address prefixes advertise network reachability.
Address Aggregation
Combines multiple routes into single entry. Reduces routing table size. Enabled by CIDR and hierarchical addressing.
Security in Addressing
Address Spoofing
Attacker falsifies IP or MAC address to masquerade as trusted device. Enables man-in-the-middle, DoS attacks.
Mitigation Techniques
Packet filtering, ingress/egress filtering, dynamic ARP inspection, IPsec for authentication.
Address Privacy
IPv6 privacy extensions generate temporary addresses to prevent tracking. DHCP logs aid auditing.
Access Control
Network ACLs restrict access based on addresses. Firewalls and VPNs enforce address-based policies.
References
- Andrew S. Tanenbaum, David J. Wetherall, "Computer Networks," 5th ed., Pearson, 2011, pp. 112-157.
- Douglas E. Comer, "Internetworking with TCP/IP Volume One," 6th ed., Prentice Hall, 2013, pp. 89-135.
- W. Richard Stevens, "TCP/IP Illustrated, Volume 1: The Protocols," Addison-Wesley, 1994, pp. 201-245.
- K. Obraczka, "Multicast Addressing and Routing," IEEE Communications Magazine, vol. 36, no. 1, 1998, pp. 98-105.
- R. Hinden, S. Deering, "IP Version 6 Addressing Architecture," RFC 4291, 2006, pp. 1-29.