Configuring a DHCP Relay Agent on Ubuntu

A Dynamic Host Configuration Protocol (DHCP) relay agent is a network service that forwards DHCP requests from clients on one network to a DHCP server on another network. This is particularly useful in larger network environments where multiple subnets exist and maintaining a DHCP server on each subnet is not practical. Configuring a DHCP relay agent ensures that all clients, regardless of their network location, can obtain IP configuration from a centralized DHCP server.

Step 1: Install isc-dhcp-relay

sudo apt update
sudo apt install isc-dhcp-relay

Step 2: Configure isc-dhcp-relay

sudo nano /etc/default/isc-dhcp-relay

Here, you will need to set the following options:

SERVERS="192.168.1.1"
INTERFACES="eth0"
OPTIONS=""

Step 3: Restart isc-dhcp-relay

sudo systemctl restart isc-dhcp-relay