4.0 CCNA - IP Services
4.6 DHCP Client and Relay Agents – Roles
DHCP Relay Agent - Functions
DHCP relay is a networking function that allows a DHCP client to receive a dynamically assigned IP address from a DHCP server that is located on a different network segment.
The DHCP relay agent acts as an intermediary between the DHCP client and the DHCP server. The DHCP relay agent listens for DHCP requests from DHCP clients, encapsulates these requests, and then forwards them to the DHCP server. The DHCP server then sends its response back to the relay agent, which then forwards the response to the DHCP client.
This is useful in large networks where multiple subnets are present, as it allows the DHCP server to be centralized and reduces the administrative overhead of configuring and maintaining separate DHCP servers for each subnet.
DHCP relay configuration on a Cisco IOS device
In a Cisco IOS device, DHCP relay can be configured using the ip helper-address command on the interfaces facing the clients. The DHCP relay agent can then forward the client requests to the DHCP server, which can be located on another network segment. This allows the DHCP clients to receive dynamic IP addresses even if they are not directly connected to the DHCP server.
To configure a Cisco IOS device as a DHCP relay agent, the following steps can be taken:
1. Enable the interface on which the DHCP relay agent will operate:
interface <interface-name> no shutdown
2. Configure the IP address and subnet mask for the interface:
interface <interface-name> ip address <ip-address> <subnet-mask>
3. Configure the DHCP relay agent to forward DHCP requests from clients to the DHCP server:
interface <interface-name> ip helper-address <dhcp-server-ip-address>
4. Verify the DHCP relay agent configuration:
show ip interface <interface-name>