The primary function of DHCP is to assign IP addresses.Basically IP
Address Assignment process contains three types of address allocation methods:
A.
Manual allocation The administrator configures the DHCP server to assign a
specificIP address to a given system; the IP address will never change unless
it is manuallymodified. This is equivalent in functionality to RARP and BOOTP.
B.
Automatic allocation The DHCP server assigns permanent IP addresses allocatedfrom a
pool; the addresses do not change unless they are manually modified by theuser
or the administrator.
C.
Dynamic allocation The DHCP server assigns IP addresses from a pool by using
alimited-time lease so that an address can be reassigned if the client system
doesn’tperiodically renew it.
Manual allocation It
is also known as reservation which is suitable for Internet servers and
othermachines that require IP addresses that do not change because they rely on
DNS nameresolution for user access. This form of address allocation is nothing
more than a remote configurationsolution because the end result is no different
than if the administrator manuallyconfigured the TCP/IP client.
There
are two advantages to manually
allocating addresses, however. First,
you can deliveradditional TCP/IP configuration settings along with the address,
changing them as needed.Second,
manual allocation is also an organizational aid that enables to keep track of
all theaddresses used on the network. Keeping all the address assignments in
one databasemakes it easier to track the assignments and reduces theaccidental
addressduplication.
Automatic allocationit is
useful on stable single-segment networks or multisegment networkswhere machines
are not routinely moved to other segments. This method reduces thenetwork
traffic generated by DHCP by eliminating the address lease renewal procedures.
Inmost cases, the savings are minimal, however. Automatic allocation is also not
recommendedif organization is working with a limited supply of registered IP
addresses.
Dynamic allocation
provides the greatest amount of flexibility with theleast amount
ofadministrative intervention. The DHCP server assigns IP addresses to
systemson any subnet and automatically reclaims the addresses no longer in use
for reassignment.Also, there is nopossibility of duplicate addresses on the
network (as long as DHCP managesall of the network’s addresses).
Note: Following are Codes to Understand
Address Assignments
The DHCP Message Type option identifies the overall function of
the DHCP message and is
required in all DHCP packets.
1 DHCP DISC OVER Used by a client system to
locate DHCP servers and request an
IP address
2 DHCP OFFER Used by a server to offer an IP address to a client
3 DHCPREQUEST Used by a client to request
a specific IP address assignment or to renew a lease
4 DHCP DECLINE Used by a client to reject
an IP address offered by a server
5 DHCPACK Used by a server to acknowledge a client’s acceptance of an
offered
IP address
6 DHCPNACK Used by a server to reject a client’s acceptance of an offered
IP address
7 DHCP RELEASE Used by a client to
terminate a lease
8 DHCP INFORM Used by a client that has
already been assigned an IP address to request
additional
configuration parameters
Whenconfiguring
a workstation to be a DHCP client, the system initiates an exchange ofmessages
with a DHCP server. Whether dynamic, automatic, or manual addressallocation
used, the first exchange of messages, resulting in an IP address assignment for
the client,is the same.
Actual
Process of Address Assignment to a client by using DHCP
Step 1:Before the
initial client/server exchange can begin, (How
is the client to find the server and communicate with it when its TCP/IP stack
has not yet been configured?) A DHCP clientthat does not yet have an
IP address is said to be in the init
state.In this state, even thoughthe workstation has no information
about the servers on the network and no IP address of itsown, it is
stillcapable of sending broadcast transmissions
Step 2:The client
begins the exchange by broadcasting a series of DHCPDISCOVER messages.
Because
the client has no IP address of its own yet, the source address field in the IP
headercontains the value 0.0.0.0.
Step 3:Each of the
servers receiving the DHCPDISCOVER packet responds to the client with a
DHCPOFFER
message that contains an IP address (Your IP Address). Thisis the address the
server is offering for the client’s use. Because each DHCP server on thenetwork
operatesindependently, the client may receive several offers, each with a
different IPaddress.
Step 4:After a
predetermined interval, the client stops broadcasting DHCPDISCOVERmessagesand
selects one of the offers it has received. If the client receives no DHCPOFFER
messages,it retries its broadcasts and eventually times out with an error
message. No other TCP/IPcommunications are possible while the machine is in
this state.
Step 5:when client
accepts an IP address offered by a server, it generates aDHCPREQUESTmessage
that contains the name of the selected server in the Server Identifier option
and theoffered IP address in the RequestedIP Address option
Step 6:The client
transmits the DHCPREQUEST message as a broadcast because the messagenot only
informs the selected server that the client has accepted its offer, it also
informs theother servers that their offers have been declined.
Ø At
the time a server generates a DHCPOFFER message, the IP address it offers is
not yet exclusivelyallocated to that client. If addresses are in short supply
or if the client takestoo longto respond, the server might offer that address
to another client in the interim.
Step 7:When theserver
receives the DHCPREQUEST message saying its offer has beenaccepted, it
generateseither a DHCPACK message indicating that the IP address assignment has
been completedor a DHCPNAK message indicating that the offered address is no
longeravailable.
Step 8:When the server
generates a DHCPACK message, it creates an entry in its database that
commits
the offered IP address to the client’s hardware address. The combination of
thesetwo addresses will be used as a unique identifier,called the lease
identification cookie, for that client.
Ø If
the server sends a DHCPNAK messageto the client, the entire transaction is
nullified and the client must begin the whole processagain by generating new
DHCPDISCOVER messages.
Step 9:As a final test
of its newly assigned address, the client can (but is not required to) usethe
ARP protocol to make sure that no other system on the network is using the IP
addressfurnished to it by the server. If the address is in use, the client
sends a DHCPDECLINE messageto theserver, nullifying the transaction. If the
address is not in use, the address assignmentprocess is completed and the
client enters what is known as the bound
state.
Sign up here with your email
ConversionConversion EmoticonEmoticon