Acn Project
Acn Project
ABSTRACT
Key components of DHCP include the DHCP server, which manages a pool of
IP addresses; the DHCP client, which requests configuration information; and
the lease mechanism, which defines the duration an IP address is assigned to a
client. The protocol operates through a series of messages exchanged between
clients and servers, including DHCPDISCOVER, DHCPOFFER,
DHCPREQUEST, and DHCPACK.
Components of DHCP
DHCP Server: DHCP Server is a server that holds IP Addresses and other
information related to configuration.
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.
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.
DHCP Packet Format
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.
Hop count: This is an 8-bit field defining the maximum number of hops
the packet can travel.
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.
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.
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.
Working of DHCP
DHCP works on the Application layer of the UDP 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.
The 8 DHCP Messages
Now, for the offer message, the source IP address is 172.16.32.12 (server’s IP
address in the example), the destination IP address is 255.255.255.255
(broadcast IP address), the source MAC address is 00AA00123456, the
destination MAC address is 00:11:22:33:44:55 (client’s MAC address). Here,
the offer message is broadcast by the DHCP server therefore destination IP
address is the broadcast IP address and destination MAC address is
00:11:22:33:44:55 (client’s MAC address)and the source IP address is the
server IP address and the MAC address is the server MAC address.
Also, the server has provided the offered IP address 192.16.32.51 and a lease
time of 72 hours(after this time the entry of the host will be erased from the
server automatically). Also, the client identifier is the PC MAC address
(08002B2EAF2A) for all the messages.
3. DHCP Request Message: When a client receives an 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 the same IP address. If there is no reply from another host, then there is
no host with the same TCP configuration in the network and the message is
broadcasted to the server showing the acceptance of the IP address. A Client
ID is also added to this message.
Now the server will make an entry of the client host with the offered IP
address and lease time. This IP address will not be provided by the server to
any other host. The destination MAC address is 00:11:22:33:44:55 (client’s
MAC address) and the destination IP address is 255.255.255.255 and the
source IP address is 172.16.32.12 and the source MAC address is
00AA00123456 (server MAC address).
To make sure your DHCP servers are safe, consider these DHCP security
issues:
Fake DHCP Servers : Attackers might set up fake DHCP servers to give
out fake IP addresses to devices on your network.
DNS Access : When users get an IP address from DHCP, they also get
DNS server details. This could potentially allow them to access more data
than they should. It’s important to restrict network access, use firewalls,
and secure connections with VPNs to protect against this.
A DHCP starvation attack happens when a hacker floods a DHCP server with
requests for IP addresses. This overwhelms the server, making it unable to
assign addresses to legitimate users. The hacker can then block access for
authorized users and potentially set up a fake DHCP server to intercept and
manipulate network traffic, which could lead to a man-in-the-middle attack.
ADVANTAGES AND DISADVANTAGES OF DHCP
Advantages
Disadvantages
Conclusion