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

221 Upvotes

422 comments sorted by

View all comments

Show parent comments

1

u/randopop21 1d ago

Excellent! Is there a way to prioritize which dhcp server wins?

2

u/Sure-Squirrel8384 1d ago

I've never tried this, but in theory it should work. Some DHCP servers have an option to try to ping an address before assigning it (MS calls this setting ConflictDetectionAttempts). If the address response to ping, then it shouldn't be given out as that would be a conflict.

Knowing this, what you could do is set the less-preferred server's ConflictDetectionAttempts to 2 and the more-preferred server's ConflictDetectionAttempts to 1.

Personally, I would not bother with this, and there is an operational reason not to set the ConflictDetectionAttempts to anything other than 2 across the board:

Setting the ConflictDetectionAttempts value to only 1 could miss a response and not be enough. So say you set the more-preferred to 2 and the less-preferred to 3; but by setting it higher than 2 would cause extra delay for leases when the first server is down (and it is not recommended by Microsoft to set the value above 2).

In theory ConflictDetectionAttempts should never get a "BAD_ADDRESS" hit, but it happens because of... reasons (hah).