2

I messed with the dhcp.leases file (removed, and remade it) hoping it would force the IP's to repopulate. That was a mistake.. I think I have fixed it by reinstalling though.

Anyway, I setup static IP's for the servers via the dhcp.config file, I can connect to the servers via ssh & ip, and the servers no longer show up in the leases list. But the one that didn't have a static IP did.

Do static IP's not show up in the leases? Where/how would I see the static IP's that are connected?

Darius
  • 335
  • 5
  • 15
  • Since it's possible to configure static ip addresses through DNS services i would say that it should show in your dhcpd.lease and that this is normal. Because it's a lease as any other despite being static and the host it's given to also need to renegotiate for the lease at /x lease time. – Cristian Matthias Ambæk Mar 21 '18 at 18:11

1 Answers1

-1

Static IP addresses don't show up in the DHCP lease table. Static IP addresses are configured locally on a host, the DHCP server doesn't know anything about it.

Deleting the lease table or entries from it will make the DHCP server forget about addresses still on lease, so it might try to hand them out again.

I setup static IP's for the servers via the dhcp.config file

You set up reserved IP addresses on the DHCP server. Static IP addresses are configured on the host (client) and the DHCP server doesn't know about it.

It's good practice to use static IP addresses sparingly and use reserved IP addresses whereever possible/safe. This excludes - obviously - the DHCP server itself and you should also configure the most important infrastructure devices statically: DNS server, routers, core switches. It's a good idea to put reservations in your DHCP table just in case and so you have a comprehensive reference.

Zac67
  • 10,320
  • 2
  • 12
  • 32
  • 3
    You can try to invent new language, but you shouldn't chide people here for not adopting your unusual vernacular. The documentation for many DHCP servers regards these as "static" or "fixed" addresses, and never use the word "reserved". What the OP meant was obvious from their question, which you never answered (actually due to a bug in dhcpd where it logs events for host directives but fails to write the leases file, and thus static assignments don't find their way into the file and you have to parse the log if you want this information). – Nick Bastin Dec 01 '18 at 06:34
  • @NickBastin I wasn't inventing new language. There's a difference between statically configured and reserved, DHCP-assigned addresses that I wanted to point out. That is common usage and it's a cause for misunderstandings when terms are used in reverse. – Zac67 Oct 10 '21 at 17:33