DHCP 23
DHCP 23
DHCP 23
In most of the cases when you connect your computer to a LAN or internet,
you’ll notice that the IP address and other information like subnet mask etc
are assigned to your computer automatically. Have you ever thought about how
this happens? Well, in this article we will understand the concept of DHCP
that forms the basis of this functionality.
What is DHCP?
DHCP stands for Dynamic Host Configuration Protocol.
DHCP works on a client-server model. Being a protocol, it has it’s own set of
messages that are exchanged between client and server. Here is the header
information of DHCP :
op 1 Type of message
flags 2 Flags
Understanding DHCP helps in debugging many network related problems. Read our
articles on wireshark and Journey of a packet on network to enhance your
understanding on network and network debugging tools.
In the next section, we will cover the working of this protocol.
Before learning the process through which DHCP achieves it’s goal, we first
have to understand the different messages that are used in the process.
1. DHCPDISCOVER
3. DHCPREQUEST
This DHCP message is sent in response to DHCPOFFER indicating that the client
has accepted the network configuration sent in DHCPOFFER message from the
server.
4. DHCPACK
5. DHCPNAK
This message is the exact opposite to DHCPACK described above. This message
is sent by the DHCP server when it is not able to satisfy the DHCPREQUEST
message from the client.
6. DHCPDECLINE
This message is sent from the DHCP client to the server in case the client
finds that the IP address assigned by DHCP server is already in use.
7. DHCPINFORM
This message is sent from the DHCP client in case the IP address is
statically configured on the client and only other network settings or
configurations are desired to be dynamically acquired from DHCP server.
8. DHCPRELEASE
This message is sent by the DHCP client in case it wants to terminate the
lease of network address it has be provided by DHCP server.
Now as we know about the various DHCP messages, it’s time to go through the
the complete DHCP process to give a better Idea of how DHCP works. Note that
the steps mentioned below assume that DHCP functionality is enabled by
default on the client side.