Windows – Why does a DHCP server need a static IP address

dhcp-serverstatic-ipwindows

I'm experimenting various network setups using VMs. When I setup the DHCP role on Windows Server, it requires a static IP. I am having trouble understanding why this is necessary from a technical point of view.

My understanding of DHCP is, a client broadcasts a DHCP Discovery request on the network, and any device on the network can respond. A DHCP server thus needs an IP address, but why does this IP needs to be static? The DHCP server can get its address elsewhere and still respond to the broadcast as long as it has an IP.

E.g.

  • Server A, Server B and Client X are all connected to the same switch
  • Server A is 10.0.0.1 and serves 10.0.0.X/24
  • Server A is configured to only give IP to Server B via MAC filtering
  • Server B gets its IP from Server A, thus it lives on 10.0.0.X/24
  • Server B serves 10.0.1.X/24
  • Client X connects, and gets an IP from Server B

Of course, once Client X gets is IP from Server B, it won't be able to contact Server B directly since they live on different subnets. But that's not a problem – the DHCP request is (initially) a broadcast, so everyone on the switch will receive it.

Ignore a management point of view, why can't I have

  • A master DHCP server with static IP, it only serves other DHCP servers
  • An address range for the "secondary" DHCP servers
  • An address range for clients, obtained from the "secondary" DHCP servers

Is there a technical reason that DHCP servers must have a static IP?

Best Answer

My understanding of DHCP is, a client broadcasts a DHCP Discovery request on the network, and any device on the network can respond.

A client can make an unicast DHCP request too, the renewal request is made in unicast, so the client requests directly the DHCP Server. What if the DHCP changed his original IP address ? The renewal will fail and the next request will be made in broadcast. Which is not a behavior that will optimize your network traffic.

Microsoft:

Renewing a Lease The DHCP client first attempts to renew its lease when 50 percent of the original lease time, known as T1, has passed. At this point the DHCP client sends a unicast DHCPRequest message to the DHCP server that originally granted its lease. If the server is available, and the lease is still available, the server responds with a unicast DHCPAck message and the lease is renewed.

Source

ISC:

Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:0c:29:ac:18:75
Sending on   LPF/eth0/00:0c:29:ac:18:75
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 << First request
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.0.253
DHCPACK from 10.0.0.253
bound to 10.0.0.6 -- renewal in 133 seconds.



DHCPREQUEST on eth0 to 10.0.0.253 port 67 << Renewal
DHCPACK from 10.0.0.253
bound to 10.0.0.6 -- renewal in 119 seconds.
DHCPREQUEST on eth0 to 10.0.0.253 port 67
DHCPACK from 10.0.0.253
bound to 10.0.0.6 -- renewal in 118 seconds.

Once the lease has been granted, however, future DHCP DHCPREQUEST/RENEWAL messages are unicast directly to the DHCP Server

Source