Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Overrides for Default DHCP Local Server and DHCP Relay Configuration Settings

Overriding the Default DHCP Local Server Configuration Settings

Subscriber management enables you to override certain default DHCP local server configuration settings. You can override the configuration settings at the global level, for a named group of interfaces, or for a specific interface within a named group.

  • To override global default DHCP local server configuration options, include the overrides statement and its subordinate statements at the [edit system services dhcp-local-server] hierarchy level.

  • To override DHCP local server configuration options for a named group of interfaces, include the statements at the [edit system services dhcp-local-server group group-name] hierarchy level.

  • To override DHCP local server configuration options for a specific interface within a named group of interfaces, include the statements at the [edit system services dhcp-local-server group group-name interface interface-name] hierarchy level.

  • To configure overrides for DHCPv6 local server at the global level, group level, or per-interface, use the corresponding statements at the [edit system services dhcp-local-server dhcpv6] hierarchy level.

To override default DHCP local server configuration settings:

Overriding the Default DHCP Relay Configuration Settings

You can override the default DHCP relay configuration settings at the global level, for a named group of interfaces, or for a specific interface within a named group.

  • To override global default DHCP relay agent configuration options, include the overrides statement and its subordinate statements at the [edit forwarding-options dhcp-relay] hierarchy level.

  • To override DHCP relay configuration options for a named group of interfaces, include the statements at the [edit forwarding-options dhcp-relay group group-name] hierarchy level.

  • To override DHCP relay configuration options for a specific interface within a named group of interfaces, include the statements at the [edit forwarding-options dhcp-relay group group-name interface interface-name] hierarchy level.

  • To configure overrides for DHCPv6 relay at the global level, group level, or per-interface, use the corresponding statements at the [edit forwarding-options dhcp-relay dhcpv6] hierarchy level.

To override default DHCP relay agent configuration settings:

  1. (DHCPv4 and DHCPv6) Specify that you want to configure override options.
    • DHCPv4 overrides.

      Global override:

      Group-level override:

      Per-interface override:

    • DHCPv6 overrides.

      Global override:

      Group-level override:

      Per-interface override:

  2. (DHCPv4 only) Enable DHCP relay proxy mode.
  3. (DHCPv4 only) Overwrite the giaddr in DHCP packets that the DHCP relay agent forwards.
  4. (DHCPv4 only) Replace the IP source address in DHCP relay request and release packets with the gateway IP address (giaddr).
  5. (DHCPv4 only) Override the DHCP relay agent information option (option 82) in DHCP packets.
  6. (DHCPv4 only) Override the setting of the broadcast bit in DHCP request packets and use the Layer 2 unicast transmission method.
  7. (DHCPv4 only) Trust DHCP client packets that have a giaddr of 0 and that contain option 82 information.
  8. (DHCPv4 and DHCPv6) Override the maximum number of DHCP clients allowed per interface.
  9. (DHCPv4 only) Configure client auto logout.
  10. (DHCPv4 and DHCPv6) Enable or disable support for DHCP snooped clients on interfaces.
  11. (DHCPv4 and DHCPv6) Delay authentication of subscribers until the DHCP client sends a Request packet.
  12. (DHCPv4 and DHCPv6) Send release messages to the DHCP server when clients are deleted.
  13. (Optional) Specify that when the DHCP or DHCPv6 relay agent receives a Discover or Solicit message that has a client ID that matches the existing client entry, the relay agent deletes the existing client entry.
  14. (DHCPv6 only) Automatically log out existing client when new client solicits on same interface.
  15. (DHCPv4 only) Disable the DHCP relay agent on specific interfaces.
  16. (DHCPv4 and DHCPv6) Disable automatic binding of stray DHCP requests.
  17. (DHCPv4 and DHCPv6) Assign a single-session DHCP dual-stack group to a specified group of subscribers. You must assign the group to both legs of the DHCP dual stack.
  18. (Optional, DHCPv4 and DHCPv6l) Specify that a short lease be sent to the client.

DHCP Behavior When Renegotiating While in Bound State

All DHCP models (DHCPv4 and DHCPv6 local server and relay agent) use the same default behavior when receiving a DHCPv4 Discover or DHCPv6 Solicit message while in a bound state. In the default behavior, DHCP maintains the existing client entry when it receives a new Discover or Solicit message that has a client ID that matches the existing client. DHCP responds to the client with an Offer or Advertise message.

You can use the delete-binding-on-renegotiation statement to override the default behavior on DHCP local server or DHCP relay agent. You can configure the override on a global or group basis. In the override configuration, when DHCP is in a bound state and receives a Discover or Solicit message with a matching client entry, DHCP drops the message and does not process it. On a DHCP relay agent, the agent sends a Release message to the local server. DHCP cleans up the existing session and deletes the existing client entry, removing the binding. When a second Discover or Solicit message is received from the client, the message is processed and DHCP negotiation proceeds.

Note:

In releases earlier than Junos OS Release 15.1, the default behavior for DHCPv6 local server and relay agent is the same as the override behavior in Junos OS Release 15.1 and later. For any release, the default behavior for DHCPv4 local server and relay agent is to maintain the existing client entry and respond without waiting for a second Discover or Solicit message.

For example, to configure DHCPv4 local server to override the default renegotiation behavior globally:

  1. Specify that you want to configure a DHCP local server.
  2. Specify that you want to configure an override action.
  3. Specify that you want DHCP local server to override the default renegotiation behavior.

For example, to configure DHCPv6 relay agent to override the default renegotiation behavior for an interface group:

  1. Specify that you want to configure DHCPv6 relay agent.

  2. Specify that the configuration is for an interface group.

  3. Specify that you want to configure an override action.

  4. Specify that you want DHCPv6 relay agent to override the default renegotiation behavior.

