
QTECH
Software Configuration Manual
11-145
11.2 Technical details
Schema of a typical DHCP session
DHCP uses the same two IANA assigned ports as BOOTP : 67/udp for the server side, and 68/udp for the
client side.
DHCP operations fall into four basic phases. These phases are IP discovery, IP lease offer, IP request, and IP
lease acknowledgement.
After the client obtained an IP address, the client may start an address resolution (ARP) query to prevent IP
conflicts caused by address pool overlapping of DHCP servers.
11.2.1
DHCP discovery
The client broadcasts on the physical subnet to find available servers. Network administrators can configure
a local router to forward DHCP packets to a DHCP server on a different subnet. This client-implementation creates a
UDP packet with the broadcast destination of 255.255.255.255 or subnet broadcast address.
A client can also request its last-known IP address (in the example below, 192.168.1.100). If the client is still
in a network where 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
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.
11.2.2
DHCP offers
When a DHCP server receives an IP lease request from a client, it reserves an IP address for the client and
extends an IP lease offer by sending a DHCPOFFER message to the client. This message contains the client's MAC
address, the IP address that the server is offering, the subnet mask, the lease duration, and the IP address of the DHCP
server making the offer.
The server determines the configuration, based on the client's hardware address as specified in the CHADDR
(Client Hardware Address) field. Here the server, 192.168.1.1, specifies the IP address in the YIADDR (Your IP
Address) field.
11.2.3
DHCP requests
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 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.