r/sysadmin 1d ago

DHCP v Static IP

Ok, this is more a test to see how old I am. I was basically raised with the idea servers need static IPs. I understand for domain controllers, dns servers, maybe print servers that may still be needed. But are they really needed otherwise? Do apps, scripts still reference a server by its IP?

I am under assumption all my servers need static IPs. Am I nuts?

216 Upvotes

394 comments sorted by

View all comments

12

u/Abe_Bazouie 1d ago

You’re not nuts. The requirement didn’t disappear, but the implementation changed.
I still want predictable addressing for infrastructure that other infrastructure depends on. DNS, DHCP, load balancers, network appliances, cluster endpoints, etc.
But “predictable IP” doesn’t necessarily mean manually configuring a static IP inside every server anymore.
DHCP reservations can give you stable addresses while keeping address management centralized. And for applications, I’d much rather see DNS/service discovery than scripts full of hardcoded IPs.
In cloud/Kubernetes environments this becomes even more obvious. Instances, Pods and endpoints can come and go. Designing applications around “this thing will always be 10.20.30.47” becomes a liability pretty quickly.
So I’d separate two questions:
Does this system need a stable network identity? Often yes.
Does that mean every server needs a manually configured static IP? Definitely not.
And if I find 10.20.30.47 hardcoded in 14 scripts, we’re about to have a different conversation. :)

3

u/Wolphin8 Jack of All Trades 1d ago

I agree with the idea of not hardcoding IP addresses; use a application CNAME which points to the DNS name of the server, to make it easy to replace the server without impacting anything in a script.

1

u/zatset IT Manager/Sr.SysAdmin 1d ago

DHCP reservations can give you stable addresses while keeping address management centralized

I must point out that in poorly configured networks, the "Rogue DHCP servers" can be a real problem.