Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Common DHCP Configuration for Interface Groups and Server Groups

Grouping Interfaces with Common DHCP Configurations

You use the group feature to group a set of interfaces and then apply a common DHCP configuration to the named interface group. The extended DHCP local server, DHCPv6 local server, DHCP relay agent, and DHCPv6 relay agent all support interface groups.

The following steps create a DHCP local server group; the steps are similar for the DHCPv6 local server, DHCP relay agent, and DHCPv6 relay agent.

To configure a DHCP local server interface group:

  1. Specify that you want to configure DHCP local server.
  2. Create the group and assign a name.

  3. Specify the names of one or more interfaces on which the extended DHCP application is enabled. You can repeat the interface interface-name statement to specify multiple interfaces within the group, but you cannot use the same interface in more than one group.
  4. (Optional) You can use the upto option to specify a range of interfaces for a group.
  5. (Optional) You can use the exclude option to exclude a specific interface or a specified range of interfaces from the group. For example:

Example- 2

To configure an interface group, use the group statement.

You can specify the names of one or more interfaces on which the extended DHCP application is enabled. You can repeat the interface interface-name statement to specify multiple interfaces within a group, but you cannot specify the same interface in more than one group. For example:

  1. The extended DHCP applications enable you to group together a set of interfaces and apply a common DHCP configuration to the named interface group.

  2. You can use the upto option to specify a range of interfaces on which the extended DHCP application is enabled. For example:

  3. You can use the exclude option to exclude a specific interface or a specified range of interfaces from the group. For example:

Example:

Guidelines for Configuring Interface Ranges for Groups of DHCP Interfaces

This topic describes guidelines to consider when configuring interface ranges for named interface groups for DHCP local server and DHCP relay. The guidelines refer to the following configuration statement:

  • The start subunit, interface interface-name , serves as the key for the stanza. The remaining configuration settings are considered attributes.

  • If the subunit is not included, an implicit .0 subunit is enforced. The implicit subunit is applied to all interfaces when autoconfiguration is enabled. For example, interface ge-2/2/2 is treated as interface ge-2/2/2.0.

  • Ranged entries contain the upto option, and the configuration applies to all interfaces within the specified range. The start of a ranged entry must be less than the end of the range. Discrete entries apply to a single interface, except in the case of autoconfiguration, in which a 0 (zero) subunit acts as a wildcard.

  • Interface stanzas defined within the same router or switch context are dependent and can constrain each other—both DHCP local server and DHCP relay are considered. Interface stanzas defined across different router (switch) contexts are independent and do not constrain one another.

  • Each interface stanza, whether discrete or ranged, has a unique start subunit across a given router context. For example, the following configuration is not allowed within the same group because ge-1/0/0.10 is the start subunit for both.

  • Two groups cannot share interface space. For example, the following configuration is not allowed because the three stanzas share the same space and interfere with one another—interface ge-1/0/0.26 is common to all three.

  • Two ranges cannot overlap, either within a group or across groups. Overlapping occurs when two interface ranges share common subunit space but neither range is a proper subset of the other. The following ranges overlap:

  • A range can contain multiple nested ranges. A nested range is a proper subset of another range. When ranges are nested, the smallest matching range applies.

    In the following example, the three ranges nest properly:

  • Discrete interfaces take precedence over ranges. In the following example, interface ge-1/0/0.20 takes precedence and enforces an interface client limit of 5.

Configuring Group-Specific DHCP Local Server Options

You can include the following statements at the [edit system services dhcp-local-server group group-name] hierarchy level to set group-specific DHCP local server configuration options. Statements configured at the [edit system services dhcp-local-server group group-name] hierarchy level apply only to the named group of interfaces, and override any global DHCP local server settings configured with the same statements at the [edit system services dhcp-local-server] hierarchy level.

DHCPv6 local server supports the same set of statements with the exception of the dynamic-profile statement.

  • authentication —Configure the parameters the router sends to the external AAA server.

  • dynamic-profile —Specify the dynamic profile that is attached to a group of interfaces.

  • interface —Specify one or more interfaces, or a range of interfaces, that are within the specified group.

  • liveness-detection —Configure bidirectional failure detection timers and authentication criteria for static routes, or Layer 2 liveness detection using ARP and Neighbor Discovery packets. For more information, see DHCP Liveness Detection Overview.

  • overrides —Override the default configuration settings for the extended DHCP local server. For information, see Overriding the Default DHCP Local Server Configuration Settings.

  • interface-tag—(Optional) Specifies a tag name for the interface that will be associated with a DHCP configuration. Use the tag to identify subscribers associated with this DHCP local server group.

