Network Layer Addressing
Logical Addresses
Read aloud is unavailable in this browser.
The Internet's Address System
Every device connected to the Internet possesses a unique identifier that enables it to send and receive data from any other device worldwide. This identifier is not the hardware address burned into your network card—it's something more abstract, more flexible, and infinitely more powerful: a logical address.
Understanding logical addresses is fundamental to comprehending how the Internet works. Without them, the seamless global communication we take for granted—streaming video from servers in another continent, sending emails across the world, accessing cloud services hosted anywhere—would be impossible.
This page explores the concept of logical addressing in depth, examining why physical addresses alone are insufficient for internetworking, how logical addresses solve these limitations, and the fundamental principles that govern address design in modern networks.
By the end of this page, you will understand: (1) The fundamental difference between physical and logical addresses, (2) Why logical addresses are essential for internetworking, (3) The characteristics and properties of IP addresses, (4) How logical addressing enables location-independent identification, and (5) The relationship between logical addresses and the network layer's responsibilities.
Physical Addresses and Their Limitations
Before we can appreciate the elegance of logical addressing, we must understand why physical addresses—though essential at the data link layer—are fundamentally inadequate for internetworking.
Physical Addresses (MAC Addresses):
Every network interface card (NIC) is manufactured with a unique identifier called a MAC (Media Access Control) address. This 48-bit address (typically displayed as six hexadecimal pairs like 00:1A:2B:3C:4D:5E) is burned into the hardware during manufacturing.
MAC addresses excel at local network communication. Within a single LAN segment, devices use MAC addresses to identify each other, with Ethernet frames carrying source and destination MAC addresses for direct delivery.
However, MAC addresses present critical limitations when we attempt to scale beyond a single network:
- •Flat Namespace — MAC addresses are assigned randomly by manufacturers with no geographic or organizational structure. There's no way to determine from a MAC address where a device is located or which network it belongs to.
- •No Routing Information — Because MAC addresses lack hierarchical structure, routers cannot use them to make forwarding decisions. A router receiving a frame destined for MAC address
00:1A:2B:3C:4D:5Ehas no information about where that device might be. - •Hardware Dependency — MAC addresses are tied to physical hardware. If you replace your network card, you get a new MAC address. If you move your laptop from home to office, your MAC address doesn't change to reflect the new location.
- •Scalability Collapse — With over 280 trillion possible MAC addresses, every router would need to maintain tables covering every device worldwide—an impossible computational burden.
- •No Aggregation — Unlike hierarchical addresses, MAC addresses cannot be summarized or aggregated. You cannot represent millions of devices with a single routing table entry.
Imagine trying to deliver physical mail if every house had a random, globally unique ID instead of a structured address with country, city, street, and number. Postal workers would need to memorize the location of every house on Earth. This is precisely the problem MAC addresses create for network routing—and why logical addressing was invented.
The Thought Experiment:
Consider the implications of routing with MAC addresses alone:
- Global Table Size: With approximately 20 billion connected devices, every router would need routing entries for each device
- No Path Aggregation: A router in New York couldn't know that all devices starting with certain MAC prefixes are in Tokyo—manufacturers ship NICs worldwide
- Constant Flux: Devices move, networks change, but MAC addresses stay fixed—routing tables would be perpetually outdated
- Lookup Complexity: Even with perfect information, searching 20 billion entries for every packet would consume impossible amounts of time and memory
These limitations aren't engineering challenges to be overcome—they're fundamental architectural mismatches between physical addressing and internetwork routing requirements. The solution demands a different kind of address entirely.
Introducing Logical Addresses
A logical address (also called a network address or IP address) is a software-assigned identifier that provides location within a network topology rather than hardware identity. This distinction is profound and enables everything we associate with modern internetworking.
Definition and Characteristics:
Logical addresses are:
- Software-assigned: Configured by network administrators or assigned dynamically, independent of hardware
- Location-specific: Reflect where a device is connected within the network topology
- Hierarchically structured: Designed to enable aggregation, summarization, and efficient routing
- Mutable: Can be changed when devices move between networks
- Protocol-specific: Defined by the network layer protocol (IP in TCP/IP networks)
| Characteristic | Physical Address (MAC) | Logical Address (IP) |
|---|---|---|
| Assignment | Burned into hardware by manufacturer | Configured by software, can be changed |
| Structure | Flat, random namespace | Hierarchical, structured namespace |
| Scope | Local network only | Global internetwork |
| Location Information | None—identifies hardware | Encodes network location |
| Routing Utility | Cannot be used for routing | Designed for routing decisions |
| Mobility Impact | Stays same when device moves | Changes when device moves to new network |
| Aggregation | Impossible | Essential design feature |
| Layer | Data Link Layer (Layer 2) | Network Layer (Layer 3) |
| Example | 00:1A:2B:3C:4D:5E | 192.168.1.100 or 2001:db8::1 |
The Postal Analogy Revisited:
If MAC addresses are like unique serial numbers stamped on each house (useful for inventory, useless for delivery), then IP addresses are like proper postal addresses:
- Country → Network class/organization allocation
- City → Major network identifier
- Street → Subnet identifier
- House number → Host identifier
Just as a letter travels from country to city to street to house, an IP packet routes from global networks to regional networks to local subnets to individual hosts. Each level of the hierarchy narrows the search space dramatically.
Key Insight: Logical addresses answer the question "Where is this device located in the network topology?" while physical addresses answer "Which piece of hardware is this?" Both questions matter, but only the first enables routing.
Logical addressing introduces a level of indirection between hardware identity and network identity. This indirection is the source of its power—it decouples 'who you are' from 'where you are', enabling mobility, scalability, and flexible network design. This principle appears throughout computer science: abstraction layers that separate concerns enable systems that can evolve independently.
IP Address Fundamentals
The Internet Protocol (IP) defines the logical addressing scheme used throughout the global Internet and most private networks. Understanding IP addresses is essential for any network engineer, system administrator, or software developer working with networked systems.
IPv4 Address Structure:
IPv4 addresses are 32-bit binary numbers, typically displayed in dotted-decimal notation for human readability:
Binary: 11000000.10101000.00000001.01100100
Decimal: 192.168.1.100
Each of the four octets represents 8 bits, ranging from 0 to 255. This gives IPv4 a theoretical maximum of 2³² = 4,294,967,296 unique addresses.
123456789101112131415161718192021222324
// IPv4 Address: 192.168.1.100// Breaking down into binary octets: First Octet: 192 = 11000000Second Octet: 168 = 10101000 Third Octet: 1 = 00000001Fourth Octet: 100 = 01100100 // Complete 32-bit representation:11000000.10101000.00000001.01100100 // As a single 32-bit integer:192 × 2²⁴ + 168 × 2¹⁶ + 1 × 2⁸ + 100= 3,232,235,876 // Essential binary conversions for networking:// 128 = 10000000 (highest bit)// 64 = 01000000// 32 = 00100000// 16 = 00010000// 8 = 00001000// 4 = 00000100// 2 = 00000010// 1 = 00000001IPv6 Address Structure:
Recognizing IPv4's address space limitations, IPv6 expanded to 128-bit addresses, displayed in hexadecimal notation:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
This provides 2¹²⁸ ≈ 3.4 × 10³⁸ addresses—enough to assign billions of addresses to every grain of sand on Earth.
The Network-Host Division:
Every IP address is divided into two logical components:
- Network Portion: Identifies the network the device belongs to
- Host Portion: Identifies the specific device within that network
The boundary between network and host portions is determined by the subnet mask (IPv4) or prefix length (both versions):
IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0 (or /24)
Network Part: 192.168.1.___ (first 24 bits)
Host Part: ___.___.___.100 (last 8 bits)
This division is the architectural foundation of hierarchical addressing—routers only need to know how to reach networks, not individual hosts.
Many networking concepts (subnetting, masking, CIDR calculations) require binary thinking. Routers perform bitwise AND operations between IP addresses and subnet masks billions of times per second. Understanding binary representation isn't academic—it's how the network layer actually works at the circuit level.
Logical Addressing in Action
To fully appreciate logical addressing, let's trace how it enables packet delivery across the Internet—something physical addresses alone could never accomplish.
Scenario: Cross-Country Web Request
You're in New York, accessing a website hosted in San Francisco:
- Your laptop: IP
203.0.113.50on network203.0.113.0/24 - Web server: IP
198.51.100.200on network198.51.100.0/24
The Routing Journey:
Step-by-Step Analysis:
Step 1: Local Decision
Your laptop compares the destination IP (198.51.100.200) against its own network (203.0.113.0/24). Since the destination is on a different network, the packet must be sent to the default gateway.
Step 2: Gateway Routing
Your ISP's router examines its routing table. It doesn't know about 198.51.100.200 specifically, but it has an entry for 198.0.0.0/8 pointing toward the Internet backbone.
Step 3: Progressive Refinement
As the packet traverses core routers, each has increasingly specific routing information. One router knows 198.51.0.0/16 is in California. Another knows 198.51.100.0/24 is reachable through a specific ISP.
Step 4: Final Delivery
The destination network's router has entries for all hosts on 198.51.100.0/24. It delivers the packet directly to 198.51.100.200.
Key Observations:
- No router needed to know about your specific laptop or the server's MAC address
- Each router made decisions based only on the network portion of the destination IP
- Hierarchical aggregation meant core routers only needed a handful of routes representing millions of hosts
- The packet traversed heterogeneous networks (Ethernet, fiber, MPLS) seamlessly—because logical addresses transcend physical media
The Internet's routing tables contain approximately 900,000 entries—not 20 billion for every device. This 99.995% reduction is possible only because logical addresses encode location hierarchically, allowing massive aggregation. A single route for 10.0.0.0/8 represents over 16 million possible hosts.
The Two-Address Requirement
A common question from students is: "If logical addresses are so superior, why do we still need physical addresses at all?"
The answer reveals a fundamental principle of layered network design: each layer serves a different purpose, and addresses at each layer solve different problems.
Why Both Addresses Are Necessary:
- •Enable inter-network routing
- •Provide global reachability
- •Support hierarchical organization
- •Allow logical topology independent of physical layout
- •Change when devices move networks
- •Enable local network delivery
- •Provide hardware identification
- •Support Ethernet switching
- •Work at the physical medium level
- •Remain constant regardless of location
The Handoff Process:
Consider what happens when a packet arrives at the final router before its destination:
- Router receives a packet destined for IP
192.168.1.100 - Router determines
192.168.1.100is on a directly connected network - Router needs to deliver the packet over Ethernet—but Ethernet uses MAC addresses
- Router consults its ARP cache (or sends an ARP request) to find the MAC address corresponding to
192.168.1.100 - Router encapsulates the IP packet in an Ethernet frame addressed to the host's MAC address
- The Ethernet switch delivers the frame to the correct physical port
This handoff between logical and physical addressing happens at every hop, with MAC addresses changing at each router while the IP addresses remain constant end-to-end.
The Encapsulation Model:
┌────────────────────────────────────────────────────────┐
│ Ethernet Frame (Layer 2) │
│ ┌────────────┬──────────────────────────────────────┐ │
│ │ MAC Header │ IP Packet (Layer 3) │ │
│ │ Src: R1 │ ┌────────────┬───────────────────┐ │ │
│ │ Dst: Host │ │ IP Header │ Transport + Data │ │ │
│ │ │ │ Src: A │ │ │ │
│ │ │ │ Dst: B │ │ │ │
│ └────────────┴─┴────────────┴───────────────────┘ │ │
└────────────────────────────────────────────────────────┘
The IP addresses (A → B) remain unchanged across the entire journey. The MAC addresses change at every hop, reflecting the current physical segment's source and destination.
MAC addresses excel at what they're designed for: local delivery on a shared medium. IP addresses excel at global routing. Neither can replace the other without sacrificing capabilities. This separation of concerns—a fundamental principle in engineering—allows each layer to optimize for its specific responsibilities.
Address Properties and Requirements
Effective logical addressing requires careful design. IP addresses must satisfy several critical properties to enable reliable, scalable internetworking:
- •Uniqueness: No two connected devices may share the same IP address simultaneously. Duplicate addresses cause routing ambiguity—packets might be delivered to the wrong host, or responses might return to unintended destinations.
- •Appropriate Scope: Addresses must be unique within their intended scope. Private addresses (like
10.x.x.x) need only be unique within their organization, while public addresses must be globally unique. - •Hierarchical Structure: Addresses must support logical grouping that enables route aggregation. Random assignments would prevent the summarization that makes Internet routing tractable.
- •Adequate Size: The address space must accommodate all current and anticipated devices. IPv4's 32-bit limitation drove the transition to IPv6's 128 bits.
- •Efficient Encoding: Addresses must be compact enough for headers while remaining expressive. Every byte added to addresses increases overhead across billions of packets.
- •Human Readability: While machines process binary, humans must configure, troubleshoot, and communicate addresses. Hence dotted-decimal (IPv4) and hexadecimal (IPv6) notations.
| Protocol | Bits | Possible Addresses | Representation | Example |
|---|---|---|---|---|
| IPv4 | 32 | ~4.3 billion | Dotted-decimal | 192.168.1.1 |
| IPv6 | 128 | ~3.4 × 10³⁸ | Colon-hexadecimal | 2001:db8::1 |
| MAC | 48 | ~281 trillion | Colon/Dash hexadecimal | 00:1A:2B:3C:4D:5E |
IANA allocated its final IPv4 address blocks in 2011. Regional registries subsequently exhausted their pools. The Internet now operates through a combination of IPv6 adoption, NAT proliferation, and IPv4 address trading. This historical context explains many modern networking complexities—including why understanding IP addressing thoroughly is more important than ever.
Building a Mental Model
To solidify understanding, let's develop robust mental models for thinking about logical and physical addresses.
Mental Model 1: Identity vs Location
Think of it like a person's identity versus their current whereabouts:
- MAC Address = Your fingerprint (permanent, unique, identifies you)
- IP Address = Your current postal address (changes when you move, enables delivery)
Your fingerprint is always the same, but when you travel from home to a hotel, your package delivery address changes. Both identifiers are useful for different purposes.
Mental Model 2: Local vs Global Names
Consider naming conventions in organizations:
- MAC Address = First name (works within a room: "Hey, John!")
- IP Address = Full corporate directory path (works company-wide: "John Smith, Engineering, Building C, Floor 3")
In a small meeting room, first names suffice. Across a 10,000-person company, structured naming becomes essential.
Mental Model 3: Train Journey Tickets
Imagine traveling by train across multiple countries:
- IP Address = Your final destination ticket (Paris → Berlin)
- MAC Address = Your seat assignment for each train segment (changes at each transfer)
The conductor in each train car only cares about seat assignments (local delivery), but the overall routing system uses your destination (global routing).
The relationship between a device's MAC address and its IP address is dynamic, established through protocols like DHCP (for IP assignment) and ARP (for IP-to-MAC mapping). Understanding this dynamic binding is crucial—it's what allows devices to move between networks, acquire new addresses, and maintain connectivity.
KEEP LEARNING
There’s more to understand.
You’re reading the introduction. Create a free account to read the complete lesson, save notes and keep track of your progress.