DHCP Relays
also known as DHCP helper
is a networking feature that allows dhcp messages to be forwarded between different network
or subnets
commonly used for scenarios where the dhcp server is located on a different subnet than
the dhcp client
when a dhcp client wants to obtain an IP address and other configuration information, it sends
a dhcp discover message which is a broadcast on the local network. with DHCP relay enabled, instead of the DHCP discover message being limited to the local subnet, it is forwarded to a DHCP server on a different subnet.
dhcp relay is typically a router or a switch , intercepts the dhcp discover message and adds its own ip address to the message as a source IP then unicast the message to one or more dhcp server. dhcp server upon receiving the discover message reply a dhcp offer message to the relay agent the relay agent to the dhcp client
to enable the switch/router as a dhcp relay is by issuing the "ip helper-address command"
ip helper address = ip address of the dhcp server
Centralized DHCP Server
one DHCP server serving different subnets for IP allocations
Relay
conf t
int gi 0/0/1 //int facing the access switch
!ip helper-address (ip address of the dhcp server) //syntax
ip helper-address 192.168.10.1
exit
DHCP Server
conf t
ip route 192.168.1.0 255.255.255.0 192.168.10.2 //requirement for routing on the dhcp message
exit