Why Use DHCP?: Reliable IP Address Configuration. DHCP Minimizes Configuration Errors Caused

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Why use DHCP?

Every device on a TCP/IP-based network must have a unique unicast IP address to


access the network and its resources. Without DHCP, IP addresses for new computers or
computers that are moved from one subnet to another must be configured manually; IP
addresses for computers that are removed from the network must be manually
reclaimed.

With DHCP, this entire process is automated and managed centrally. The DHCP server
maintains a pool of IP addresses and leases an address to any DHCP-enabled client
when it starts up on the network. Because the IP addresses are dynamic (leased) rather
than static (permanently assigned), addresses no longer in use are automatically
returned to the pool for reallocation.

The network administrator establishes DHCP servers that maintain TCP/IP configuration
information and provide address configuration to DHCP-enabled clients in the form of a
lease offer. The DHCP server stores the configuration information in a database that
includes:

• Valid TCP/IP configuration parameters for all clients on the network.


• Valid IP addresses, maintained in a pool for assignment to clients, as well as
excluded addresses.
• Reserved IP addresses associated with particular DHCP clients. This allows
consistent assignment of a single IP address to a single DHCP client.
• The lease duration, or the length of time for which the IP address can be used
before a lease renewal is required.

A DHCP-enabled client, upon accepting a lease offer, receives:

• A valid IP address for the subnet to which it is connecting.


• Requested DHCP options, which are additional parameters that a DHCP server is
configured to assign to clients. Some examples of DHCP options are Router
(default gateway), DNS Servers, and DNS Domain Name.

Benefits of DHCP
DHCP provides the following benefits.

• Reliable IP address configuration. DHCP minimizes configuration errors caused


by manual IP address configuration, such as typographical errors, or address
conflicts caused by the assignment of an IP address to more than one computer at
the same time.
• Reduced network administration. DHCP includes the following features to
reduce network administration:
o Centralized and automated TCP/IP configuration.
o The ability to define TCP/IP configurations from a central location.
o The ability to assign a full range of additional TCP/IP configuration values by
means of DHCP options.
o The efficient handling of IP address changes for clients that must be updated
frequently, such as those for portable devices that move to different locations
on a wireless network.
o The forwarding of initial DHCP messages by using a DHCP relay agent, which
eliminates the need for a DHCP server on every subnet.

DORA process in DHCP stands for following message flows between the client and the server.
▪ Discover
▪ Offer
▪ Request
▪ Acknowledge
Below diagram depicts the message flow between the DHCP client and the Server –

Now let’s take a look what happens when these messages are exchanged between DHCP Client and
Server. 2 key items should be kept in mind which are also important from interview point of view as
well. These are –
1. Network layer broadcast and
2. Data Link Layer broadcast.
STEP 1:
DHCP client sends out a DHCP Discover message to find out the DHCP server. DHCP discover
message is a layer 2 broadcast as well as layer 3 broadcast.

Fields in DHCP Discover Message:

Src IP: 0.0.0.0

Dst IP: 255.255.255.255


Src MAC : DHCP clients MAC address
Dst MAC: FF:FF:FF:FF:FF:FF
Hence from the above fields it is clear DHCP Discover message is a Network Layer and Data Link
Layer Broadcast.

STEP 2:
DHCP server receives the DHCP discover message from client and sends back the DHCP offer
message with field information as below:

Src IP: DHCP Server IP Address

Dst IP: 255.255.255.255 #Still Broadcast as Client still has no IP Address#


Src MAC : MAC Address of DHCP Server
Dst MAC: DHCP clients MAC address
Hence from above field it is clear that DHCP offer message is a layer 2 unicast but still as layer 3
broadcast.

STEP 3:
DHCP client receives the DHCP offer from DHCP server and sends back a DHCP Request message
with following fields:

Src IP: 0.0.0.0 #As still the IP address hasn’t been assigned to Client#

