All nodes on a network require a unique IP address to communicate with other devices. The static assignment of IP addressing information on a large network results in an administrative burden that can be eliminated by using DHCPv4 or DHCPv6 to dynamically assign IPv4 and IPv6 addressing information respectively.
DHCPv4 includes three different address allocation mechanisms to provide flexibility when assigning IP addresses:
- Manual Allocation - The administrator assigns a pre-allocated IPv4 address to the client, and DHCPv4 communicates only the IPv4 address to the device.
- Automatic Allocation - DHCPv4 automatically assigns a static IPv4 address permanently to a device, selecting it from a pool of available addresses. There is no lease and the address is permanently assigned to the device.
- Dynamic Allocation - DHCPv4 dynamically assigns, or leases, an IPv4 address from a pool of addresses for a limited period of time as configured on the server, or until the client no longer needs the address.
Dynamic allocation is the most commonly used DHCPv4 mechanism and involves the exchange of several different packets between the DHCPv4 server and the DHCPv4 client resulting in the lease of valid addressing information for a predefined period of time.
Messages originating from the client (DHCPDISCOVER, DHCPREQUEST) are broadcast to allow all DHCPv4 servers on the network to hear the client request for, and receipt of, addressing information. Messages originating from the DHCPv4 server (DHCPOFFER, DHCPACK) are sent as unicasts directly to the client requesting the information.
There are two methods available for the dynamic configuration of IPv6 global unicast addresses.
- Stateless Address Autoconfiguration (SLAAC )
- Dynamic Host Configuration Protocol for IPv6 (Stateful DHCPv6)
With stateless autoconfiguration, the client uses information provided by the IPv6 RA message to automatically select and configure a unique IPv6 address. The stateless DHCPv6 option informs the client to use the information in the RA message for addressing, but additional configuration parameters are available from a DHCPv6 server.
Stateful DHCPv6 is similar to DHCPv4. In this case, the RA message informs the client not to use the information in the RA message. All addressing information and configuration information is obtained from a stateful DHCPv6 server. The DHCPv6 server maintains IPv6 state information similar to a DHCPv4 server allocating addresses for IPv4.
If the DHCP server is located on a different network segment than the DHCP client then it is necessary to configure a relay agent. The relay agent forwards specific broadcast messages originating from a LAN segment to a specified server located on a different LAN segment (in this case, a DHCP broadcast message would be forwarded to a DHCP server).
Troubleshooting issues with DHCPv4 and DHCPv6, involves the same tasks:
- Resolve Address Conflicts
- Verify Physical Connectivity
- Test Connectivity using a Static IP Address
- Verify Switch Port Configuration
- Test Operation on the Same Subnet or VLAN