9.3.1. Configure dhcrelay as a DHCPv4 and BOOTP relay agent
To run
dhcrelay in
DHCPv4
and
BOOTP
mode specify the servers to which the requests should be forwarded to. Copy and then edit the
dhcrelay.service
file as the
root
user:
~]# cp /lib/systemd/system/dhcrelay.service /etc/systemd/system/
~]# vi /etc/systemd/system/dhcrelay.service
Edit the
ExecStart
option under section [Service] and add one or more server
IPv4
addresses to the end of the line, for example:
ExecStart=/usr/sbin/dhcrelay -d --no-pid 192.168.1.1
If you also want to specify interfaces where the DHCP Relay Agent listens for
DHCP
requests, add them to the
ExecStart
option with
-i
argument (otherwise it will listen on all interfaces), for example:
ExecStart=/usr/sbin/dhcrelay -d --no-pid 192.168.1.1 -i em1
For other options see the
dhcrelay(8)
man page.
To activate the changes made, as the
root
user, restart the service:
~]# systemctl --system daemon-reload
~]# systemctl restart dhcrelay