Dst IP: 255.255.255.255 #Still Broadcast as Client must have received Offer from more than
one DHCP server in their domain and the DHCP client accepts the Offer that its receives the
earliest and by doing a broadcast it intimates the other DHCP server to release the Offered IP
address to their available pool again #
Src MAC : DHCP clients MAC address
Dst MAC: FF:FF:FF:FF:FF:FF
Above fields concludes that DHCP request message is also a layer 2 unicast and a layer 3 broadcast.

STEP4:
Once the DHCP client sends the request to get the Offered IP address, DHCP server responds with an
acknowledge message towards DHCP client with below fields:
Src IP: DHCP Server IP Address

Dst IP: 255.255.255.255


Src MAC : MAC Address of DHCP Server
Dst MAC: DHCP clients MAC address
From above fields substantiates that DHCP Acknowledge is a layer 2 unicast but still a layer 3
broadcast.

Creating a Scope
Before a DHCP server can provide clients with IP addresses, the server must be configured with a scope.
A scope is a range of IP addresses that can be leased to DHCP clients on a given subnet. For example, if you
have multiple subnets, each with DHCP clients, you have to create multiple scopes.

In addition to IP addresses, a scope can also assign optional parameters to DHCP clients, including
the IP address of DNS servers, WINS servers, and routers, and so on.

Before creating scopes, consider the following guidelines:

• If there are multiple DHCP servers on the network, each server requires at least one scope.

• If a workstation on the network requires a static IP address, it must be excluded from the scope. This
eliminates the chance of duplicate IP addresses.

• A DHCP server can be configured with multiple scopes.

Lease Duration
The lease duration determines how long the client can continue to use the leased IP address before it must be
renewed. The default lease duration is set to eight days, as you saw when you installed the DHCP Server
service.

When a client receives an IP address from a DHCP server, a renewal process occurs as the lease
approaches expiration. After 50% of the configured lease duration has elapsed, the client attempts to
contact the DHCP server. The client that's requesting to renew its IP address broadcasts
a DHCPREQUEST message. The DHCP server, if available, responds with a DHCPACK, granting the
client's request to renew the IP address. Also, information about other DHCP options is included in
this reply. If any information has changed since the client first obtained its lease, the client updates
its configuration accordingly.
If the server from which the client originally leased the IP address does not respond, the client again
attempts to renew the IP address when 87.5% of the lease duration has elapsed. At this point, the
client attempts to renew its current lease with any available DHCP server. If a server responds with
a DHCP offer message (DHCPOFFER) to update the current client lease, the client can renew its
lease based on the offering and continue operation.

Client Reservation
There might be instances when a workstation on the network requires the same IP address every
time. For example, if you have only a few IP addresses, you might need to reserve one for high-
priority users. With a client reservation, the workstation can still be DHCP enabled, but
the DHCP server will always assign the client the same IP address

Superscopes
Aside from a regular scope, you can also create a second type of scope known as a superscope. In
a multinetted environment (one that has multiple logical IP subnets defined on a single physical
network), superscopes allow a DHCP server to assign leases to clients on multiple subnets.

For example, a physical network is divided into two subnets, Subnet A and Subnet B, connected by
a router. Subnet B contains two multinets. A single DHCP server is located on Subnet A.
The DHCP server contains a single scope with a range of IP addresses to lease to clients on Subnet
A. To have the DHCP server assign IP addresses to clients on Subnet B, you can create a
superscope and add to it the IP address ranges for the multinets on Subnet B

Subnet A

Scope 1: 192.168.1.2–192.168.1.254

Subnet B

Superscope for Subnet B

Scope 2: 192.168.2.2–192.168.2.254

Scope 3: 192.168.3.2–192.168.3.254
Exclusion Ranges
An exclusion range is a set of one or more IP addresses, included within the
range of a defined scope, that you do not want to lease to DHCP clients.
Exclusion ranges assure that the server does not offer to DHCP clients on
your network any addresses in these ranges

For example, you can define a scope's range as 192.168.1.1 through


192.168.1.254 and then define an exclusion range of 192.168.1.1 through
192.168.1.10 to accommodate the servers within the subnet that have IP addresses
that are configured manually (statically).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy