Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Supported Platforms

Configuring a DHCP Client

Minimum DHCP Client Configuration

The following sample output shows the minimum configuration you must use to configure an SRX Series device as a DHCP client. In this output, the interface is ge-0/0/0 and the logical unit is 0.

[edit interfaces]
ge-0/0/0 {unit 0 {family inet {dhcp-client}}}

Note: To configure a DHCP client in a routing instance, add the interface in a routing instance using the [edit routing-instances] hierarchy.

Configuring Optional DHCP Client Attributes

For the device to operate as a DHCP client, you configure a logical interface on the device to obtain an IP address from the DHCP local server in the network. You can then set the client-identifier, lease time, retransmission attempts, retry interval, preferred DHCP local server address, and vendor class ID.

To configure optional DHCP client attributes:

  1. Configure the DHCP client identifier prefix as the routing instance name.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set client-identifier prefix host
  2. Set the DHCP lease time.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set lease-time 86400
  3. Set the number of attempts allowed to retransmit a DHCP packet.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set retransmission-attempt 6
  4. Set the interval (in seconds) allowed between retransmission attempts. The range is 4 through 64. The default is 4 seconds.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set retransmission-interval 5
  5. Set the IPv4 address of the preferred DHCP local server.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set server-address 10.1.1.1
  6. Set the vendor class ID for the DHCP client.
    [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set vendor-id ether

    Note: To configure the DHCP client in a routing instance, configure the interface in the [edit routing-instances] hierarchy.

Verifying and Managing DHCP Client Configuration

Purpose

View or clear information about client address bindings and statistics for the DHCP client.

Action

  • To display the address bindings in the client table on the DHCP client:
    user@host> show dhcp client binding
  • To display DHCP client statistics:
    user@host> show dhcp client statistics
  • To clear the binding state of a DHCP client from the client table on the DHCP client:
    user@host> clear dhcp client binding
  • To clear all DHCP client statistics:
    user@host> clear dhcp client statistics

Note: To clear or view information about client bindings and statistics in a routing instance, run the following commands:

  • show dhcp client binding routing instance <routing-instance name>
  • show dhcp client statistics routing instance <routing-instance name>
  • clear dhcp client binding routing instance <routing-instance name>
  • clear dhcp client statistics routing instance <routing-instance name>

Modified: 2016-07-01

Supported Platforms

Modified: 2016-07-01