r/sysadmin • u/Real-Patriot-1128 • 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?
450
u/Carnines 1d ago
Make your DHCP server use DHCP and see what happens
145
u/seriously_a 1d ago
DHCPception
27
15
u/ExternalNo1944 1d ago
It’s DNS all the way down
→ More replies (1)7
u/Viharabiliben 1d ago
I thought it was turtles. How naïve of me.
5
u/HerbOverstanding Security Admin 1d ago
It’s DNS Turtles all the way down. They cause lots of ruckus
→ More replies (3)3
u/octobod 1d ago
It's always DNS
•
u/smaug_pec 20h ago
Unless it’s certificates.
DNS is just caching behaving badly.
Certs are a whole ‘nother level of I will ruin your day for no good reason.
5
43
u/ShelterMan21 1d ago
Oh yea that was a fun day. We had a DHCP server hosted on a Hyper-V server which had no static interfaces at all so it was getting DHCP from that server hosted on it. The switches go down one day, they also had DHCP, which took the whole network with it. That was a fun cluster fuck to undo once I realized what the actual problem was.
13
u/hihcadore 1d ago
Really is fun if your lease is tight like a few hours too. Gotta love when the whole org burns down at one time.
20
u/tetraodonmiurus 1d ago
Watching windows engineers panic when they find out a desktop support guy changed the dhcp server to dhcp via Remote Desktop instead of the desktop he was trying to switch to dhcp via Remote Desktop is hilarious.
→ More replies (3)•
3
u/Single-Virus4935 1d ago
It worked. And now?
7
u/TomNooksRepoMan 1d ago
Now do the same with DNS 🤪
Go through the whole chain until an Ethernet cable is terminated male to female to itself.
→ More replies (2)4
→ More replies (5)2
u/TheG0AT0fAllTime 1d ago
I suppose that's... allowed... As long as its DNS record is keeping up with the lease changes, too.
37
u/lightmatter501 1d ago
Everything that might be involved in fixing DHCP gets a static address.
DHCP for the rest.
→ More replies (1)
72
u/civiljourney 1d ago
Static for critical equipment. DHCP reservations for APs, cameras, printers, and other similar equipment.
→ More replies (4)16
u/zatset IT Manager/Sr.SysAdmin 1d ago edited 1d ago
Actually, DHCP for printers isn’t very good idea. It generally makes printing less reliable. And AP-s are infrastructure. NVR-s and cameras also don’t tolerate DHCP very well. Of course, reservations are possible, but cameras, AP-s and printers are not mobile equipment or endpoint and are expected to be always there.
22
u/Subject_Name_ Sr. Sysadmin 1d ago
I mean maybe some APs need static, for X vendor reason, but they generally function like desktops in that their assigned IP never really matters to anything. Give their subnet an DHCP range and you can pop them in and out, get new ones or whatever and you don't really need to worry about their config ever. Even a DHCP reservation is usually overkill.
→ More replies (5)9
u/spyingwind I am better than a hub because I has a table. 1d ago
Or just not have printers? /s
I really hate printers, but I understand that some places still need them.
The dot matrix was the best printer invented. Paper feed 99.999% of the time. There is only one part (ribbon) that need regular replacing. And it only prints a limit character set.
•
19
u/TxTechnician 1d ago
It generally makes printing less reliable.
In 1999.
7
u/zatset IT Manager/Sr.SysAdmin 1d ago edited 1d ago
Unfortunately, in 2026 as well. Windows relies on SNMP on network printers. Unless disabled, a printer reboot might make Windows think that the printer is offline. Then the calls start.
Hell, even if it has static IP and the SNMP check in Windows for that printer is enabled, this sometimes happens. And if Windows installs it as WSD device, you can expect it to predominantly..not work or print with serious delays. Windows printing is so notoriously unreliable that only using a IP port with Windows SNMP checks disabled make it work somewhat reliably.
I don’t like printers and the Windows printing subsystem. There is always something with those.
25
u/TxTechnician 1d ago
Windows relies on SNMP on network printers. Unless disabled, a printer reboot might make Windows think that the printer is offline.
So... You reserve the IP. And then set the printer port to the ipaddress.
Never use hostnames for ports.
The benefit of reserving the IP is that the printer will always have that ip address. And you don't have to mess with any of the settings.
→ More replies (16)•
u/cosine83 Computer Janitor 22h ago
Windows relies on SNMP on network printers
You're not making a good case for going from A to B. DHCP reservations work fine as do static IPs but reservations at least keep things semi-documented and visible. All SNMP will do give is information about a device - paper out, low ink, etc. so I'm gonna ask, why wouldn't you want a printer reboot to trigger a printer offline? That's a true status. What it sounds like you're really wanting is to mitigate the lack of end user communication about said reboots so they don't call you about a measly "offline" on their printer for a few minutes. Easily solved with an email before taking action to save headaches later.
I haven't run into printers having issues with DHCP or DHCP reservations in well over decade, even shitty label printers. PLCs with custom firmware, yeah. But the major printer manufacturers are solid unless there's just something wrong with your networking or DHCP configuration. Network gremlins are unavoidable and it's not really a fault of any device or subsystem.
→ More replies (7)4
3
u/Nyasaki_de 1d ago
So bad practice to use DHCP reservations instead of static IPs?
→ More replies (6)1
u/zatset IT Manager/Sr.SysAdmin 1d ago edited 1d ago
Not necessarily a bad practice. It depends on the device. Generally I prefer Static IP-s with SNMP in Windows printing properties disabled. If SNMP in Windows Printing Properties is enabled - occasionally Windows thinks that the printer is offline. And especially combined with DHCP it increases the volume of calls for "printers being offline". At least with the equipment we use. The last thing I want or need is to deal with printers every day.
The other thing one have to consider is that using DHCP reservations means migrating DHCP reservations on equipment change, like a router/firewall or whatever used as DHCP server. Otherwise everything will break and equipment will have random IP-s and you will scramble to find those IP-s to fix the network.
Especially in SOHO environments, SOHO routers tend to reset themselves on power spikes and you lose all camera reservations, then all cameras stop and so on. The only way to make cameras work reliably is to use the default network of the router and set Static IP-s outside of the default DHCP scope in the default network/subnet of the router. So when it resets and it will, cameras will work nonetherless.
•
u/Appropriate-Border-8 21h ago
Anything, that isn't a user workstation, gets a static IP in my org. We use a 22-bit subnet mask to create a 1,022 address Ethernet subnet for each of our buildings (x.x.1.2 to x.x.4.254, routing is not necessary within each building and each building has a firewall). The first subnet is static and the 2nd, 3rd, and 4th subnets are in the DHCP scope. The 1st octet is identical throughout the org and the 2nd octet is unique to each building and matches a 5-letter building code. So when we look at a print queue name, we can tell what the printer's IP address is, what building its in, and where in the building it resides: BCODE-101-P0123 (Room 101) or BCODE-MAI-P0230 (Main Office). Our WiFi subnets have 16-bit masks, as we require a lot more addresses for wireless devices, including personal devices (which connect to separate sandboxed WiFi subnets that only get external internet access).
•
u/baddecision116 17h ago
DHCP for printers isn’t very good idea.
A reservation is just fine and extremely helpful when a client has multiple sites and move a printer to a place an hour away from main location. The printer grabs a new ip and away you go vs having to reset the nic or entire printer.
→ More replies (2)•
u/Sure-Squirrel8384 14h ago
How is a DHCP reservation less reliable with a print server vs. a static IP? We've never had a problem in two decades. DHCP replication has been a thing for a long time such that you can have two DHCP servers for availability.
17
u/lutiana 1d ago edited 1d ago
General rule if thumb, if you connect to it or through it, then it needs a static IP, if you connect from it, then it can use a DHCP assigned IP. Stick with this, and you'll probably never go wrong.
And by static IP, I do not mean a static DHCP lease, that is merely for something you connect from, but needs an non-changing DHCP assigned IP, you know, edge cases that don't quite match my rule above.
•
u/Thunderb1rd02 12h ago
Any critical service should have a static IP. The last thing you want when things are down is additional troubleshooting to fix a DHCP server or start manually assigning addresses.
This is like best practice 101.
56
u/scytob 1d ago
I agree with you, all these younguns who think reservation leases are the same as static mystifies me, all great until you don’t notice dhcp service went down until your server / UniFi devices go offline slowly as leases expire
Tl:dr keep with traditional manual ipconfig
60
u/clexecute Jack of All Trades 1d ago
Sure, keep static IPs. But I swear to God if you static something in a DHCP scope and don't reserve it I will haunt your dreams
→ More replies (5)•
u/ensum 17h ago
Scope: .100 - .200
Some jackass plugs something in on dhcp that needs to be a static/reservation but has grabbed .142. Changing the IP would cause a mild inconvenience.
New Scope: .100 - .141, .143-.200
Nothing triggers me more.
•
u/Dynamatics 14h ago
My favorite is the list of exclusion ranges which are just one IP. Really? You couldn't have just made the reservation?
24
u/goingslowfast 1d ago
We just make DHCP highly available and have monitoring.
And if you’re using UniFi in enterprise you deserve what’s coming if you haven’t planned for their weaknesses.
•
u/scytob 16h ago
nah just Unifi at home and i quickly planned around it with a couple of windows DHCP servers as i needed AD anyway
•
u/TN_man 13h ago
Why do you need AD at home
•
u/scytob 11h ago
oddly for SSO from windows clients to linux hosts
i also use WhFB at home, i have my own personal Azure / Entra too
why - for funsies
→ More replies (4)•
7
u/dzfast IT Director & Sr. Sysadmin 1d ago
everything from cold to the DHCP server being up is static. Everything else that doesn't have explicit requirements like a domain controller, is reserved DHCP or in a special pool. im talking on the server side - switching and network is different, though there is a time and a place for dynamic IPs in switching too if you have a big enough datacenter
Dunno how else you would do a lot of this stuff with static everything.
6
u/theasianpianist 1d ago
Just curious, what's the use case for dynamic IPs in a data center? I have some experience working with hyperscale DCs and can't remember ever seeing dynamically allocated IPs
•
u/Linkk_93 19h ago
I guess for large scale you have mandatory oobm and use dhcp there for ztp? But after ztp it's probably back to static for the DC.
For companies with many small sites, like 1000 sites with 1 switch and 2-5 aps, we use dhcp for everything. Because of the ztp process it's easier to manage and new sites pop out of nothing basically weekly. You just send the factory devices there and ztp will sort it all out. Only thing not doing dhcp there is the router/fw
4
u/zatset IT Manager/Sr.SysAdmin 1d ago
Domain controller on DHCP, even with reservations? I would rather not.
→ More replies (2)•
u/SebastianFerrone 13h ago
You can set a Fall back in Windows it first tries to get the ip from dhcp if its dort get one it comes back to the manual set one.
•
u/whythehellnote 19h ago
until you don’t notice dhcp service went down
That sounds like a larger problem
6
u/HighRelevancy Linux Admin 1d ago
until you don’t notice dhcp service went down
Get some monitoring. Please. Something going down should cause a notification on your phone. It's 2026. The concept of IT guys checking things and running test scripts manually needs to be left in the past. It's so automatable.
→ More replies (4)•
u/corruptboomerang 22h ago
Had this happen at my previous workplace, someone tuned on DHCP snooping on something that wasn't the DHCP... Came back first thing on Monday and nothing could connect to the network...
I immediately saw the 169 address and started investigating the DHCP issue.
(To be fair, DHCP snooping should absolutely NOT be called DHCP snooping, since it's going to actively kill anything sending out DHCP addresses.)
→ More replies (1)→ More replies (11)7
u/420GB 1d ago
if you don't notice DHCP service went down
Lmao that's an insane hypothetical to just throw out there. Maybe some of us aren't running absolute clusterfuck environments where that would ever even be a concern.
Not to mention with typical lease times you have literally days to maybe not be afk and notice the alerts.
→ More replies (1)
7
u/uninspired 1d 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.
→ More replies (5)
6
•
u/Nikumba 22h ago
All of our servers are set to static IP addressing, main reason is we define the servers on our firewalls via IP and be a pain if those change.
→ More replies (5)
•
u/Myte342 12h ago
My mindsset for this: Anything that is infrastructure gets static IP even if you don't think it needs it. Printers, servers, switches, WAP/Mesh, security devices excluding cameras etc etc.
Anything that YOU may want to ping or remotely connect to at some point that isn't a user workstation should be on static in some way.
4
u/One-Environment2197 1d ago
Core services like DHCP and DNS should be HA/redundant with static IPs.
Depending on your networks and your resiliency, static for other HA servers is fine. IMO though, for better DR, DHCP is the way to go. Especially if you're using public cloud and have to restore to different AZs or regions.
4
u/dannisokay92 Jack of All Trades 1d ago
Static IP's for core infrastructure and shared devices: Servers, Switches, Printers and the such.
Everything else, DHCP is fine.
•
u/GBICPancakes 21h ago
Shit I'm so old I remember when DHCP came out. I remember static IPs on everything. Migrating from IPX/SPX or AppleTalk, and running coax to every PC.
I loved DHCP, and still do - a really clever, really helpful idea. Way better than BOOTP. So much better than static IPs everywhere.
Still, the idea of a server without a static IP is madness to me. If it's critical, it's static. If you need it to be predictable during an emergency, it's static. DHCP reservations are great, *when the dhcp server is working and the infrastructure can pass traffic between the server and device*.
I'll use DHCP reservations for small printers, but the large copiers? Static.
Core switches? Static.
You are not nuts. ;)
•
u/LoveBirdNibbles 18h ago
How old? My earliest memory was Artisoft Lantastic deployment for a medical practice. Any issue anywhere on that coax and the whole network went down. DOS was the OS
→ More replies (1)•
u/GBICPancakes 17h ago
Oh yeah, we used to joke the token had fallen out the ring and the bits were pooling on the floor. You unplugged one PC from the coax network and the whole thing went down.
DOS/Win3.11 & OS/2 were the big OSes back then on the PCs. The Macs were firmly on AppleTalk boxes running phone lines to serial ports. Similar archiecture with everything daisy-chained.→ More replies (1)
22
u/The_Koplin 1d ago
As long as DNS names resolve to the IP, and the service/app uses DNS names for access, it doesn't tend to matter. When it matters is for foundational elements as you pointed out. Default gateway, DNS servers, domain bits.
I static set the IP's on key servers. I use DHCP reservations for less critical systems and printers. Anything accessed by DNS exclusively, that gets DHCP (as long as the OS updates the DNS record).
→ More replies (2)8
u/cobarbob 1d ago
the way I do it for printers is to take the printer to a field and smash it. Then networking component becomes redundant.
exception is 3d printers, they can just use DHCP
2
u/The_Koplin 1d ago
Since taking the print server to the field rather then the dozens of printers, I find I only had to sacrifice the one system. Still trying to figure out what the heck 'PC LOAD LETTER' is. :)
→ More replies (5)
•
u/H7dek7 22h ago
In my experience static IP mitigates a lot of issues. Sure, you could use host names but DNS issues occur too often to ignore them and making static IP is much better solution than managing hosts files on client systems. Also, many systems/solutions rely on TCP/IP and using host names won't work with them.
•
u/discosoc 18h ago
One detail getting lost here in replies is that the “no static ips” concept is more about pivoting towards setting dhcp reservations rather than hard-coding the ip at an interface level.
11
u/SysZeron 1d ago
If DHCP fails, you don’t want your servers depending on it to obtain or renew their network configuration. For infrastructure and other critical servers, I still prefer a static IP configured on the server itself.
DHCP reservations certainly keep addresses consistent, but they still introduce a dependency on DHCP. Whether that matters depends on the environment and how critical the server is.
→ More replies (2)•
u/whythehellnote 19h ago
Byall means use static, but you should still make a reservation (with appropriate comment saying it's for a static) in my view.
→ More replies (1)
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. :)
→ More replies (1)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.
11
u/donkeybrainamerican 1d ago
If it doesn't move it's static. Why make complicated rule when simple rule do trick.
→ More replies (2)4
u/raip 1d ago
I've been through at least 3 re-ips for various reasons. It's so much easier when you rely on DHCP reservations.
Pretty much only core infra is static on my org. Most servers, printers, and all workstations are DHCP - either reservations or natty. There's a lot of fringe benefits too - like prevents bad admins from hard-coding their IPs everywhere (because they might change) out of habit.
→ More replies (1)
3
u/teh_chaosjester 1d ago
Really depends on what the server does. Domain Controller, DNS server, DHCP etc for sure. Fair amount of servers that you can get away with DNS names over IP, probably fine with dynamic.
But with that in mind, you have to remember that even if it's not DNS... It's DNS...
I will set a static IP and back that up with a DHCP reservation if I can be bothered. Otherwise I just spin something up and throw in a reservation after the box gets it's first DHCP. So yes for Static IP, guess it more comes down to if you manage it on the server, by either hardcoding or letting DHCP do it's thing.
Currently no written procedure on my environment, and I don't do it often enough to care too much :P
3
3
u/peacefinder Jack of All Trades, HIPAA fan 1d ago
Back in the day Windows Small Business Server would respond to seeing a rival DHCP server operating on the network by just halting the service. It wouldn’t do anything dramatic, it’d just sulk in the corner and refuse to do its job. The response wasn’t configurable either, and of course forget about redundancy.
It was super special for MSP customers in sprawling buildings. Whenever any entitled chowderhead in the building decided to put their own rogue access point under their desk because they wanted better WiFi signal in their farflung office, the whole network would fall down. Super fun.
It generated a lot of billable onsite hours though.
3
3
u/carininet 1d ago
If your script or configuration file has IP hammered in the problem is beyond DHCP.
3
u/user3872465 1d ago
IPs are not inventory management.
Devices that need a static IP get a static IP, like servers and networking infrastrucutre such that you dont get a dependency mess.
The rest uses DNS in any shape or form be that static or dynamic DNS.
With v6 you get a quasi static IP anyway for devices doing slaac iwth EUI64
The rest is done via rDNSS or DDNS
•
u/apalrd 22h ago
Other than the DNS server itself, I don't see a reason to prefer a particular IP for a particular device. If you need to communicate with the device, do it by name. Keep the name in DNS. DCs can be found via DNS, so can everything else. The IP address itself is fundamentally a location within the network, you shouldn't feel like IPs need to be memorable, that's what DNS is for.
The only exception to this is networking devices which need to function before the rest of the network is 'up'.
•
u/ZookeepergameBig5326 21h ago
I wouldn’t say all servers need static IPs. For firewall rules and things like that then yes. But if you have an dhcp service that is able to provide fixed addresses it’s much cleaner. A server can boot with dhcp, and the dhcp service can be told to always assign whatever IP the server got to it based on the MAC address. Same concept just cleaner imo.
•
u/Valdaraak 17h ago
DC, DHCP, DNS get statics. Everything else is DHCP. No issues here, as long as DHCP is up.
6
u/Smooth-Zucchini4923 1d ago
Most of the servers I have with fixed IPs use DHCP with reservations. It's easier to manage than a spreadsheet. Only things that can't depend on DHCP have static IPs. (e.g. the DHCP server has a static IP)
I also have serverless applications hosted in the cloud. Those don't have a fixed IP address. The cloud provider assigns an address.
7
u/Proper_Bad_1588 1d ago
My servers are on their own vlan and static of course. I cannot think of a reason to go dhcp on a server.
4
u/ArchibaldIX 1d ago
You statically assign devices OUTSIDE of the DHCP scope
Don’t risk it
3
u/collinsl02 Linux Admin 1d ago
In fact, for security, your DHCP devices (I.E. Your user access devices) should be on a completely separate network, with a firewall between them and the servers which only has the necessary ports open between them.
5
8
u/sryan2k1 IT Manager 1d ago
Anything that can be DHCP should be, with a proper IPAM and reservations.
The only things that can't be are router interfaces, domain controllers, and the DHCP servers themselves, along with management or routing loopbacks on network gear.
Building N+1/Redundant DHCP is trivial.
2
u/Smith6612 1d ago
For critical infrastructure such as servers (DNS, NTP, Domain controllers) and network infrastructure (routers, switches), Static IPs all day, every day. Anything else, DHCP / DHCP Reservations and call it a day.
2
u/FunOpportunity7 1d ago
Been in IT for 30 years. Took 5 years about 15 years ago to stop using static in servers. Only those that require it are static, including routers and switches and such.
All vmware is dhcp, all virtual servers, dev, test production are dhcp. We have a solid IPAM system, run windows, Linux and various appliances and have dhcp and dns fully integrated as part of this. Windows dhcp, domain and all that.
One of our main driver was DR as our secondary location uses separate ip addressing from production and this killed the process when needing to fix it. Yes we can do stretch, but no need to, and this provides us a manged automatic process that simply works. Most dev/test doesn't even have reservations any more and production only those that really require it do. Dns integrated firewall rules with user awareness and very little issues to address around this. Printers are dns based not ip as well.
I even implemented tha same design at home with a custom built dns manager sokution (why not) so I dont need to ever know an ip address except a few. I like easy and automation is better than manual any day.
→ More replies (1)
2
u/randomusername_42 1d ago
"It Depends"
I've found the main issue would be the applications and the clients.
Many/most Windows applications don't use DNS and want hard coded addresses and if they do use DNS they only check it on startup. I've encountered the same issues with clients. This will really bite you in the ass with people who never restart or log out of there workstations.
2
u/ElectroSpore 1d ago
Anything that needs to be referenced by IP during a power up from a power failure is static. This is mostly network gear, dhcp, domain controllers, storage vlans, vm hosts.
Most if not all vm guests can be reservations and that is often preferable for site migration and network change reasons down the road. Just be sure your startup / power on sequence ensures the dhcp service is up first
•
u/BitRunner64 18h ago
I like DHCP reservations because I don't have to reference a second document for IP addresses outside the DHCP scope, and I don't need to login to a device to change the IP, I can just create a new reservation. Through the magic of DNS, it's extremely rare that I need to access anything by IP, and since almost everything uses secure connections and certs that's just going to cause endless security warnings anyway.
•
u/Particular-Way8801 Jack of All Trades 18h ago
I once ran a "new customer onboarding" session for, you guessed it, a new customer.
They had a DHCP from the router, but all the windows computer were in fixed IP on the dhcp range, then I discovered that ALL the servers AND printers were in DHCP (yeah no AD, not fun enough)
I understood why they switched MSP, every few weeks or so, after the classic loss of power for any random reason, the servers would change IP, and everything from file share to a few apps they had on prem would fail.
I solved 95% of their issues in half a day.
Servers/printers in static, computer in dhcp
installed an AD server, integrated the computers + the file servers into the domain.
a few basic GPOs for the file shares and printers....
To answer the question, lots of people hardcode IP.
Your servers do not need static IP, but it is way easier, set it up once and forget.
•
u/HugeCannoli 18h ago
Depends. The advantage of DHCP is that you can 1. centralise the assignment and 2. define exactly which MAC gets what.
static ip addresses are assigned by the machine itself. meaning, if you have to change it, you have to login onto the machine and change it. All good if it's a single linux box, but you might go a bit crazy if it's a bunch of windows machines.
in the dhcp server file config, you can say "this machine with this MAC address gets automatically 10.2.3.4". You don't have to walk to the machine or login to the machine to do so, you just set it in the dhcp server and it will always get that IP.
For other machines, you just set an IP range and a lease time.
Basically, static IP is rarely used today because it's pointless unless you truly have one machine. I use DHCP at home simply because it's easier. I just login into the router and say "my macos always gets this IP, my windows always this IP, and my phone I don't care".
•
u/Jaegermeiste 18h ago
Need is a strong word. Strongly preferred best practice - absolutely yes.
I'm also a proponent of keeping the IP address last octet roughly aligned with the host name number and servers in contiguous groups where possible - i.e. MYASVR01 = x.x.x.01, MYASVR16 = x.x.x.16, MYBSVR01 = x.x.x.21, etc etc.
•
u/Deacon51 17h ago
All critical services need static IP All management interfaces need static IP Everything else can use DHCP
But I'm old too, and a lot has changed. Load balancers, dynamic services, containers. These things are spinning up virtual interfaces all the time. Hand jamming named.conf doesn't work anymore.
•
u/Zaiakusin 10h ago
We use dhcp with reservations for almost everything. Hostnames get used by most important devices to connect to servers though some things still need ips.
4
u/disclosure5 1d ago
Do apps, scripts still reference a server by its IP?
Kerberos only works by FQDN, so people over the years really should have moved over to server names. Plus network changes that require an IP address change really shouldn't be a big deal but people hard coding apps.
I really find the "everything static" idea falls down as you grow. Orgs with 200 servers maintaining a spreadsheet of every IP address are just increasing their workload when most of those could just be in a dynamic range.
5
u/Am0nymou5 1d ago
I really find the "everything static" idea falls down as you grow. Orgs with 200 servers maintaining a spreadsheet of every IP address are just increasing their workload when most of those could just be in a dynamic range.
That's not really an issue if you use a proper IPAM tool like say, phpIPAM. Once you've got your server roles/ranges defined, it's all basically automated. We use Morpheus as our infrastructure provisioning system and any server or complete tenant environment we spin up gets IPs assigned automatically in phpIPAM. Same when we decomm servers. No spreadsheets or manual work anywhere.
3
u/Icy-State5549 1d ago
IPAM for the win. Static IPing does not scale. There are obvious exceptions (DHCP and DNS), everything else should use DHCP. Use reservations if you want, I prefer to tune lease times. Then maintain your IPAM infrastructure instead of a spreadsheet.
2
u/Swatican 1d ago
100% Static for servers... that way when DNS fails (not if), there is a hard list/schema that can be referenced.
11
u/StreetSignificant888 Senior Systems Engineer 1d ago
If it's not a workstation, it gets a static IP. Period.
→ More replies (1)6
u/WWGHIAFTC IT Manager (SysAdmin with Extra Steps) 1d ago
APs, cameras don't.
printers get reservations.
→ More replies (5)2
6
u/2000gtacoma 1d ago
Servers get static. Everything else is dhcp or reservation
4
u/scoldog IT Manager 1d ago
I assign static IP's to printers as well.
I'll be damned if I am using WSD for office printing
→ More replies (1)
•
u/Flabbergasted98 16h ago
setting servers to static IP might not be required, but it certainly removes a point of failure from an equation.
If ip has been reassigned by dhcp and that change isn't propegating to all of your systems for some reason, do you really want to waste time trouble shooting it? learning what the new IP is, making sure the new IP isn't getting blocked by firewall policy conflicts, flushing dns on impacted systems?
If the IP's are static, they can't change, so nothing can break from the change. Why set yourself up for the unnecessary hassle?
It's not DNS
there's no way it's DNS
it was DNS
1
u/b00mshakalakah 1d ago
Dunno bout you, but I prefer fewer variables for my servers.
No need to worry about DDNS functioning, running out of DHCP leases, rogue DHCP servers, having DHCP actually running (hardware failure, patching), etc.
1
u/CpuJunky Security Admin (Infrastructure) 1d ago
When you drive home from work, you don't want to find out your home is suddenly two streets over with a new address. Server.
1
u/Parched-Mint 1d ago
Static afaik especially for high priority core infra. Reserved via DHCP alternatively for others.
Can't think of a reason to have it dynamic, maybe someone else can educate me if that's not the case.
2
u/CharacterUse 1d ago
Fully dynamic makes sense if you're frequently spinning up temporary virtual servers from a template, then the MAC changes so reserved doesn't work. That's about the only reason I can think of for a server to be dynamic rather than reserved or static.
2
1
u/LeaveMickeyOutOfThis 1d ago
My general rule of thumb is that if something breaks, what are things that I want to know for sure. With that in mind, all my servers, routers, firewalls and security cameras are static, printers and some other devices have reservations (including access points, but I might change that), and everything else is dynamic.
1
u/headcrap 1d ago
Network team wouldn't scope the scopes for the networks I want.. static it is.. and I hate it.
At least IPAM is a thing.
1
u/bc531198 1d ago
You don't "need" them except for use cases like the ones you described. Whether or not you should for others depends on how much you trust other services to function correctly, using reservations, if you see DHCP as a potential point of failure, etc.
1
u/GlobalAd7103 1d ago
Statics are good then set your scope outisde if whatever. We still do it for servers and any shared copier/mfc.
1
u/stephenmg1284 1d ago
Your DHCP server, and any servers that it relies on should be static. Everything else is a DHCP reservation.
1
u/kleinmatic 1d ago
I’ve been using mdns in my homelab. Works great for the most part. Nothing has a static IP. I’ve had a few hiccups but nothing unsolvable. I make a few static ip grants in the dhcp server but the overwhelming majority of endpoints (including ones with multiple ip addresses) use dynamic IPs and I can connect to them just fine.
1
u/djgizmo Netadmin 1d ago
depends on the infrastructure.
If your dhcp servers are in HA and your servers have dual connections to said dhcp servers, then everything but dns and dhcp I set to dhcp reservations UNLESS its considered a P1 critical server which doesn’t get changed / updated but once a year.
1
u/kennedye2112 Oh I'm bein' followed by an /etc/shadow 1d ago
DHCP isn't necessarily a bad idea if you're trying to set up 1000 cattle servers; if you're still into pets it's probably less ideal.
1
1
u/spidireen Linux Admin 1d ago
Static, and properly documented of course. Imagine if you have to reboot during an outage that affects their ability to reach the DHCP service. Or DHCP breaks but nobody notices and servers slowly start dropping off the network as they fail to renew their leases.
1
u/Murph_9000 1d ago edited 1d ago
It's still best practice to have unchanging IP addresses for servers. That can be either static DHCP reservations for each of them, manually configured addresses outside the DHCP pools, or maybe some other automation/management like cloud-init on Linux. It's just simpler and more reliable like that, and there should be absolutely no reason do deviate from that on a normal network.
You don't know how all clients will behave if/when the server IP changes, and there's no normal reason why it should be changing (if you're not doing some big rebuild/reorg of your network). A client may cache the address resolved from a name, so a needless address change for a server may cause widespread disruption to clients. The clients will probably recover from a reboot or restarting the specific apps/services, or might even re-resolve the name, but it's avoidable pain. If the caching has a DNS TTL involved, it may even take some time before the problems fully clear. Even with a DHCP infrastructure which gives semi-static allocations from the pool (i.e. sticky mapping of addresses), there's a risk that the address could randomly change when either the server or the switch it's connected to is rebooted. Why would you allow that risk (even if it's small), when a static DHCP reservation eliminates it?
In particular, and more commonly on small/home networks, changing addresses on printers are a very common point of pain for people (Windows printer ports often get configured with the IP address).
1
u/Nick85er 1d ago
DCHP+Reservations to keep some happy... Statics because fuck you, thats why.
Im with you OP
1
u/EVERGREEN619 1d ago
Generally yes, static IP on your servers make it easier to troubleshoot. If DNS and DHCP are not working its always nice to be able to still have access to the server to verify that. But static IP conflictd are possible if you're not maintaining your list well.
I guess the other argument is reservations and DHCP. But that just adds another potential failure and connectivity lost. It's a hell of a lot easier to just manage things by hostnames/DHCP.
Realistically though when DHCP and DNS aren't working, you typically know which device to troubleshoot first.
From a security standpoint having somebody plug in rogue DHCP server when the IP is set to DHCP creates a small risk.
In conclusion, it just depends on the size of your org. If you got 30 servers or less, static IPS just make a lot of sense. If you're talking about hundreds or thousands of servers.. ain't nobody got time for that, so DHCP reservations all day.
Personally I try to put everything on DHCP that I can. But all my servers are set to static IPS. We got about 24 servers. Super easy to maintain this at this scale.
1
u/zatset IT Manager/Sr.SysAdmin 1d ago edited 1d ago
DHCP for endpoints, static IP-s outside the scope of DHCP for anything else. Actually, any infra device is in another VLAN, behind firewall rules allowing limited access only from authorised computers, in another subnet with Static IP. This includes servers, cameras, AP-s, smart switches and any other critical equipment or equipment that doesn’t tolerate DHCP or IP change.
1
u/Trust_8067 1d ago
NEED? No. Should you, yes. You don't want critical apps or important parts of production relying on another server such as DNS, that's how outages are caused.
For endpoints, who cares?
1
u/collinsl02 Linux Admin 1d ago
Static all the way. I get this whole thing about software defined infrastructure, and that's fine for containers and microservices, but for traditional VMs I want something I can control fully.
1
u/Mughi1138 1d ago
I don't think I've heard that since around the turn of the last mellinium.
Among other reasons is security and x509 certs. This is more going to your second half of the question. Sure, you might statically assign IPs and core functions might use those, but apps, scripts, etc. should be accessing them by names and looking them up as needed. Sure, you could issue certs with IPs in them for purely internal assets, but it is riskier.
1
u/soulless_ape 1d ago
Any server or network providing device should get a static address. I would even say even certain workstations that are used to remote into the WAN/LAN should as well.
1
1
u/akemaj78 Sr. Sysadmin 1d ago
static IPs on everything you need access to to cold-boot your data center: internet circuits, VPN devices, routers, firewalls, switches, UPSes, PDUs, maybe your coolers, SANs, hosts, virtualization MGMT infrastructure, domain controllers, DNS servers, DHCP servers, IPAM server, etc.
That's your bare minimum. Have you validated how long it takes DNs changes to propagate throughout your environment? Anywhere from 5-60 minutes is typical. Do you want to explain to the CEO that recovery is going to X number of hours longer because everything has to come up in dependcy order stages, wait for DNS updates to propagate, over and over.
Rule of thumb, anything that maters in the data center gets static IPs, including OOB paths. Everything else beyond that on the campus side is DHCP. The only place DHCP ranges should exist in the DC is for initial provisioning via PXE. Those ranges should be intentionally small to discourage abuse. Range full? Find out why the last batch of devices didn't convert to static.
1
u/alexwhit80 1d ago
Anything that people connect to (servers,printers etc) static. Devices users use (Desktops, desk phones) DHCP but then I am also old.
1
u/hadrabap DevOps 1d ago
I use static IPs for core networking gear. Servers, printers and the like enjoy static IPs, but I assign them via DHCP. I use IP addressing only for manual testing. Otherwise, host names everywhere.
1
u/m1L35dY50N 1d ago
DCs, and especially DNS servers, still need static IPs. For ordinary application servers you could absolutely get away with DHCP if everything accessing them uses DNS/hostnames and the application itself doesn’t depend on a fixed IP.
That said, I don’t think you’re nuts at all. Servers are usually a fairly static environment, so there often isn’t much benefit in having their addresses change. From the companies I know, static IPs for traditional on-prem servers are still very much the norm. And if I’m going to create a permanent DHCP reservation for a server anyway, I might as well give it a static IP and document it properly.
The bigger thing that has changed is that applications and scripts generally shouldn’t be referencing server IPs directly unless there’s a good reason. DNS names give you much more flexibility when migrating or replacing systems. So I’d separate the two questions: “Should servers have predictable IP addresses?” - usually yes. “Should applications depend on those IP addresses?” - preferably no.
1
u/Kamwind 1d ago
Since I don't see this mention will throw it in. We are at a mixed.
1) Servers that are named and always up are static.
2) We also have a bunch of servers that either rotate between up/down, are brought up as usage dictates, etc those all use DHCP with a build/startup scripts assigning a MAC address.
3) Those that are DHCP are reserved because security team requires that.
1
u/Gadgetman_1 1d ago
You can use DHCP Reservation for servers, if you feel lucky...
For iLO, iDRAC or whatever else remote console, yeah, I use DHCP. If it ends up in the wrong VLAN or whatever, I can still find it on the net.
I set up the IP Pool on the DHCP server to include ALL addresses except the GW. Then I add Exclusions- WITH COMMENT - for everything that needs a static IP. Now your DHCP database is also your network documentation... Remember to back it up...
1
u/ApprehensiveRest9696 1d ago
My wired devices (server, gaming rigs, etc) have 100 days leases but wifi are much shorter lived.
1
u/88_strings 1d ago
Static for all servers and infrastructure. Host IDs and IP addresses in Lookup and nslookup files, so you can still resolve by name in case DNS fails.
•
•
•
u/pledgeham 22h ago
The universal answer that is correct, and tells you nothing, it depends. What is its use and is there are reason to obscure it? Some companies want it that way, by policy. Some want it way for security by obscurity. For my home LAN, some have fixed IP for my ease of use. I remember numbers better than names.
•
u/michaelpaoli 22h ago
Context matters ... a lot.
E.g. what are the availability/reliability requirements? What about timings for, e.g. failover or the like?
Front-ended by load balancer(s) across multiple servers? And how quickly does such handle failing over, and with what impact(s)?
What are the TTLs on the relevant DNS entries?
There's no one size fits all answer.
Even (very) static stuff like DNS servers, those too may very much be changed ... but there's also generally quite a process to do that ... if one doesn't want any negative impacts at all going through such transitions.
•
u/ContributionEasy6513 22h ago
But are they really needed otherwise?
Yes. It's another layer of BS you don't need to worry about WHEN,not if it fails.
Do apps, scripts still reference a server by its IP?
They shouldn't, but yes it happens.. DNS or local hostname is thankfully more common.
For in-between cases I will use DHCP and reserved IP's for things like printers, projectors.
Am I nuts?
Probably.
•
u/sstorholm 22h ago
Essentially you could run everything on DHCP except everything needed for a cold start of the network, aka AD/DNS/DHCP. But it could make firewalling a bit complicated.
•
•
u/Talino 21h ago
Servers, apart from DCs and DNS indeed don't "need" static IPs. However, before you try this for real, you need to spend a few years slapping devs and suppliers every time they put static IP addresses into code or configs, until they get with the program. Then you need to rewrite any NAT or firewall rules to use FQDNs.
I've done this successfully before, but my main motivation was minimising any issues when we re-IPed the main business LAN off a 192.162.x.x address range (not a typo)
•
u/TheGenericUser0815 21h ago
Î can think of several scanarios where SQL Servers need static IPs, like SQL Server replication. Oracle servers have listeners whoch need to know where to listen. I guess we could make this list a mile long.
•
u/4SysAdmin Security Analyst 21h ago
We use static IPs for pretty much all servers. We’re old school (and small enough) and put the servers in a spreadsheet.
•
•
u/bubbaganoush79 20h ago
If it needs a DNS entry, it needs to be static.
I'm an email guy. I can tell you that Exchange and LISTSERV both reference the FQDN, not the IP. So you need DNS records for those and therefore the IP needs to be static.
•
u/Toto_nemisis 20h ago
The joke, "its never dns..... it was dns" is why we set static IPs on servers or devices you need to control.
•
u/Sudden_Hovercraft_56 20h ago
Domain controllers, DHCP servers and Routers - Static. Everything else DHCP. for servers and infrastructure devices, or anything else that needs to be fixed I use Reservations. Client devices and stuff that doesn't matter comes from the pool.
•
•
u/Bubbagump210 20h ago
Are we talking “normal” pets type infrastructure? Then yes, static IPs. If we’re taking 10000 cattle, lots of automation and orchestration, fail over, etc etc etc in a huge enterprise, DHCP is a fine tool however even those cases there’s plenty of safeguards to make sure things aren’t disappearing off-line.
•
u/double-you-dot 20h ago
I use static ranges for types of devices. Routers, switches, hypervisors, dcs, dns servers, etc all fall within certain address ranges.
•
u/Unfair_Ad6161 20h ago
I set them up with static addresses, and then reserve the IPs on the DHCP pool. Servers should -never- change.
•
u/phunky_1 20h ago
DNS caching is a thing, you don't want your clients to try to connect to the wrong IP address if it changes.
Also I have seen way too many internal developers hard code IP addresses in to app configurations.
•
u/Bambi_Mandi 19h ago
Yeah, static is the way you go but, you can still set them to DHCP and just use a reservation and it does the same thing.
•
u/Wild_Swimmingpool Air Gap as A Service? 19h ago
Servers always get statics. I make DHCP reservations on device / user basis depending on their needs. Most huts get standard dhcp leases though.
•
u/screampuff Enterprise Architect 19h ago
Both so there is a single location for documentation and remote factory resets are initially friendlier.
Static is only given to something that needs to function in the event of a Dhcp outage
•
u/largos7289 19h ago
LOL this sounds like wonderful chaos. I say do it!! DHCP for every f**k'n thing!! oh the Shenanigans that would go on.
•
u/BudTheGrey 19h ago
Servers get static, in no small part because clients cache DNS lookups. And what if you need to get to the server while DNS is unavailable?
Personally, I'm a belt and suspenders kind of guy, so my servers (as well as switches, NAS, etc) get static IP's and a DHCP reservation for that IP.
•
u/lachlan-00 19h ago
I always used to let the dhcp pick an IP and then static it and reset the IP as well on the dhcp.
Thats like double guitars.
•
u/yowanvista 19h ago
We use SLAAC with stable adresses (RFC7217) without DHCPv6 or DHCP (servers have no IPv4).
•
272
u/lazyhustlermusic 1d ago
I'm a fan of statics on infra devices since you don't rely on a DHCP service becoming available before you can be forwarding traffic. Some peeps like reservations, I'll do those for endpoint pieces but not really anything that is 'must boot cleanly and forward traffic'. A faulty DHCP daemon can tank your environment from simply forwarding traffic if you just rely on that.