DHCP vs. Fixed IP
For the past, oh, 25-30 years or so I've been using fixed IP addressing for all my Ethernet equipment; servers, printers, plotters, etc. No wi-fi, everything has a CAT-5 or CAT-6 cable. Everything has a name, everything is added to /etc/hosts on every server, everybody can find everybody else with no problem. I run everything internally as 192.168.x.x with a router that has an assigned fixed IP address facing the outside world.
I've also done the "hosts" trick with sites that are frequently visited, where the site name and address are in /etc/hosts which avoids doing a look up at a DNS server (real quick, that). Not many, just a few. The only thing I ever use DHCP for is a laptop that might get lugged somewhere with internet services (library, hotel, those kinds of places) but that doesn't happen too often (maybe once every six months). So, I'm wondering -- other than lugging a laptop around to public access points, what if any advantage is there to DHCP? If somebody brings a Windows laptop around, I'll plug it in to my router and that works just fine but outside of that I really can't see what advantage there might be; am I missing something? |
Yes, you've missed the fact that 99% percent of users have never configured their network manually (IP, gateway and so in)., so for them DHCP is more "user-friendly" :-)
|
Quote:
Code:
# /etc/dhcpd.conf Code:
# /etc/dhcpd.conf Configuring everything statically on each host with an entry for every other machine in /etc/hosts is not only a nightmare in terms of sheer work, but you're also much more prone to conflicting addresses. Besides, nobody else can "just connect" to your network. Cheers, Niki |
For small, slowly changing networks fixed IPs and hosts files are simpler and more robust than having (to rely on) a DHCP server.
For large and/or rapidly changing networks it is simpler to have a DHCP server (or, better, a failover pair of DHCP servers) and dynamic DNS; the complexity is outweighed by the advantages of having a single configuration file. |
Nowadays DHCP is state of the art. Normally if you have a router in your home-network (or office) it provides also DHCP, why not use it? I've only configured my Server with a fixed IP-adress.
Markus |
Static Addressing is useful if you need to track certain machines in a large environment such as a school or business and manage the endpoint machines, but in smaller networks DHCP works fine. Static mostly is now a fall-back/fail-safe in case DHCP doesn't work correctly.
|
Network Control
Quote:
|
DHCP is for automatic network configuration, the static vs. dynamic ip address debate is pointless since dhcpd can assign both static and dynamic ip addresses.
|
DHCP basically saves you the admin and user the excruciating headache of knowing which IP address scheme is used, if the IP address is available, which subnet address is valid, the gateway address, etc. etc. etc...
In short... DHCP is, to an extent, idiot-proof network addressing. |
I used to use manually set up static assignments, but got really tired of having to configure the network every time I wanted to hook a new device up to the network, do a trial OS install on some machine's spare partition, boot from a USB drive to do disk imaging or a standalone backup, etc. Now I have a DHCP server configured with fixed assignments for known MAC addresses and with dynamic assignment from a different part of the address space for unknown new devices. Makes life a whole lot easier.
|
I use static IP addresses for my file server and my printer, so it's easy for me to connect to them from other computers.
Everything else is DHCP. |
Since I run my own local DNS service on a Slackware box in my local network, I have my DHCP server tell my DNS server what new machines have shown up in my network.
Everybody has a name and everybody uses the name. It makes life easier. |
All times are GMT -5. The time now is 02:06 PM. |