Module 11: Dynamic Addressing with DHCP
Static and Dynamic Addressing
In static addressing, the network administrator manually configures network settings for each host. This includes at least the host’s IPv4 address, subnet mask, and default gateway. While static addressing provides better control over network resources, it can be labor-intensive and error-prone, especially in larger networks. Accurate documentation of assigned IPv4 addresses is essential to avoid conflicts or mismanagement.
In contrast, dynamic addressing uses the Dynamic Host Configuration Protocol (DHCP) to automate the assignment of IPv4 addresses. DHCP simplifies network management by dynamically allocating IPv4 addresses to devices. Advantages of DHCP include:
- Reduced administrative burden.
- Elimination of manual entry errors.
- Temporary leasing of IPv4 addresses rather than permanent assignments, enabling reuse of addresses when devices disconnect from the network.
For example, in a wireless hotspot, a device’s DHCP client requests an IPv4 address from the local DHCP server over the wireless connection. Similarly, in home networks, the DHCP server functionality is often provided by the Internet Service Provider (ISP) or by a wireless router acting as both a DHCP client (for external ISP communication) and a DHCP server (for internal network clients).
DHCPv4 Configuration
A DHCP server assigns IPv4 addresses from a predefined range or pool. The DHCP address assignment process follows a four-step communication sequence:
-
DHCP Discover:
- A client broadcasts a DHCP Discover message to locate an available DHCP server.
- The message uses a broadcast IPv4 address (255.255.255.255) and a broadcast MAC address (FF-FF-FF-FF-FF-FF), ensuring all devices on the local network receive the request.
-
DHCP Offer:
- The DHCP server responds with a DHCP Offer, suggesting an available IPv4 address and configuration details for the client.
-
DHCP Request:
- The client replies with a DHCP Request, confirming its intent to use the offered IPv4 address.
-
DHCP Acknowledgment (ACK):
- The DHCP server finalizes the process by sending a DHCP Acknowledgment, confirming the lease of the IPv4 address to the client.
For home and small business networks, a wireless router typically provides DHCP services to local devices. Configuration of the router involves accessing its graphical web interface through a browser, using the router’s default IPv4 address (commonly 192.168.0.1) as the gateway. The subnet mask is usually set to 255.255.255.0 by default.
The wireless router also acts as the internal DHCP server, automatically assigning IPv4 addresses to local hosts. In most cases, DHCP server functionality is enabled by default on wireless routers, streamlining network setup for home users.