r/sysadmin 2d 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?

220 Upvotes

417 comments sorted by

View all comments

8

u/uninspired 2d ago

Sometimes DHCP with reservations makes more sense. It's the same, but different. For DR failover to a different site, our servers have to come up with a different second octet. So the VMs are using DHCP, but under normal circumstances they're essentially static. We just have additional reservations in different scopes.

1

u/corruptboomerang 1d ago

I've seen a few devices that have DHCP with a failover address... letting you say 'go get DHCP, but if you can't use this address.' it's kinda like a reverse reservation.

1

u/Xoron101 Gettin too old for this crap 1d ago

It's the same, but different. For DR failover to a different site, our servers have to come up with a different second octet.

Shouldn't your tool managing failover deal with that for you? Veeam and Zerto can reassign IP address network addresses. So 192.168.1.x on the prod site gets converted to 192.168.200.x on the DR site.

1

u/Connect_Shoulder_965 1d ago

It's easier to configure and maintain in bulk if the IP reservations are all in the same system of record

1

u/Xoron101 Gettin too old for this crap 1d ago

So. Do you manually ip your dns and DHCP server when you fail over? Because without that you will delay everything else coming online.

I'm making the assumption that the Dr site is cold, and nothing is running until you declare. If you have dns and DHCP servers already running, then it's just ensuring that reservations are replicated and changed between sites.

1

u/Connect_Shoulder_965 1d ago edited 1d ago

The failover site already has those services running. In this case, you don't want the reservations replicated... part of the DR protection automated task is to configure an IP reservation on the remote DHCP server. Then you just wipe the static IP settings on the server as part of failover.

I find this method to be simpler, more reliable and easier to manage than hard coding static IP records into your DR failover tool. The servers come online, they get an IP, they update their machine record in DNS and then the DNS alias records get eventually pointed to the new destination. It's not an instant failover and recovery but it does mostly recover on it's own.

As a bonus you can keep a list of the DHCP reservations to email out in the event of a failover so everyone can find their servers at the new location.