Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring a DHCP Client (CLI Procedure)

A Dynamic Host Configuration Protocol (DHCP) server can provide many valuable TCP/IP network services. DHCP can dynamically allocate IP parameters, such as an IP address, to clients, and it can also deliver software upgrades to clients.

DHCP configuration consists of two components, configuration of DHCP clients and configuration of a DHCP server. Client configuration determines how clients send a message requesting an IP address, whereas a DHCP server configuration enables the server to send an IP address configuration back to the client. This topic describes configuring a DHCP client. For directions for configuring a DHCP server, see Configuring a DHCP Server on Switches (CLI Procedure).

You can change DHCP client configurations from the switch, using client identifiers to indicate which clients you want to configure.

To configure a DHCP client, you configure an interface to belong to the DHCP family and specify additional attributes, as desired:

[edit]
user@switch# set interfaces interface-name unit number family inet dhcp configuration-statement

The options that you can configure are listed in Table 1. Replace the variable configuration-statement with one or more of the statements listed in this table. If you do not explicitly configure these options, the switch uses default values for them.

Table 1: DHCP Client Settings

Configuration Statement

Description

client-identifier

Unique client ID—By default this consists of the hardware type (01 for Ethernet) and the MAC address (a.b.c.d). For this example, the value would be 01abcd.

lease-time

Ttime in seconds that a client holds the lease for an IP address assigned by a DHCP server. If a client does not request a specific lease time, then the server sends the default lease time. The default lease time on a Junos OS DHCP server is 1 day.

retransmission-attempt

Number of times the client attempts to retransmit a DHCP packet.

retransmission-interval

Time between transmission attempts.

server-address

IP address of the server that the client queries for an IP address.

update-server

TCP/IP settings learned from an external DHCP server to the DHCP server running on the switch are propagated.

vendor-option

Vendor class ID (CPU's manufacturer ID string) for the DHCP client.

Published: 2013-08-15