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

DHCP Overview

DHCP access service consists of two components: a protocol for delivering host-specific configuration information from a server to a client host and a method for allocating network addresses to a client host. The client sends a message to request configuration information. A DHCP server sends the configuration information back to the client.

With DHCP, clients can be assigned a network address for a fixed lease, enabling serial reassignment of network addresses to different clients. A DHCP server leases IP addresses for specific times to various clients. If a client does not use its assigned address for some period of time, the DHCP server can assign that IP address to another host. When assignments are made or changed, the DHCP server updates information in the DNS server. The DHCP server provides clients with their previous lease assignments whenever possible.

A DHCP server provides persistent storage of network parameters for clients. Because DHCP is an extension of BOOTP, DHCP servers can handle BOOTP requests.

The DHCP server includes IPv4 address assignment and commonly used DHCP options. The server is compatible with DHCP servers from other vendors on the network. The server does not support IPv6 address assignment, user class-specific configuration, DHCP failover protocol, dynamic DNS updates, or VPN connections. The JUNOS-FIPS software does not support the DHCP server.

Note: You cannot configure a router as a DHCP server and a BOOTP relay agent at the same time.

To receive configuration information and a network address assignment, a DHCP client negotiates with DHCP servers in a series of messages. The following steps show the messages exchanged between a DHCP client and servers to allocate a new network address. When allocating a new network address, the DHCP process can involve more than one server, but only one server is selected by the client.

  1. When a client computer is started, it broadcasts a DHCPDISCOVER message on the local subnet, requesting a DHCP server. This request includes the hardware address of the requesting client.

    Figure 4: DHCP Discover

    Image g016770.gif

    Note: For improved operation with DHCP clients that do not strictly conform to RFC 2131, the DHCP server accepts and processes DHCPDISCOVER messages even if the overload options in the messages are not properly terminated with an end statement.

  2. Each DHCP server receiving the broadcast sends a DHCPOFFER message to the client, offering an IP address for a set period of time, known as the lease period.

    Figure 5: DHCP Offer

    Image g016771.gif

  3. The client receives one or more DHCPOFFER messages from one or more servers and selects one of the offers received. Normally, a client looks for the longest lease period.
  4. The client broadcasts a DHCPREQUEST message indicating the client has selected an offered leased IP address and identifies the selected server.

    Figure 6: DHCP Request

    Image g016772.gif

  5. Those servers not selected by the DHCPREQUEST message return the unselected IP addresses to the pool of available addresses.
  6. The selected DHCP server sends a DHCPACK acknowledgment that includes configuration information such as the IP address, subnet mask, default gateway, and the lease period.

    Figure 7: DHCP ACK

    Image g016773.gif

    The information offered by the server is configurable. See Configuring a DHCP Server for more information.

  7. The client receives the DHCPACK message with configuration information. The process is complete. The client is configured and has access to the network.

Figure 8: DHCP Release

Image g016774.gif

To enable reuse of a previously allocated network address, the following events occur:

  1. A client that previously had a lease broadcasts a DHCPREQUEST message on the local subnet.
  2. The server with knowledge of the client’s configuration responds with a DHCPACK message.
  3. The client verifies the DHCP configuration information sent by the server and uses this information to reestablish the lease.

DHCP supports both dynamic and static bindings. For dynamic bindings, IP addresses are assigned to clients from a pool of addresses. Static bindings provide configuration information for a specific client and can include one or more fixed IP addresses for the client. You can configure a DHCP server to include both address pools and static bindings. For any individual client, static bindings take priority over address pools.

The DHCP server is compatible with the autoinstallation feature on J-series Services Routers. The server automatically checks autoinstallation settings for conflicts and gives autoinstallation settings priority over corresponding DHCP settings. For example, an IP address set by autoinstallation takes priority over an IP address set by the DHCP server.

Note: The autoinstallation feature includes a fixed address pool and a fixed lease time. With DHCP, you can create address pools and modify lease times.

When a client receives an IP address from the DHCP server, the client performs a series of ARP tests to verify that the IP address is available and no conflicts exist. If the client detects an address conflict, the client notifies the DHCP server about the conflict and may request another IP address from the DHCP server.

The DHCP server keeps a log of all conflicts and removes addresses with conflicts from the pool. These addresses remain excluded until you manually clear the conflicts list with the clear system services dhcp conflict command. For more information on this command, see the JUNOS System Basics and Services Command Reference.

DHCP configuration statements are organized hierarchically. Statements at the top of the hierarchy apply to the DHCP server and network, branches contain statements that apply to address pools in a subnetwork, and leaves contain statements that apply to static bindings for individual clients. See Table 29.

The pool and static-binding statements appear at the [edit system services dhcp] hierarchy level. You can include the remaining statements at the following hierarchy levels:

[edit system services dhcp]
[edit system services dhcp pool]
[edit system services dhcp static-binding]

Table 29: Pool and Binding Statements

Statement

Description

Hierarchy Level

 pool

Configure a pool of IP addresses for DHCP clients on a subnet. When a client joins the network, the DHCP server dynamically allocates an IP address from this pool.

[edit system services dhcp]

 

 static-binding

Set static bindings for DHCP clients. A static binding is a mapping between a fixed IP address and the client’s MAC address.

To minimize configuration changes, include common configuration statements shown in Table 30 (for example, the domain-name statement) at the highest applicable level of the hierarchy (network or subnetwork). Configuration statements at lower levels of the hierarchy override statements inherited from a higher level. For example, if a statement appears at both the [edit system services dhcp] and [edit system services dhcp pool] hierarchy levels, the value assigned to the statement at the [edit system services dhcp pool] level takes priority.

 

Table 30: Common Configuration Statements

Statement

Description

Hierarchy Level

 boot-file

Set the boot filename advertised to clients. The client uses the boot image stored in the boot file to complete configuration.

[edit system services dhcp]

[edit system services dhcp pool]

[edit system services dhcp static-binding]

 boot-server

Set the server that contains the boot file.

 default-lease-time

Set the default lease time assigned to any client that does not request a specific lease time.

 domain-name

Configure the name of the domain in which clients will search for a DHCP server host. This is the default domain name that is appended to hostnames that are not fully qualified.

 domain-search

Define a domain search list.

 maximum-lease-time

Set the maximum lease time allowed by the server.

 name-server

Specify the DNS server that maintains the database of client name to IP address mappings.

option

Configure user-defined DHCP options.

 router

Specify IP address for routers on the client’s subnetwork. Routers are listed in order of preference.

 server-identifier

Set the IP address of the DHCP server.


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