You can configure extended DHCP relay options on the router and enable the router to function as a DHCP relay agent. A DHCP relay agent forwards DHCP request and reply packets between a DHCP client and a DHCP server. You can use DHCP relay in carrier edge applications such as video/IPTV to obtain configuration parameters, including an IP address, for your subscribers.
For more information about how to use the DHCP relay agent in a video/IPTV application, see the JUNOS Feature Guide.
![]() |
Note: The extended DHCP relay agent options configured with the dhcp-relay statement are incompatible with the DHCP/BOOTP relay agent options configured with the bootp statement. As a result, you cannot enable both the extended DHCP relay agent and the DHCP/BOOTP relay agent on the router at the same time. For information about the DHCP/BOOTP relay agent, see the JUNOS Policy Framework Configuration Guide. |
To configure the extended DHCP relay agent on the router, include the dhcp-relay statement at the [edit forwarding-options] hierarchy level. See the [edit forwarding-options dhcp-relay] Hierarchy Level for the complete DHCP relay agent syntax.
You can also include the dhcp-relay statement at the following hierarchy levels:
This overview covers:
In a typical carrier edge network configuration, the DHCP client is on the subscriber’s computer, and the DHCP relay agent is configured on the router between the DHCP client and one or more DHCP servers.
The following steps describe, at a high level, how the DHCP client, DHCP relay agent, and DHCP server interact in a configuration that includes two DHCP servers.
The DHCP application on a video services router uses both access routes and access-internal routes to represent either the end users or the networks behind the attached router. An access route represents a network behind an attached video services router, and is set to a preference of 13. An access-internal route is a /32 route that represents a directly attached end user, and is set to a preference of 12.
To configure import and export of access routes and access-internal routes in a routing policy, include the access and access-internal keywords as match conditions at the [edit policy-options policy-statement policy-name term term-name from protocol] hierarchy level. For information, see the JUNOS Policy Framework Configuration Guide.
To display configuration information for access routes and access-internal routes, use the show route extensive, show route protocol access, and show route protocol access-internal operational commands. For command syntax and examples, see the JUNOS Routing Protocols and Policies Command Reference.
The extended DHCP relay agent maintains the state of active DHCP client leases in persistent storage on the router. It can recover this state if the DHCP relay agent process fails or is manually restarted, or if you manually reboot (gracefully shut down) the router. DHCP state persistence prevents the loss of active DHCP clients in either of these circumstances. If a power failure occurs or if the kernel stops operating on a single Routing Engine, however, the state of active DHCP client leases is lost.
DHCP state persistence is automatically enabled when you configure the extended DHCP relay agent on the router by including the dhcp-relay statement.
The DHCP relay agent records in persistent storage only those DHCP clients that are fully bound, which means that they currently have an active lease on an IP address from a DHCP server. DHCP clients in a renewal or rebind state are considered to be fully bound, and their state is also maintained in persistent storage. When a DHCP client lease expires or the client is released, the DHCP relay agent removes the client state from persistent storage.
The extended DHCP relay agent supports graceful Routing Engine switchover on all routing platforms that contain dual Routing Engines. To support graceful Routing Engine switchover, the DHCP relay agent automatically mirrors (replicates) information about the state of bound DHCP clients from the master Routing Engine to the backup Routing Engine.
To enable graceful Routing Engine switchover support for the extended DHCP relay agent, include the graceful-switchover statement at the [edit chassis redundancy] hierarchy level. You cannot disable graceful Routing Engine switchover support for the extended DHCP relay agent when the router is configured to support graceful Routing Engine switchover.
For more information about using graceful Routing Engine switchover, see the JUNOS High Availability Configuration Guide.