Académique Documents
Professionnel Documents
Culture Documents
Protocol
Dynamic Host Configuration Protocol (DHCP) is an auto
configuration protocol used on IP networks. Computers that are
connected to IP networks must be configured before they can
communicate with other computers on the network. DHCP allows
a computer to be configured automatically, eliminating the need
for intervention by a network administrator. It also provides a
central database for keeping track of computers that have been
connected to the network. This prevents two computers from
accidentally being configured with the same IP address.
There are two versions of DHCP, one for IPv4 and one for IPv6.
While both versions bear the same name and perform much the
same purpose, the details of the protocol for IPv4 and IPv6 are
sufficiently different that they can be considered separate
protocols.[1]
History
Technical overview
Technical details
DHCP uses the same two ports assigned by IANA for BOOTP: UDP
port 67 for sending data to the server, and UDP port 68 for data to
the client. DHCP communications are connectionless in nature.
DHCP discovery
A DHCP client can also request its last-known IP address (in the
example below, 192.168.1.100). If the client remains connected
to a network for which this IP is valid, the server might grant the
request. Otherwise, it depends whether the server is set up as
authoritative or not. An authoritative server will deny the request,
making the client ask for a new IP address immediately. A non-
authoritative server simply ignores the request, leading to an
implementation-dependent timeout for the client to give up on
the request and ask for a new IP address.
DHCP offer
DHCP request
A client can receive DHCP offers from multiple servers, but it will
accept only one DHCP offer and broadcast a DHCP request
message. Based on the Transaction ID field in the request, servers
are informed whose offer the client has accepted. When other
DHCP servers receive this message, they withdraw any offers that
they might have made to the client and return the offered
address to the pool of available addresses. The DHCP request
message is broadcast, instead of being unicast to a particular
DHCP server, because the DHCP client has still not received an IP
address. Also, this way one message can let all other DHCP
servers know that another server will be supplying the IP address
without missing any of the servers with a series of unicast
messages.
DHCP acknowledgement
After the client obtains an IP address, the client may use the
Address Resolution Protocol (ARP) to prevent IP conflicts caused
by overlapping address pools of DHCP servers.
DHCP information
A DHCP client may request more information than the server sent
with the original DHCPOFFER. The client may also request repeat
data for a particular application. For example, browsers use DHCP
Inform to obtain web proxy settings via WPAD. Such queries do
not cause the DHCP server to refresh the IP expiry time in its
database.
DHCP releasing
The client sends a request to the DHCP server to release the
DHCP information and the client deactivates its IP address. As
client devices usually do not know when users may unplug them
from the network, the protocol does not mandate the sending of
DHCP Release.
Options
DHCP Relaying
Reliability
If rebinding fails, the lease will eventually expire. When the lease
expires, the client must stop using the IP address granted to it in
its lease. At that time, it will restart the DHCP process from the
beginning by broadcasting a DHCPDISCOVER message. Since its
lease has expired, it will accept any IP address offered to it. Once
it has a new IP address, presumably from a different DHCP server,
it will once again be able to use the network. However, since its IP
address has changed, any ongoing connections will be broken.
Security
The base DHCP protocol does not include any mechanism for
authentication.[5] Because of this, it is vulnerable to a variety of
attacks. These attacks fall into three main categories: