Network Layer Addressing
Address Assignment
Read aloud is unavailable in this browser.
How Devices Get Their Addresses
Every device on a network needs an IP address to communicate—but where do these addresses come from? Unlike MAC addresses, which are burned into hardware at the factory, IP addresses must be configured somehow. This configuration can happen manually, automatically, or through a combination of both approaches.
The mechanisms for address assignment have evolved dramatically from the early Internet's manual configuration to today's sophisticated dynamic systems that can configure millions of devices without human intervention. Understanding these mechanisms is essential for network administrators, system engineers, and anyone working with networked infrastructure.
This page explores address assignment comprehensively: from manual static configuration to the DHCP protocol that powers most networks today, from IPv6's stateless autoconfiguration to enterprise address allocation strategies.
By the end of this page, you will understand: (1) Static vs. dynamic address assignment and their tradeoffs, (2) DHCP protocol operation including DORA process and lease management, (3) IPv6 SLAAC and DHCPv6 differences, (4) Address pool design and management, and (5) Enterprise strategies for scalable address allocation.
Static Address Configuration
Static addressing assigns a fixed IP address to a device through manual configuration. The address is stored in the device's configuration and persists across reboots until manually changed.
Configuration Components:
Static configuration requires setting multiple parameters:
- IP Address: The device's unique identifier (e.g.,
192.168.1.100) - Subnet Mask: Defines network/host division (e.g.,
255.255.255.0or/24) - Default Gateway: Router for reaching other networks (e.g.,
192.168.1.1) - DNS Servers: For name resolution (e.g.,
8.8.8.8,8.8.4.4)
When Static Assignment is Appropriate:
- •Servers — Need consistent addresses for client connections and DNS records
- •Network Infrastructure — Routers, switches, firewalls must have predictable addresses
- •Printers — Users expect consistent addresses in print configurations
- •IoT Devices — May lack DHCP client capability
- •Management Interfaces — Must be reachable even when DHCP fails
- •End-user workstations — Too many devices, too much administrative overhead
- •Mobile devices — Move between networks frequently
- •Guest networks — Unknown devices, temporary connections
- •Large deployments — Manual configuration doesn't scale
- •Dynamic environments — Cloud, containers, VMs created/destroyed frequently
Static Assignment Challenges:
While static addressing provides predictability, it introduces significant operational challenges:
1. Manual Tracking Required Every address assignment must be documented and tracked. Without centralized management, conflicts become inevitable as administrators forget which addresses are in use.
2. Configuration Errors
Manual entry invites typos. A transposed digit (192.168.1.100 vs. 192.168.1.10) can cause duplicate addresses or unreachable devices.
3. Network Changes are Painful If the network is re-addressed (subnets change, new gateway), every statically configured device must be manually updated.
4. Mobility is Difficult Moving a device to a different subnet requires reconfiguration. Dynamic environments (laptops, phones) are impractical to manage statically.
5. No Automatic Failover If a device's configured DNS server or gateway becomes unavailable, the device has no way to discover alternatives.
For devices needing consistent addresses without manual configuration, use DHCP reservations (also called static DHCP leases). The device uses DHCP normally, but the server always assigns it the same address based on its MAC address. This provides the predictability of static addressing with the manageability of DHCP.
DHCP Fundamentals
The Dynamic Host Configuration Protocol (DHCP) automates address assignment, eliminating the need for manual configuration on most devices. DHCP is defined in RFC 2131 and is ubiquitous in modern networks.
DHCP Components:
DHCP Server: Maintains a pool of available addresses and configuration parameters. Responds to client requests with address offers and manages the lease database.
DHCP Client: Software on the end device that requests configuration from servers. Built into virtually all operating systems.
DHCP Relay Agent: Forwards DHCP traffic between subnets when the server isn't on the local network. Essential for centralized DHCP in multi-subnet environments.
Address Pool (Scope): The range of addresses a server can offer. Administrators configure pools, exclusions, and reservation rules.
Lease: The temporary assignment of an address to a client. Includes an expiration time after which the address may be reclaimed.
| Parameter | Purpose | Example |
|---|---|---|
| IP Address | Device's network layer identity | 192.168.1.100 |
| Subnet Mask | Network/host boundary | 255.255.255.0 |
| Default Gateway | Router for external traffic | 192.168.1.1 |
| DNS Servers | Name resolution servers | 8.8.8.8, 8.8.4.4 |
| Domain Name | DNS search suffix | corp.example.com |
| Lease Time | Duration of address assignment | 86400 (24 hours) |
| WINS Servers | NetBIOS name resolution (legacy) | 192.168.1.10 |
| NTP Servers | Time synchronization | time.google.com |
DHCP Message Types:
DHCP uses eight message types, but four are essential for address acquisition:
| Message | Direction | Purpose |
|---|---|---|
| DISCOVER | Client → Broadcast | "I need an address; who can help?" |
| OFFER | Server → Client | "I have this address available for you" |
| REQUEST | Client → Broadcast | "I accept this address; please confirm" |
| ACK | Server → Client | "Confirmed; this address is now yours" |
Additional message types handle special cases:
| Message | Purpose |
|---|---|
| NACK | Server rejects REQUEST (address no longer available) |
| DECLINE | Client rejects the offer (detected as duplicate) |
| RELEASE | Client voluntarily returns the address |
| INFORM | Client requests parameters without address (already has static address) |
New clients don't have IP addresses yet, so DHCP DISCOVER and REQUEST messages are broadcast. The client uses source IP 0.0.0.0 and destination 255.255.255.255. This is why DHCP servers must be on the same broadcast domain—or a relay agent must forward the broadcasts to them.
The DORA Process
DHCP address acquisition follows the DORA sequence: Discover, Offer, Request, Acknowledge. This four-way handshake ensures reliable, conflict-free address assignment even with multiple DHCP servers on the network.
Step-by-Step Analysis:
Step 1: DISCOVER The client broadcasts a DHCPDISCOVER message. Key fields:
- Source IP:
0.0.0.0(client has no address yet) - Destination IP:
255.255.255.255(broadcast) - Source MAC: Client's hardware address
- Transaction ID: Random number to match responses
Step 2: OFFER
Servers receiving the DISCOVER select an available address from their pool and respond with DHCPOFFER:
- Offered IP address
- Subnet mask, gateway, DNS, and other parameters
- Lease duration
- Server identifier (server's own IP)
Step 3: REQUEST The client selects one offer (typically the first received) and broadcasts DHCPREQUEST:
- Specifies the requested IP and server identifier
- Broadcast so all servers learn which offer was accepted
- Servers whose offers weren't chosen return those addresses to their pools
Step 4: ACKNOWLEDGE The selected server sends DHCPACK confirming the assignment:
- Final configuration parameters
- Lease time begins now
- Client can begin using the address
12345678910111213141516171819202122232425262728
# DHCPDISCOVEREthernet: Dst=FF:FF:FF:FF:FF:FF Src=00:14:22:01:23:45IP: Src=0.0.0.0 Dst=255.255.255.255UDP: SrcPort=68 (bootpc) DstPort=67 (bootps)DHCP: Message Type = DISCOVER (1) Hardware Type = Ethernet Client MAC = 00:14:22:01:23:45 Transaction ID = 0x3d1d5678 Options: - DHCP Message Type: Discover - Parameter Request List: Subnet Mask, Router, DNS, Domain Name - Host Name: "laptop-123" # DHCPOFFEREthernet: Dst=00:14:22:01:23:45 Src=00:0C:29:AB:CD:EFIP: Src=192.168.1.1 Dst=192.168.1.100 (or broadcast)UDP: SrcPort=67 DstPort=68DHCP: Message Type = OFFER (2) Your (Client) IP = 192.168.1.100 Server IP = 192.168.1.1 Transaction ID = 0x3d1d5678 Options: - DHCP Message Type: Offer - Subnet Mask: 255.255.255.0 - Router: 192.168.1.1 - DNS: 8.8.8.8, 8.8.4.4 - Lease Time: 86400 seconds - Server Identifier: 192.168.1.1The REQUEST is broadcast (not unicast to the selected server) so that all DHCP servers learn the outcome. Servers whose offers were declined must return those addresses to their pools. Without this, declined addresses would remain temporarily unavailable, wasting pool capacity.
Lease Lifecycle and Renewal
DHCP leases are temporary by design. This temporariness serves important purposes: it allows address recovery when devices leave the network, enables configuration updates, and adapts to changing network conditions.
Lease Timeline:
123456789101112131415161718192021222324
Lease Duration: T (e.g., 24 hours = 86400 seconds) |←───────────────────── Lease Time T ─────────────────────→|| |0% 50% (T1) 87.5% (T2) 100%├──────────────┼──────────────────┼──────────────────────────┤│ │ │ ││ Normal │ Renewal │ Rebinding │Expiry│ Usage │ Attempts │ Attempts ││ │ (unicast) │ (broadcast) ││ │ │ │Time: 0h 12h 21h 24h ↓ ↓ ↓ Client If renewal Address reclaimed attempts failed, try if no renewal renewal any server Renewal Process:1. At T1 (50%): Client unicasts DHCPREQUEST to original server2. Server responds with DHCPACK → Lease extended, timers reset3. If no response by T2 (87.5%): Client broadcasts DHCPREQUEST4. Any server may respond → Lease extended with possibly new parameters5. If no response by T (100%): Lease expires, address unusable| Network Type | Recommended Lease | Rationale |
|---|---|---|
| Static Wired Office | 8-24 hours | Devices rarely change; long leases reduce DHCP traffic |
| Wireless Office | 4-8 hours | Devices may roam; moderate churn |
| Guest Network | 1-4 hours | High device turnover; reclaim addresses quickly |
| Conference Venue | 30-60 minutes | Very high turnover during events |
| ISP/Carrier | 24-72 hours | Balance stability with address recovery |
| Home Network | 24 hours | Typical consumer router default |
Lease Database:
DHCP servers maintain a lease database recording:
- Client hardware (MAC) address
- Assigned IP address
- Lease start time and duration
- Client hostname (if provided)
- Client identifier (if provided)
This database is persistent—it survives server reboots. Modern DHCP implementations support database replication between redundant servers.
Lease Operations:
Release: When a device shuts down gracefully (e.g., through OS shutdown), it may send DHCPRELEASE to return its address immediately. This is optional—many devices simply let leases expire.
Decline: If a client detects its assigned address is already in use (via ARP probe), it sends DHCPDECLINE. The server marks that address as conflicted and doesn't offer it again without administrator intervention.
Shorter leases mean faster address recovery but more DHCP traffic and more frequent renewals. Longer leases reduce overhead but can exhaust pools if devices leave without releasing. During network changes (new DNS server, gateway), short leases propagate changes faster—some administrators temporarily reduce lease times before major changes.
DHCP Relay and Multi-Subnet Networks
DHCP's broadcast-based discovery creates a challenge: broadcasts don't cross routers. In a multi-subnet network, this would require a DHCP server on every subnet—impractical for large networks.
The Solution: DHCP Relay Agents
A DHCP Relay Agent (RFC 3046) is a router or dedicated device that:
- Listens for DHCP broadcasts on local interfaces
- Encapsulates them in unicast packets
- Forwards them to a configured DHCP server on another subnet
- Receives responses and broadcasts them to the client
This allows a single centralized DHCP server to serve many subnets.
The Gateway Address (giaddr) Field:
When the relay forwards a DHCP message, it sets the giaddr (gateway address) field to the IP address of its interface on the client's subnet. The server uses this to:
- Determine which address pool to use (e.g.,
giaddr=192.168.1.1→ offer from 192.168.1.0/24 pool) - Know where to send the response
Multi-Server Architecture:
Enterprise networks typically deploy multiple DHCP servers for redundancy. Two common approaches:
Split Scope (80/20 Rule):
- Each server owns a portion of the address range
- Primary server has 80%, backup has 20%
- If primary fails, backup provides limited addresses
- Simple but wastes 20% capacity during normal operation
DHCP Failover (RFC 3074/7031):
- Servers synchronize lease databases in real-time
- Both servers can offer any address
- Seamless failover without address conflicts
- More complex but efficient
123456789101112131415161718
# Cisco Router DHCP Relay Configuration interface GigabitEthernet0/0 description Client Subnet 192.168.1.0/24 ip address 192.168.1.1 255.255.255.0 ip helper-address 10.0.0.10 ! Primary DHCP Server ip helper-address 10.0.0.11 ! Secondary DHCP Server interface GigabitEthernet0/1 description Client Subnet 192.168.2.0/24 ip address 192.168.2.1 255.255.255.0 ip helper-address 10.0.0.10 ip helper-address 10.0.0.11 # The 'ip helper-address' command:# - Intercepts UDP broadcasts on specified ports# - Converts to unicast addressed to helper address# - Default ports include: DHCP (67/68), DNS (53), TFTP (69)DHCP Relay Agents can insert Option 82, containing circuit ID and remote ID information. This tells the server exactly which switch port the client connected to—enabling sophisticated policies like assigning addresses based on physical location or port security enforcement.
IPv6 Address Assignment
IPv6 introduces fundamentally new address assignment mechanisms, with Stateless Address Autoconfiguration (SLAAC) as the primary innovation. Understanding these mechanisms is essential as networks transition to IPv6.
SLAAC (Stateless Address Autoconfiguration):
SLAAC allows devices to configure themselves without any server:
- Link-Local Generation: Device creates fe80:: address using its Interface ID
- Router Discovery: Device sends Router Solicitation; routers respond with Router Advertisements
- Prefix Learning: RA contains network prefix(es) and flags
- Global Address Generation: Device combines prefix + Interface ID
- DAD: Duplicate Address Detection confirms uniqueness
- Address Activation: Device begins using the address
The 'stateless' aspect means no server maintains a database of assignments—devices self-configure.
| Method | Description | Use Case |
|---|---|---|
| SLAAC | Device generates address from prefix + IID | Simple networks, most endpoints |
| SLAAC + Stateless DHCPv6 | SLAAC for address; DHCPv6 for DNS/options | Need DNS without server tracking |
| Stateful DHCPv6 | Server assigns addresses like DHCPv4 | Need central control or logging |
| Static | Manual configuration | Servers, infrastructure |
1234567891011121314151617181920212223242526272829
# SLAAC Process Example Step 1: Link-Local Address (automatic on boot) Prefix: fe80::/10 (fixed) Interface ID: Generated from MAC or random Result: fe80::1a2b:3c4d:5e6f:7890 Step 2: Router Solicitation (RS) Device sends: ICMPv6 Type 133 Destination: ff02::2 (all-routers multicast) Source: fe80::1a2b:3c4d:5e6f:7890 Step 3: Router Advertisement (RA) Router sends: ICMPv6 Type 134 Contents: - Prefix: 2001:db8:1234:5678::/64 - Flags: A=1 (SLAAC OK), M=0 (no DHCPv6 for addr) - Valid Lifetime: 2592000 seconds - Preferred Lifetime: 604800 seconds Step 4: Global Address Construction Prefix (from RA): 2001:db8:1234:5678:: Interface ID: 1a2b:3c4d:5e6f:7890 Global Address: 2001:db8:1234:5678:1a2b:3c4d:5e6f:7890 Step 5: DAD (Neighbor Solicitation) Target: 2001:db8:1234:5678:1a2b:3c4d:5e6f:7890 If no response → Address is valid If response → Address is duplicate, cannot useStateful DHCPv6:
For environments requiring centralized address management, logging, or complex policies, stateful DHCPv6 operates similarly to DHCPv4:
- Client sends SOLICIT (like DISCOVER)
- Server(s) respond with ADVERTISE (like OFFER)
- Client sends REQUEST
- Server responds with REPLY (like ACK)
Key Differences from DHCPv4:
- Uses UDP ports 546 (client) and 547 (server), not 67/68
- Uses ICMPv6-based relay rather than IP helper
- Can operate in stateless mode (parameters only, no addresses)
- Device may have SLAAC and DHCPv6 addresses simultaneously
- No DHCPDECKINE equivalent—DAD handles conflicts
SLAAC dramatically simplifies network configuration. A router advertising a prefix is sufficient—no DHCP server needed for basic connectivity. Devices self-configure in seconds, and there's no lease database to manage, no scope to exhaust, and no server to fail. This is particularly valuable for IoT and edge deployments where infrastructure is minimal.
Enterprise Address Allocation Strategies
Large organizations require systematic approaches to address allocation, balancing ease of management, security, scalability, and operational efficiency.
Address Space Planning Principles:
- Leave Room for Growth: Allocate larger blocks than currently needed; address reconfiguration is painful
- Maintain Summarizability: Assign contiguous blocks to related entities for route aggregation
- Separate by Function: Different address ranges for servers, users, IoT, guests, management
- Document Everything: Address assignments, VLAN mappings, DHCP scope configurations
- Plan for IPv6: Even if not deploying today, structure IPv6 assignments in parallel
1234567891011121314151617181920212223242526272829303132333435363738
# Enterprise IP Address Plan# Organization: Example Corp# Private Space: 10.0.0.0/8 # High-Level Allocation:10.0.0.0/10 Data Centers10.64.0.0/10 Corporate Offices 10.128.0.0/10 Remote Sites10.192.0.0/10 Reserved for Growth # Data Center Breakdown (10.0.0.0/10):10.0.0.0/12 Production Environment 10.0.0.0/16 - Web Tier (static, IPAM managed) 10.1.0.0/16 - Application Tier 10.2.0.0/16 - Database Tier 10.3.0.0/16 - Storage Networks10.16.0.0/12 Development Environment10.32.0.0/12 QA/Staging Environment10.48.0.0/14 Infrastructure (DNS, NTP, Monitoring)10.52.0.0/14 Management Networks (static)10.56.0.0/13 Reserved # Corporate Office Breakdown (10.64.0.0/10):10.64.0.0/12 Headquarters 10.64.0.0/16 - Floor 1-5 (DHCP) 10.65.0.0/16 - Floor 6-10 (DHCP) 10.66.0.0/16 - Printers (DHCP reservations) 10.67.0.0/16 - VoIP Phones (DHCP, VLAN 100) 10.68.0.0/16 - Guest WiFi (DHCP, isolated) 10.69.0.0/16 - Conference Rooms10.80.0.0/12 Regional Office A10.96.0.0/12 Regional Office B # DHCP Scope Policy:# User VLANs: Lease Time = 8 hours, Pool = 80% of /24# Guest VLANs: Lease Time = 2 hours, Pool = full /24# VoIP VLANs: Lease Time = 24 hours, Pool = 90% of /24# Printer VLANs: DHCP Reservations onlyAllocation Tools and Practices:
IP Address Management (IPAM) Systems:
- Centralized database of all allocations
- Integration with DHCP and DNS
- Visual representation of usage
- Conflict detection and history tracking
- API integration with provisioning systems
VLAN-Based Segmentation:
- Align address ranges with VLANs for clarity
- Example: VLAN 100 → 10.100.0.0/16
- Simplifies firewall rules and troubleshooting
Naming Conventions:
- Embed location/function in hostnames
- Example:
web-prod-dc1-001.example.com - Enables understanding from DNS records alone
For user subnets, /24 networks (254 hosts) are often ideal: small enough that a single misbehaving device doesn't flood the entire network with broadcasts, large enough for most floors/departments, and simple to calculate (just change the third octet). For larger segments, consider supernetting; for smaller (servers needing isolation), consider /27 or /28.
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.