Configuring Group-Specific DHCP Relay Options

You can include the following statements at the [edit forwarding-options dhcp-relay group group-name] hierarchy level to set group-specific DHCP relay agent configuration options. Group-specific statements apply only to the named group of interfaces, and override any global DHCP relay agent settings for the same statement.

Include the statements at the [edit forwarding-options dhcp-relay dhcpv6 group group-name] hierarchy level to configure group-specific options for DHCPv6 relay agent.

Configuring Active Server Groups to Apply a Common DHCP Relay Agent Configuration to Named Server Groups

You can apply a common DHCP or DHCPv6 relay configuration to a set of IP addresses configured as a server group. An active server group is sometimes referred to as a trusted group of servers.

You can configure active server groups globally or at the group level (configured with the group. When you apply the active server group at the group level, it overrides a global active server group configuration.

To configure a group of DHCP server addresses and apply them as an active server group:

  1. Specify the name of the server group.
    • For DHCPv4 servers:

    • For DHCPv6 servers:

  2. Add the IP addresses of the DHCP servers belonging to the group.
    • For DHCPv4 servers:

    • For DHCPv6 servers:

    Note:

    Starting in Junos OS Release 18.4R1, up to 32 server IP addresses are supported per DHCPv4 server group. In earlier releases, a maximum of 5 server IP addresses are supported for DHCPv4 servers. Configuring more than the maximum number of server addresses results in a commit check failure.

  3. Apply the server group as an active server group.
    • At global level (DHCPv4)

    • At group-level (DHCPv4)

    • At global level (DHCPv6)

    • At group-level (DHCPv6)

Example: Configuring Active Server Groups in DHCP Relay Agent Configuration

For example, you might want to direct certain DHCP client traffic to a DHCP server. You can configure an interface group for each set of clients, specifying the DHCP relay interfaces for the group. In each of these groups, you specify an active server group to which each client groups traffic is forwarded. After a DHCP server group is created and server IP addresses are added to the group, the device used as the DHCP relay agent can forward messages to specific servers.

  • Three groups of DHCP server addresses are configured, Default, Campus-A, and Campus-B.

  • The Default group is applied as the global active server group for the overall DHCP relay configuration.

  • The Campus-A server group is assigned as the active server group for interface group Campus-A-v10-DHCP-RELAY. DHCP traffic received on the interfaces in Campus-A-v10-DHCP-RELAY is forwarded to DHCP servers 198.51.100.100 and 198.51.100.101.

  • The Campus-B server group is assigned as the active server group for interface group Campus-B-v200-DHCP-RELAY. DHCP traffic received on the interfaces in Campus-B-v200-DHCP-RELAY is forwarded to DHCP servers 198.51.100.55 and 198.51.100.56.

  • All other DHCP traffic is forwarded to DHCP server 203.0.113.1.

Note the following:

  • In some configurations, servers in an active server group maintain redundant information about the DHCP clients. If the binding server later becomes inaccessible, the client is unable to renew the lease from that server. When the client attempts to rebind to a server, other servers in the group with the client information can reply with an ACK message. By default, instead of forwarding the ACK to the DHCP client, the relay agent drops any such ACKs that it receives from any server other than the binding server because the new server address does not match the expected server address in the DHCP client entry. Consequently the lease cannot be extended by any of the redundant servers.

  • Starting in Junos OS Release 16.2R1, you can enable a DHCPv4 relay agent to forward DHCP request (renew or rebind) ACKs from any server in the active server group (thus, any trusted server). The relay agent updates the client entry with the new server address. Because the servers in the group are expected to mirror the client information exactly, the lease option is expected to be the same as for the original server and the relay agent does not need to verify the lease option.

  • Starting in Junos OS Release 18.4R1, this capability is extended to allow a DHCP relay agent to forward DHCP information request (DHCPINFORM) ACK messages from any server in the active server group.

To enable ACK forwarding from any server in the active server group:

  • Enable forwarding for the active server group.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
18.4R1
Starting in Junos OS Release 18.4R1
16.2R1
Starting in Junos OS Release 16.2R1