Lecture 1.2.3 and 1.2.4
Lecture 1.2.3 and 1.2.4
The overall purpose of the DHCP server is to reduce the workload and error
margins, which can occur in assigning the IP addresses manually.
When a computer uses a static IP address there can be the chances of error and
conflict when two computers use the same IP address. By using the DHCP
server there are no chances of such kind of conflicts and errors.
DHCP
DHCP
Curtesy: https://www.javatpoint.com/dynamic-host-configuration- 15
protocol
DHCP Address Allocation Mechanisms
Providing an IP address to a client is the most fundamental configuration task performed by a host
configuration protocol. To provide flexibility for configuring addresses on different types of clients, the
DHCP standard includes three different address allocation mechanisms:
oDynamic Allocation: DHCP assigns an IP address from a pool of addresses for a limited period of
time chosen by the server, or until the client tells the DHCP server that it no longer needs the address.
DHCP port number for server is 67 and for the client is 68. It
is a Client server protocol which uses UDP services. IP address
is assigned from a pool of addresses
DHCP discover message – (port number 68)-broadcast msg
This is a first message generated in the communication process between server and client. This message is
generated by Client host in order to discover if there is any DHCP server/servers are present in a network or not.
This message is broadcasted to all devices present in a network to find the DHCP server. This message is 342 or
576 bytes long
DHCP offer message – (port number 67) -broadcast msg
The server will respond to host in this message specifying the unleased IP address and other TCP configuration
information. This message is broadcasted by server. Size of message is 342 bytes. If there are more than one
DHCP servers present in the network then client host will accept the first DHCP OFFER message it receives.
Also a server ID is specified in the packet in order to identify the server.
DHCP request message – (port number 68)
When a client receives a offer message, it responds by broadcasting a DHCP request message. The client will
produce a gratuitous ARP in order to find if there is any other host present in the network with same IP address. If
there is no reply by other host, then there is no host with same TCP configuration in the network and the message is
broadcasted to server showing the acceptance of IP address .A Client ID is also added in this message.
DHCP acknowledgement message – (port number 67)
In response to the request message received, the server will make an entry with specified client ID and bind the IP
address offered with lease time. Now, the client will have the IP address provided by server.
1.DHCP negative acknowledgement message – server
Whenever a DHCP server receives a request for IP address that is invalid according to the scopes that is
configured with, it send DHCP Nak message to client. Eg-when the server has no IP address unused or the pool is
empty, then this message is sent by the server to client.
3.DHCP release –
A DHCP client sends DHCP release packet to server to release IP address and cancel any remaining lease time.
4.DHCP inform –
If a client address has obtained IP address manually then the client uses a DHCP inform to obtain other local
configuration parameters, such as domain name. In reply to the dhcp inform message, DHCP server generates
DHCP ack message with local configuration suitable for the client without allocating a new IP address. This
DHCP ack message is unicast to the client.
DHCP OPERATION
DHCP provides an automated way to distribute and update IP addresses and other configuration information on a network. A
DHCP server provides this information to a DHCP client through the exchange of a series of messages, known as the DHCP
conversation or the DHCP transaction.
The DHCP client and server can either be on the same network or on different networks. DHCP relay agent is used to facilitate
the conversation. Let us discuss each situation separately.
Curtesy: https://www.javatpoint.com/dynamic-host-configuration- 23
protocol
Client and server on two different networks
24
25
REFERENCES
26
THANK YOU
For queries
Email: [email protected]
27