Sending Release Messages When Clients Are Deleted

By default, when DHCP relay and relay proxy delete a client, they do not send a release message to the DHCP server. You can override the default behavior and configure DHCP relay and relay proxy to send a release message whenever they delete a client. The release message sent by DHCP relay and relay proxy includes option 82 information.

Note:

You must include the send-release-on-delete statement to configure DHCP relay and relay proxy to send the release message when the client-discover-match statement is included.

You can use the [edit forwarding-options dhcp-relay dhcpv6] hierarchy level to override the default behavior for DHCPv6 relay agent.

To send a release message:

  1. Specify that you want to configure override options.
    • For DHCP relay agent:

    • For DHCPv6 relay agent:

  2. Specify that you want DHCP relay and relay proxy (or DHCPv6 relay agent) to send a release message when clients are deleted.

Disabling Automatic Binding of Stray DHCP Requests

DHCP requests that are received but have no entry in the database are known as stray requests. By default, DHCP relay, DHCP relay proxy, and DHCPv6 relay agent attempt to bind the requesting client by creating a database entry and forwarding the request to the DHCP server. If the server responds with an ACK, the client is bound and the ACK is forwarded to the client. If the server responds with a NAK, the database entry is deleted and the NAK is forwarded to the client. This behavior occurs regardless of whether authentication is configured.

You can override the default configuration at the global level, for a named group of interfaces, or for a specific interface within a named group. Overriding the default causes DHCP relay, DHCP relay proxy, and DHCPv6 relay agent to drop all stray requests instead of attempting to bind the clients.

Note:

Automatic binding of stray requests is enabled by default.

  • To disable automatic binding behavior, include the no-bind-on-request statement when you configure DHCP overrides at the global, group, or interface level.

  • To override the default behavior for DHCPv6 relay agent, configure the override at the [edit forwarding-options dhcp-relay dhcpv6] hierarchy level.

The following two examples show a configuration that disables automatic binding of stray requests for a group of interfaces and a configuration that disables automatic binding on a specific interface.

To disable automatic binding of stray requests on a group of interfaces:

  1. Specify the named group.
  2. Specify that you want to configure overrides.
  3. Disable automatic binding for the group.

To disable automatic binding of stray requests on a specific interface:

  1. Specify the named group of which the interface is a member.

  2. Specify the interface on which you want to disable automatic binding.

  3. Specify that you want to configure overrides.

  4. Disable automatic binding on the interface.

Enabling DHCP Relay Proxy Mode

You can enable DHCP relay proxy mode on all interfaces or a group of interfaces.

To enable DHCP relay proxy mode:

  1. Specify that you want to configure override options.
  2. Enable DHCP relay proxy mode.

Changing the Gateway IP Address (giaddr) Field to the giaddr of the DHCP Relay Agent

You can configure the DHCP relay agent to change the gateway IP address (giaddr) field in packets that it forwards between a DHCP client and a DHCP server.

To overwrite the giaddr of every DHCP packet with the giaddr of the DHCP relay agent before forwarding the packet to the DHCP server:

  1. Specify that you want to configure override options.
  2. Specify that the giaddr of DHCP packets is overwritten.

Configure DHCP Relay Agent to Replace Request and Release Packets with Gateway IP address

You can configure the DHCP relay agent to replace request and release packets with the gateway IP address (giaddr) before forwarding the packet to the DHCP server.

To replace the source address with giaddr:

  1. Specify that you want to configure override options.
  2. Specify that you want to replace the IP source address in DHCP relay request and release packets with the gateway IP address (giaddr).

Configuring the DHCP Relay Agent Source Address to Enable DHCP Packets to Pass Through a Firewall

In network configurations where a firewall on the broadband network gateway (BNG) is between the DHCP relay agent and the DHCP server, only the BNG loopback address passes through the firewall. In that case, DHCP unicast packets are discarded. To enable DHCP unicast packets to pass through the BNG firewall, configure the source address in DHCP packets and DHCP messages to be the configured loopback address.

In addition to configuring the IP source address, on the DHCPv4 relay server, configure Link Selection (suboption 5) in option 82 information to cause the DHCP server to locate the correct address pool for the DHCP client when the server receives a forwarded packet, and Server ID Override (suboption 11) in option 82 information to set the server ID option in the DHCP packet.

To configure DHCPv4 relay agent to use the loopback address as the source address:

  1. Configure the DHCPv4 relay agent to set the IP source address of DHCP packets to the configured loopback address.
  2. Configure the DHCPv4 relay agent to add Server ID and Link Selection suboptions to option 82 information:

To configure DHCPv6 relay agent to use the loopback address as the source address:

  1. Configure the DHCPv6 relay agent to set the IP source address of DHCP packets to the configured loopback address.

Using Layer 2 Unicast Transmission instead of Broadcast for DHCP Packets

You can configure the DHCP relay agent to override the setting of the broadcast bit in DHCP request packets. DHCP relay agent then instead uses the Layer 2 unicast transmission method to send DHCP Offer reply packets and DHCP ACK reply packets from the DHCP server to DHCP clients during the discovery process.

To override the default setting of the broadcast bit in DHCP request packets:

  1. Specify that you want to configure override options.
  2. Specify that the DHCP relay agent uses the Layer 2 unicast transmission method.

Disabling DHCP Relay Agent for Interfaces, for Groups, or Globally

You can disable DHCP relay on all interfaces or a group of interfaces.

To disable DHCP relay agent:

  1. Specify that you want to configure override options.
  2. Disable the DHCP relay agent.