Purpose:

This article helps to understand what is DCHP Relay, how to configure VOS as DHCP relay and what happens when multiple DHCP forwarders are configured.

DHCP Relay:

A DHCP relay is a network device or software component that facilitates the distribution of DHCP messages between DHCP clients and DHCP servers that are located on different subnets or network segments.

Use cases:

  • To allow clients on different subnets to obtain IP addresses from a central DHCP server: This is useful for large networks with multiple subnets, as it eliminates the need to deploy and manage a DHCP server on each subnet.
  • To provide a single point of DHCP configuration and management: This can simplify DHCP administration in large networks, as all DHCP configuration and management can be done on the DHCP relay agent.
  • To provide redundancy for DHCP servers : If a DHCP server fails, the DHCP relay agent can continue to forward DHCP requests to remaining DHCP servers.

Topology:


Working:

  1. DHCP Client sends the Discover packet to the DHCP Relay
  2. The DHCP Relay receives the Discover packet and forwards it to all the configured DHCP Servers.
  3. Each DHCP Server sends DHCP Offer packet to the client. The DHCP relay agent receive the Offer packet and forwards them to the DHCP Client.
  4. On receiving the Offer packet, the client selects the DHCP Server from which to obtain the Configuration information. Usually it depends on the client algorithms on which offer to choose.
  5. The client sends the request packet that specifies the DHCP server from which to obtain the configuration.
  6. The DHCP relay agent receives the DHCP Request and forwards it to the DHCP server.
  7. The DHCP Server requested by the client sends an ACK packet that contains client configuration parameters.
  8. DHCP Relay then forwards the ACK packet to the Client and the Client saves the configuration information.

Configuration:

  • To Configure DHCP Relay profile, go to Configuration → Networking → DHCP → Relay → Relay Profiles.
  • Provide a Name to the Profile and under "Gateway IP Address" provide the IP address of the LAN interface that receives DHCP request from the client, Under "Pass Through" select the required option from the dropdown.
    • Note: Default configuration is "Keep" and we have an option to modify it to "Drop" or "Replace" where the VOS Keeps/Drops/Replaces the DHCP 82 Options information.

  • To configure the Forwarding Information, Under "Routing Instance" select the routing instance from which DHCP servers are reachable.
  • Under "Source Address", provide the IP from which DCHP messages are sourced and under "Forwarding Address", provide the IP Address of DHCP servers.

  • To Configure DHCP Relay, go to Configuration → Networking → DHCP → Relay → Relay.

Under "Match" Tab configure criteria based on which the DHCP messages are selected for forwarding to the DHCP server.

Under "Relay settings" select the configured Reay Profile.

Note: Logging for Relay is not applicable and will be removed in future releases.

Verification:

Relay Statistics can be checked using: show orgs org-services <Org-Name> dhcp statistics dhcp relay-profile

PCAP on DHCP Relay LAN (CPE4):