0% found this document useful (0 votes)
3 views4 pages

DHCP

Dynamic Host Configuration Protocol (DHCP) is an application layer protocol that automates the allocation of IP addresses and configuration information to devices in an enterprise network. It operates on a client-server model, managing IP address leases and providing essential network information such as subnet masks, router addresses, and DNS servers. Key components of DHCP include the DHCP server, client, relay, IP address pool, and options for additional configurations, ensuring efficient network management and redundancy through features like failover and dynamic updates.

Uploaded by

adwaitmali77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

DHCP

Dynamic Host Configuration Protocol (DHCP) is an application layer protocol that automates the allocation of IP addresses and configuration information to devices in an enterprise network. It operates on a client-server model, managing IP address leases and providing essential network information such as subnet masks, router addresses, and DNS servers. Key components of DHCP include the DHCP server, client, relay, IP address pool, and options for additional configurations, ensuring efficient network management and redundancy through features like failover and dynamic updates.

Uploaded by

adwaitmali77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Dynamic Host Configuration Protocol (DHCP)


Prerequisite – Protocols in the Application Layer
DHCP stands for Dynamic Host Configuration Protocol. It is the critical feature on which the users
of an enterprise network communicate. DHCP helps enterprises to smoothly manage the allocation
of IP addresses to the end-user clients’ devices such as desktops, laptops, cellphones, etc. is an
application layer protocol that is used to provide:

Subnet Mask (Option 1 - e.g., 255.255.255.0)


Router Address (Option 3 - e.g., 192.168.1.1)
DNS Address (Option 6 - e.g., 8.8.8.8)
Vendor Class Identifier (Option 43 - e.g.,
'unifi' = 192.168.1.9 ##where unifi = controller)

DHCP is based on a client-server model and based on discovery, offer, request, and ACK.

Why Use DHCP?


DHCP helps in managing the entire process automatically and centrally. DHCP helps in maintaining
a unique IP Address for a host using the server. DHCP servers maintain information on TCP/IP
configuration and provide configuration of address to DHCP-enabled clients in the form of a lease
offer.

Components of DHCP
The main components of DHCP include:
• DHCP Server: DHCP Server is basically a server that holds IP Addresses and other
information related to configuration.
• DHCP Client: It is basically a device that receives configuration information from the
server. It can be a mobile, laptop, computer, or any other electronic device that requires a
connection.
• DHCP Relay: DHCP relays basically work as a communication channel between DHCP
Client and Server.
• IP Address Pool: It is the pool or container of IP Addresses possessed by the DHCP Server.
It has a range of addresses that can be allocated to devices.
• Subnets: Subnets are smaller portions of the IP network partitioned to keep networks under
control.
• Lease: It is simply the time that how long the information received from the server is valid,
in case of expiration of the lease, the tenant must have to re-assign the lease.
• DNS Servers: DHCP servers can also provide DNS (Domain Name System) server
information to DHCP clients, allowing them to resolve domain names to IP addresses.
• Default Gateway: DHCP servers can also provide information about the default gateway,
which is the device that packets are sent to when the destination is outside the local network.
• Options: DHCP servers can provide additional configuration options to clients, such as the
subnet mask, domain name, and time server information.
• Renewal: DHCP clients can request to renew their lease before it expires to ensure that they
continue to have a valid IP address and configuration information.
• Failover: DHCP servers can be configured for failover, where two servers work together to
provide redundancy and ensure that clients can always obtain an IP address and
configuration information, even if one server goes down.
• Dynamic Updates: DHCP servers can also be configured to dynamically update DNS
records with the IP address of DHCP clients, allowing for easier management of network
resources.
• Audit Logging: DHCP servers can keep audit logs of all DHCP transactions, providing
administrators with visibility into which devices are using which IP addresses and when
leases are being assigned or renewed.

Operation Code Hardware type Hardware length Hop count


Transition ID
Number of seconds Flags
Client IP address
Your IP address
Server IP address
Gateway IP address
Client hardware address
(16 bytes)

Server name

(64 bytes)

Boot file name

(128 bytes)

Options

( Variable length)

Fig. DHCP Packet Format


1.Hardware length:
This is an 8-bit field defining the length of the physical address in bytes. e.g for Ethernet the value
is 6.
2.Hop count:
This is an 8-bit field defining the maximum number of hops the packet can travel.
3.Transaction ID:
This is a 4-byte field carrying an integer. The transcation identification is set by the client and is
used to match a reply with the request. The server returns the same value in its reply.
4.Number of seconds
This is a 16-bit field that indicates the number of seconds elapsed since the time the client started to
boot.
5.Flag:
This is a 16-bit field in which only the leftmost bit is used and the rest of the bit should be set to os.
A leftmost bit specifies a forced broadcast reply from the server. If the reply were to be unicast to
the client, the destination. IP address of the IP packet is the address assigned to the client.
6.Client IP address:
This is a 4-byte field that contains the client IP address . If the client does not have this information
this field has a value of 0.
7.Your IP address:
This is a 4-byte field that contains the client IP address. It is filled by the server at the request of the
client.
8.Server IP address:
This is a 4-byte field containing the server IP address. It is filled by the server in a reply message.
9.Gateway IP address:
This is a 4-byte field containing the IP address of a routers. IT is filled by the server in a reply
message.
10.Client hardware address:
This is the physical address of the client .Although the server can retrieve this address from the
frame sent by the client it is more efficient if the address is supplied explicity by the client in the
request message.
11.Server name:
This is a 64-byte field that is optionally filled by the server in a reply packet. It contains a null-
terminated string consisting of the domain name of the server. If the server does not want to fill this
filed with data, the server must fill it with all 0s.
12.Boot filename:
This is a 128-byte field that can be optionally filled by the server in a reply packet. It contains a
null- terminated string consisting of the full pathname of the boot file. The client can use this path
to retrieve other booting information. If the server does not want to fill this field with data, the
server must fill it with all 0s.
13.Options:
This is a 64-byte field with a dual purpose. IT can carry either additional information or some
specific vendor information. The field is used only in a reply message. The server uses a number,
called a magic cookie, in the format of an IP address with the value of 99.130.83.99. When the
client finishes reading the message, it looks for this magic cookie. If present the next 60 bytes are
options.

Working of DHCP
The working of DHCP is as follows:
DHCP works on the Application layer of the TCP/IP Protocol. The main task of DHCP is to
dynamically assigns IP Addresses to the Clients and allocate information on TCP/IP configuration
to Clients. For more, you can refer to the Article Working of DHCP.
The DHCP port number for the server is 67 and for the client is 68. It is a client-server protocol
that uses UDP services. An IP address is assigned from a pool of addresses. In DHCP, the client and
the server exchange mainly 4 DHCP messages in order to make a connection, also called the DORA
process, but there are 8 DHCP messages in the process.
Working of DHCP

You might also like