Can a DHCP server assign itself an IP address via DHCP
This may seem a daft question (and i fear it might be), but would it be possible for a server acting as a network's sole DHCP server send out a request for an IP address to the network, then catch its own request and answer it?
All of my intuition points to a no answer and ideally i would test it out but i don't have the time/spare resources currently so i was hoping someone else may have had the same thought and tried it out.
This is meant to be a generic question but if anyone is interested i'm running isc-dhcp on ubuntu 11.04
Technically the specs would allow for that to happen but it would be beyond stupid to try to do so.
It's a bad idea in two ways but yes it is possible.
- The server can't assign an IP during boot-up when the DHCP server on the same machine hasn't been started yet. So you have to make sure that the DHCP server is up before trying to assign the IP.
- If the DHCP also updates the DNS for the dynamically assigned hosts then it is quite hard to know where your DHCP server is when the DNS fails (for whatever reason)