[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Configuring the Device as a DHCP Client

To configure the J-series or SRX-series device as a DHCP client:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 74.
  3. If you are finished configuring the device, commit the configuration.
  4. To verify DHCP client configuration and operation, see Verifying the DHCP Client.

Table 74: Configuring the Device as a DHCP Client

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Interfaces level in the configuration hierarchy, and select the interface on which to configure DHCP client information—for example, ge-0/0/1.0.

  1. In the J-Web interface, select Configuration>View and Edit>Edit Configuration.
  2. Under Interfaces, click ge-0/0/1.
  3. Under Unit, next to the unit number, click Edit.
  4. Under Family, select the Inet check box and click Edit.
  5. Next to Dhcp, click Yes and click Configure.

From the [edit] hierarchy level, enter

set interfaces ge-0/0/1 unit 0 family inet dhcp

Configure the DHCP client identifier as either an ASCII or hexadecimal value.

Use hexadecimal if the client identifier is a MAC address—for example, 00:0a:12:00:12:12.

  1. Next to Client identifier, click Configure.
  2. From the Client identifier choice list, select hexadecimal.
  3. In the Hexadecimal box, type the client identifier—00:0a:12:00:12:12.
  4. Click OK.

Set the DHCP client identifier as a hexadecimal value:

set interfaces ge-0/0/1 unit 0 family inet dhcp client-identifier 00:0a:12:00:12:12

Set the DHCP lease time in seconds—for example, 86400 (24 hours).

The range is 60 through 2147483647 seconds.

  1. From the Lease time list, select Enter Specific Value.
  2. In the Length box, type 86400.

Set the DHCP lease time to 86400 seconds:

set interfaces ge-0/0/1 unit 0 family inet dhcp lease-time 86400

Define the number of attempts allowed to retransmit a DHCP packet—for example, 6.

The range is 0 through 6. The default is 4 times.

In the Retransmission attempt box, type 6.

Set the number of attempts allowed to retransmit a DHCP packet to 6:

set interfaces ge-0/0/1 unit 0 family inet dhcp retransmission-attempt 6

Define the interval, in seconds, allowed between retransmission attempts—for example, 5.

The range is 4 through 64. The default is 4 seconds.

In the Retransmission interval box, type 5.

Set the interval allowed between retransmission attempts to 5 seconds:

set interfaces ge-0/0/1 unit 0 family inet dhcp retransmission-interval 5

Set the IPv4 address of the preferred DHCP server—for example, 10.1.1.1.

In the Server address box, type 10.1.1.1.

Set the IPv4 address of the preferred DHCP server to 10.1.1.1:

set interfaces ge-0/0/1 unit 0 family inet dhcp server-address 10.1.1.1

Set the vendor class ID for the DHCP client—for example, ether.

  1. In the Vendor id box, type ether.
  2. Click OK.

Set the vendor class ID to ether:

set interfaces ge-0/0/1 unit 0 family inet dhcp vendor-id ether

Configuring the Device as a DHCP Relay Agent

You can configure the device or an interface to act as a DHCP relay agent. Doing so enables the device to respond to DHCP or BOOTP requests broadcast by request as a broadcast message. If the device or an interface detects a broadcast message, it relays the message to a specified DHCP or BOOTP server.

We recommend you to configure the device or an interface to be a DHCP/BOOTP relay agent if you have locally attached hosts and a distant DHCP or BOOTP server. For more information, see JUNOS Policy Framework Configuration Guide


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]