DHCP Terminologies
DHCP Terminologies
When a client needs to start up TCP/IP operations, it broadcasts a request for address information.
The DHCP server receives the request, assigns a new address for a specific time period (called a lease
period) and sends it to the client together with the other required configuration information.
This information is acknowledged by the client, and used to set up its configuration.
The DHCP server will not reallocate the address during the lease period and will attempt to return the
same address every time the client requests an address.
The client may extend its lease with subsequent requests, and may send a message to the server before
the lease expires telling it that it no longer needs the address so it can be released and assigned to
another client on the network.
4
Dynamic allocation of a network address
DHCP methods of allocating IP addresses
Automatic allocation- DHCP server permanently assigns an IP address to a requesting client from the range defined by the
administrator. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can
preferentially assign to a client the same IP address that the client previously had.
Dynamic allocation- A network administrator reserves a range of IP addresses for DHCP, and each DHCP client on the LAN is
configured to request an IP address from the DHCP server during network initialization. The request and- grant process uses a
lease concept with a controllable time period, allowing the DHCP server to reclaim and then reallocate IP addresses that are not
renewed.
Manual allocation- The DHCP server issues a private IP address dependent upon each client's client id (or, traditionally, the
client MAC address), based on a predefined mapping by the administrator. This feature is variously called static DHCP
assignment .If no match for the client's client ID (if provided) or MAC address (if no client id is provided) is found, the server
may or may not optionally fall back to either Dynamic or Automatic allocation.
DHCP Messages
DHCPDISCOVER - Client broadcast to locate available servers.
DHCPOFFER - Server to client in response to DHCPDISCOVER with offer of configuration parameters.
DHCPREQUEST - Client message to servers either
(a) requesting offered parameters from one server and implicitly declining offers from all others.
(b) confirming correctness of previously allocated address after system reboot,
(c) extending the lease of a particular network address.
DHCPACK - Server to client with configuration parameters, including committed network address.
DHCP Messages (..Contd)
DHCPNAK - Server to client indicating client's notion of network address is incorrect (e.g.,
client has moved to new subnet) or client's lease has expired
DHCPINFORM - Client to server, asking only for local configuration parameters; client
already has externally configured network address.
8
DHCP Procedures
Two cases:
9
DHCP client state/transition diagram
10
•DHCP is Dynamic Host Configuration Protocol for assigning IP addresses to devices on a
network, a device can have different IP address every time it connects to the network.
•The DHCP has been devised to provide static and dynamic address allocation.
•To provide dynamic address allocation, the DHCP client acts as a state machine that performs
transitions from one state to another depending on the messages it receives or sends. Figure shows
the transition diagram with main states.
•INIT State: When the DHCP client first starts, it is in the INIT state (initializing state). The client
broadcasts a DHCPDISCOVER message (a request message with the DHCPDISCOVER option), using
port 67.
•SELECTING State: After sending the DHCPDISCOVER message, the client goes to the selecting
state. Those servers that can provide this type of service respond with a DHCPOFFER message. In
these messages, the servers offer an IP address. They can also offer the lease duration. The default
is 1 hour. The server that sends a DHCPOFFER locks the offered IP address so that it is not available
to any other clients. The client chooses one of the offers and sends a DHCPREQUEST message to
the selected server. It then goes to the requesting state. However, if the client receives no
DHCPOFFER message, it tries four more times, each with a span of 2 seconds. If there is no reply to
any of these DHCPDISCOVERs, the client sleeps for 5 minutes before trying again.
•REQUESTING State: The client remains in the requesting state
until it receives a DHCPACK message from the server that creates
the binding between the client physical address and its IP address.
After receipt of the DHCPACK, the client goes to the bound state.
•BOUND State: In this state, the client can use the IP address until
the lease expires. When 50 percent of the lease period is reached,
the client sends another DHCPREQUEST to ask for renewal. It then
goes to the renewing state. When in the bound state, the client can
also cancel the lease and go to the initializing state.
•RENEWING State: The client remains in the renewing state until
one of two events happens. It can receive a DHCPACK, which
renews the lease agreement. In this case, the client resets its timer
and goes back to the bound state. Or, if a DHCPACK is not received,
and 87.5 percent of the lease time expires, the client goes to the
rebinding state.
•REBINDING State: The client remains in the rebinding state until
one of three events happens. If the client receives a DHCPNACK or
the lease expires, it goes back to the initializing state and tries to
get another IP address. If the client receives a DHCPACK, it goes to
the bound state and resets the timer.
Step-by-step (New IP Address)
Client broadcasts DHCPDISCOVER-client does not know IP address of DHCP server; BOOTP relay agents may relay
it to other DHCP servers.
Server respond with DHCPOFFER- One or more DHCP servers respond with DHCPOFFER.
If the client receives no DHCP offer before it times out, it retransmits DHCPDISCOVER
Client broadcasts DHCPREQUEST-Client may wait for multiple replies and then choose one offer. It broadcasts
DHCPREQUEST with ‘server identifier’ option included identifying the server whose offer it has accepted and
‘requested IP address’ option
Client SHOULD probe address .if client detects that the address is already in use, it issues DHCPDECLINE.
Server selected commits binding, sends DHCPACK-Servers other than the one selected in the DHCPREQUEST will
release their offered addresses, while the selected server will note the binding.
If selected server cannot meet the needs of the DHCPREQ. it sends a DHCPNACK.
If the client does not receive a DHCPACK or DHCPNACK before timeout it resends DHCPREQ.
Retransmission attempts use exponential backoff times
Client sends DHCPRELEASE.
Step-by-step (Reusing Previous Network Address)
Client broadcasts DHCPREQUEST
DHCP REQUEST - client message to servers
requesting offered parameters from one server and implicitly declining offers from all others
confirming correctness of previously allocated address after, e.g., system reboot,
extending the lease on a particular network address.
Server responds with DHCPACK (bound state)
Client is configured
Times T1 and T2 to extend its lease
At T1, client enters RENEWING state (50%) and attempts to contact the server that originally issued the client's network
address.
At T2, client enters REBINDING state(87.5%) and attempts to contact any server.
T1<T2<lease expiration time
In either of two states client sends DHCPREQUEST
If lease expires before DHCPACK, client moves to INIT state
14
DHCP Server Responsibilities
1. Address Storage and Management: DHCP servers are the owners of the addresses used by all DHCP clients. The server
stores the addresses and manages their use, keeping track of which addresses have been allocated and which are still available.
2. Configuration Parameter Storage and Management: DHCP servers also store and maintain other parameters that are
intended to be sent to clients when requested. Many of these are important configuration values that specify in detail how a client
is to operate.
3. Lease Management: As we saw in the previous section, DHCP servers use leases to dynamically allocate addresses to clients
for a limited time. The DHCP server maintains information about each of the leases it has granted to clients, as well as policy
information such as lease lengths.
4. Responding To Client Requests: DHCP servers respond to different types of requests from clients to implement the DHCP
communication protocol. This includes assigning addresses, conveying configuration parameters and granting, renewing or
terminating leases.
5. Providing Administration Services: To support all of the above, the DHCP server includes functionality to allow a human
administrator to enter, view, change and analyze addresses, leases, parameters and all other information needed to run DHCP.
15
DHCP Benefits
Reliable IP address configuration.
The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
The efficient handling of IP address changes for clients that must be updated frequently
The forwarding of initial DHCP messages by using a DHCP relay agent, which eliminates the need for a DHCP
server on every subnet.
16
REFERENCES
17
THANK YOU
For queries
Email: dayal.e13263@cumail.in
18