Why should I assign static IP address on my DHCP server?


I have installed isc-dhcp-server on a Debian. I'm making some experiments with this as I'm a little bit newbie on network administration.

I have read that you should assign static IP to any ethernet interface from where you want to serve IP addresses from your DHCP, but I don't really understand why.

I mean, why my DHCP server can't assign an IP address to "myself" ? All I need is to define a rank of IP addresses on dhcpd.conf, isn't it?

Thank you.
LVL 15
Who is Participating?
Maybe because network  card, when asking for it's address sends DHCP request to other network devices (not to OS).
Network card will be configured by OS in case that network card don't receive any offer from some DHCP server.
Aside from -  renew address from the same DHCP server.

Also DHCP server can be responsible for assigning multiple DHCP scopes, not just one. What ip address should then get network card, exclusions, reservations - it can get really complicated if you don't assign static ip address.
I think what you read is that your DHCP server itself should have a static IP address.  That is correct, and in my opinion all servers should have a static IP address.  

A lot of services (BIND, ISC-DHCP, etc..) bind to a certain IP address.  If they were receiving DHCP addresses it would make it very hard to administer.
Don JohnstonInstructorCommented:
One reason is that when a host tries to renew it's address, it will do so to the IP address of the server.  If the server address changes, then it can't renew the address.
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

gplanaAuthor Commented:
I understand that the DHCP server need to have a FIXED address, but why couldn't it be assigned by the DHCP server itself?

I mean, DHCP server can assign fixed address to hosts, according to its MAC address...
Don JohnstonInstructorCommented:
It can, but what's the gain?  

The primary function of DHCP is to ease in the deployment of hosts so you don't have to manually assign IP addresses.  We're talking one host here.  So there's no real gain to having this server get a dynamic address.
bbaoIT ConsultantCommented:
> I mean, why my DHCP server can't assign an IP address to "myself"

you are asking a really great question as it could be challenging most experts. :))

i guess you have learnt some basic concepts how DHCP works for both DHCP server and DHCP client sides. briefly speaking, both sides need to 'talk' to each other back and forth in order to work out an IP to be assigned to the DHCP client. how can they talk to each other?

be aware that during the negotiation process, the DHCP client has NOT obtained an IP, so the both sides can't talk to each other at IP layer. instead, they talk at Link Layer, which uses MAC address to locate each other. theoretically, any Ethernet device has an unique MAC address, that's the ID for the devices to differentiate themselves individually.

okay, if, just IF, the DHCP server is to assign an IP to itself, then how does the server talk to the client over the SAME MAC address? can you know who talks to who and who serves who? apparently, it doesn't make sense and won't work that way. :-)

moreover, if a DHCP server didn't have a static IP, as an administrator how could you know where your DHCP server is located? where to manage it? that's NOT practical in reality and could be a nightmare if it was true. :-)

does it make sense now?
gplanaAuthor Commented:
Thank you both.
I think the clue is the IP broadcast address ( where DHCP questions goes to. I didn't realiza that this means that request is going to the network, but not to myself.
bbaoIT ConsultantCommented:
yes, any broadcast packet from self to broadcast address will be ignored.

but, again, the story starts at Link Layer (Layer 2) and there is NO IP address (Layer 3) at that moment. it is all about MAC address, its broadcast address is FF:FF:FF:FF:FF:FF (48 bits) instead of FF.FF.FF.FF ( or 32 bits).
gplanaAuthor Commented:
I have read that when no IP is assigned, DHCP client uses as IP address, and (=broadcast) as destination.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.