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.
![]() | 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:
- 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
- Set the DHCP lease time. [edit interfaces ge-0/0/1 unit 0 family inet dhcp-client]user@host# set lease-time 86400
- 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
- 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
- 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
- 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:
|