ON THIS PAGE
Overriding the Default DHCP Local Server Configuration Settings
Changing the Gateway IP Address (giaddr) Field to the giaddr of the DHCP Relay Agent
Configure DHCP Relay Agent to Replace Request and Release Packets with Gateway IP address
Configuring the DHCP Relay Agent Source Address to Enable DHCP Packets to Pass Through a Firewall
Using Layer 2 Unicast Transmission instead of Broadcast for DHCP Packets
Disabling DHCP Relay Agent for Interfaces, for Groups, or Globally
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:
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.
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:
For example, to configure DHCPv6 relay agent to override the default renegotiation behavior for an interface group:
Specify that you want to configure DHCPv6 relay agent.
[edit forwarding-options] user@host# edit dhcp-relay dhcpv6
Specify that the configuration is for an interface group.
[edit forwarding-options dhcp-relay dhcpv6] user@host# edit group boston
Specify that you want to configure an override action.
[edit forwarding-options dhcp-relay dhcpv6 group] user@host# edit overrides
Specify that you want DHCPv6 relay agent to override the default renegotiation behavior.
[edit forwarding-options dhcp-relay dhcpv6 group overrides] user@host# set delete-binding-on-renegotiation
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.
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:
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.
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.[edit forwarding-options dhcp-relay overrides] user@host# set no-bind-on-request
To override the default behavior for DHCPv6 relay agent, configure the override at the
[edit forwarding-options dhcp-relay dhcpv6]
hierarchy level.[edit forwarding-options dhcp-relay dhcpv6 overrides] user@host# set no-bind-on-request
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:
To disable automatic binding of stray requests on a specific interface:
Specify the named group of which the interface is a member.
[edit forwarding-options dhcp-relay] user@host# edit group boston
Specify the interface on which you want to disable automatic binding.
[edit forwarding-options dhcp-relay group boston] user@host# edit interface fe-1/0/1.2
Specify that you want to configure overrides.
[edit forwarding-options dhcp-relay group boston interface fe-1/0/1.2] user@host# edit overrides
Disable automatic binding on the interface.
[edit forwarding-options dhcp-relay group boston interface fe-1/0/1.2 overrides] user@host# set no-bind-on-request
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:
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:
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:
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:
To configure DHCPv6 relay agent to use the loopback address as the source address:
Configure the DHCPv6 relay agent to set the IP source address of DHCP packets to the configured loopback address.
[edit forwarding options dhcp-relay dhcpv6 overrides] user@host# set relay-source lo0
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:
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: