Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

DHCP In Chassis Cluster Mode

 

Junos OS allows you to configure two SRX Series devices as DHCP clients and a third SRX Series device as a DHCP server and setup high availability between the two DHCP clients in chassis cluster mode.

Similarly, you can also configure two SRX Series devices as DHCP servers in chassis cluster mode and a third SRX Series device as a DHCP client. for more information, read this topic.

Example: Configuring the Device as a DHCP Server in Chassis Cluster Mode

This example shows how to configure a DHCP server in chassis cluster mode.

Requirements

This example uses the following hardware and software components:

  • Two SRX Series devices as DHCP servers

  • One SRX Series device as DHCP client

  • Junos OS Release 12.1X47-D10 or later for SRX Series Services Gateways

Before you begin:

  • Determine the IP address pools and the lease durations to use for each subnet.

  • Obtain the MAC addresses of the clients that require permanent IP addresses. Determine the IP addresses to use for these clients.

  • List the IP addresses that are available for the servers and devices on your network; for example, DNS, NetBIOS servers, boot servers, and gateway devices.

  • Determine the DHCP options required by the subnets and clients in your network.

Overview

In this example, you configure two SRX Series devices as DHCP servers and a third SRX Series device as a DHCP client. Configure the two DHCP servers in chassis cluster mode.

For the DHCP server, configure the SRX Series device as a DHCP local server with minimum DHCP local server configurations. You specify the server group as g1 and enable the DHCP local server on interface reth1.

For the DHCP client, you specify the interface as ge-0/0/1, set the logical unit as 0, and create a DHCP inet family. You then specify the DHCP client identifier as 00:0a:12:00:12:12 in hexadecimal. You use hexadecimal if the client identifier is a MAC address. You set the DHCP lease time as 86,400 seconds. The range is from 60 through 2,147,483,647 seconds.

You set the number of retransmission attempts to 6. The range is from 0 through 6, and the default is 4. You set the retransmission interval to 5 seconds. The range is from 4 through 64, and the default is 4 seconds. Finally, you set the IPv4 address of the preferred DHCP server to 10.1.1.1 and the vendor class ID to ether.

Warning

Starting with Junos OS Release 15.1X49-D60 and Junos OS Release 17.3R1, the legacy DHCPD (DHCP daemon) configuration on all SRX Series devices has been deprecated and only the new DHCP CLI is supported. When you upgrade to Junos OS Release 15.1X49-D60 and later releases on a device that already has the DHCPD configuration, the following warning messages are displayed:

WARNING: The DHCP configuration command used will be deprecated in future Junos releases.

WARNING: Please see documentation for updated commands.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Configure DHCP Server 1 and Server 2:

Configure chassis cluster on DHCP Server 1 and DHCP Server 2:

Configure the DHCP client:

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure the devices as DHCP servers:

  1. Configure the DHCP local server.
  2. Configure an address pool.

Step-by-Step Procedure

To configure the DHCP servers in chassis cluster mode:

  1. Specify the number of redundant Ethernet interfaces for the chassis cluster.
  2. Enable control link recovery.
  3. Configure heartbeat settings.
  4. Configure the redundancy groups.
  5. Configure redundant Ethernet interfaces.

Step-by-Step Procedure

To configure the device as DHCP client:

  1. Specify the DHCP client interface.
  2. Configure the DHCP client identifier as a hexadecimal value.
  3. Set the DHCP lease time.
  4. Set the number of attempts allowed to retransmit a DHCP packet.
  5. Set the interval (in seconds) allowed between retransmission attempts. The range is 4 through 64. The default is 4 seconds.
  6. Set the IPv4 address of the preferred DHCP server.
  7. Set the vendor class ID for the DHCP client.

Results

From configuration mode, confirm your configuration by entering the show commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

Verifying the DHCP Server in Chassis Cluster Mode

Purpose

Verify that the DHCP server is working in chassis cluster mode.

