DHCP Relay Best Practices
The purpose of a DHCP relay is to forward incoming requests from DHCP clients to a DHCP server. Normally, a client can talk directly to a DHCP server; especially on a single subnet. However, in the case where the server and clients are not on the same subnet, a DCHP relay agent can be deployed to mediate these requests. The SSR can accommodate this type of DHCP relay services.
Requirements
To configure DHCP relay on the SSR, the following requirements must be met or available.
- IP address of the DHCP server which manages the DHCP address pool.
- The DHCP server must be accessible from the SSR.
- A unique tenant must be configured for the DHCP relay to flag requests observed by the SSR.
Design Types
The following standard design models for DHCP Relay are addressed in this guide:
Architecture
A high-level overview of the architecture used for testing is shown in the diagram below.
Site Types
The following characteristics define the common models where DHCP Relay is deployed:
- Enterprise DC to Branch relay (DHCP server lives on the DC LAN)
- Branch to Branch relay (DHCP server lives on one of the branch LANs)
DHCP Relay with SVR
Most basic deployments utilize DHCP relay with SVR only, where DHCP relay is implemented in its simplest form. The key elements to configure are tenants, services, and service-routes. The final step is to tag the branch office’s network interface with the tenant. This will be the interface receiving DHCP broadcasts.
Tenant
A unique tenant and service must be designed as shown below. This tenant will be used to tag and identify DHCP request session on the ingress interface and associated them with the dhcp-relay service.
config
authority
tenant dhcp.demo
name dhcp.demo
exit
exit
exit
Service
A service is created with application-type dhcp-relay
. A unique tenant must be applied to the access policy to allow the SSR to process DHCP requests.
config
authority
service dhcp_relay
name dhcp_relay
security internal
access-policy dhcp.demo
source dhcp.demo
exit
application-type dhcp-relay
exit
exit
exit
Service Route
A service-route is configured on the Branch1 or Enterprise DC routers referencing the DHCP relay service, with a service-agent next-hop
pointing to the IP address of the DHCP server (nat-target
in the example below).
config
authority
router Branch1
name Branch1
service-route dhcp_relay_service-route
name dhcp_relay_service-route
service-name dhcp-relay
nat-target 172.16.1.3
next-hop node1 lan1
node-name node1
interface node1
exit
exit
exit
exit
exit
Network Interface
On the router processing the DHCP relay requests (Branch 2), the unique tenant created must be applied to the network-interface receiving the DHCP broadcasts. These DHCP request broadcasts are tagged by the tenant and associated with the dhcp-relay
service. After the association is made, the SSR will convert the broadcast into a unicast and forward it to the IP of the DHCP servers.
config
authority
router Branch2
name Branch2
node node1
name node1
device-interface blue-lan1
name blue-lan1
pci-address 0000:00:04.0
network-interface lan1
name lan1
global-id 6
tenant dhcp.demo
inter-router-security internal
source-nat true
address 172.26.2.25
ip-address 172.26.2.25
prefix-length 24
gateway 172.26.2.1
exit
exit
exit
exit
exit
exit