Action

From operational mode, enter the show dhcp server binding and show dhcp server statistics commands.

Meaning

The sample output shows that DHCP servers configured in the example work in a chassis cluster.

Example: Configuring the Device as a DHCP Client in Chassis Cluster Mode

This example shows how to configure the device as a DHCP client in chassis cluster mode.

Requirements

This example uses the following hardware and software components:

  • Two SRX Series devices as DHCP client

  • One SRX Series device as DHCP server

  • Junos OS Release 12.1X47-D10 or later for SRX Series Services Gateways

Before you begin:

  • Determine the IP address pools and the lease durations to use for each subnet.

  • Obtain the MAC addresses of the clients that require permanent IP addresses. Determine the IP addresses to use for these clients.

  • List the IP addresses that are available for the servers and devices on your network; for example, DNS, NetBIOS servers, boot servers, and gateway devices.

  • Determine the DHCP options required by the subnets and clients in your network.

Overview

In this example, you configure two SRX Series devices as DHCP clients and a third SRX Series device as a DHCP server. Configure the two DHCP clients in chassis cluster mode.

For DHCP clients, you specify the interface as reth1, set the logical unit as 0, and create a DHCP inet family. You then specify the DHCP client identifier as 00:0a:12:00:12:12 in hexadecimal. You use hexadecimal if the client identifier is a MAC address. You set the options no-hostname if you do not want the DHCP client to send the hostname with the packets. You set the DHCP lease time as 86,400 seconds. The range is from 60 through 2,147,483,647 seconds. You set the number of retransmission attempts to 6. The range is from 0 through 6, and the default is 4. You set the retransmission interval to 5 seconds. The range is from 4 through 64, and the default is 4 seconds. Finally, you set the IPv4 address of the preferred DHCP server to 203.0.113.1 and the vendor class ID to ether.

For the DHCP server, configure the SRX Series device as a DHCP local server with minimum DHCP local server configurations. You specify the server group as g1 and enable the DHCP local server on interface ge-0/0/2.0.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Configure DHCP Client 1 and Client 2:

Configure chassis cluster on Client 1 and Client 2:

Configure the DHCP server:

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure the devices as DHCP clients:

  1. Specify the DHCP client interface.
  2. Configure the DHCP client identifier as a hexadecimal value.
  3. Set the hostname if you do not want the DHCP client to send hostname in the packets (RFC option code 12).
  4. Set the DHCP lease time.
  5. Set the number of attempts allowed to retransmit a DHCP packet.
  6. Set the interval (in seconds) allowed between retransmission attempts. The range is 4 through 64. The default is 4 seconds.
  7. Set the IPv4 address of the preferred DHCP server.
  8. Set the vendor class ID for the DHCP client.

Step-by-Step Procedure

To configure the DHCP clients in chassis cluster mode:

  1. Specify the number of redundant Ethernet interfaces for the chassis cluster.
  2. Enable control link recovery.
  3. Configure heartbeat settings.
  4. Configure the redundancy groups.
  5. Configure redundant Ethernet interfaces.

Step-by-Step Procedure

To configure the device as DHCP server:

  1. Configure the DHCP local server.
  2. Configure IP address of the server.
  3. Configure an address pool.

Results

From configuration mode, confirm your configuration by entering the show commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verifying the DHCP Client in Chassis Cluster Mode

Purpose

Verify that the DHCP client is working in chassis cluster mode.

Action

From operational mode, enter the show dhcp client binding, show dhcp client statistics and show dhcp client binding interface reth1 detail commands.

Meaning

The sample output shows that DHCP clients configured in the example work in a chassis cluster.

Release History Table
Release
Description
Starting with Junos OS Release 15.1X49-D60 and Junos OS Release 17.3R1, the legacy DHCPD (DHCP daemon) configuration on all SRX Series devices has been deprecated and only the new DHCP CLI is supported.