Introducing DHCP on FreeBSD
BSDForums writes "On all but the smallest TCP/IP network, it's handy to configure network information for computers automatically. That's what DHCP does. It's easy to act as a DHCP client, but configuring a server is a little trickier. Dru Lavigne introduces DHCP and explains what you need to know to setup a simple DHCP server."
Rather than keep a spreadsheet with addresses somewhere, you use the DHCP server configuration file /etc/dhcpd.conf as your database itself. Whenever someone puts a computer on the network, here's the process:
- User plugs in
- User gets an IP address from the server for a 'bogus' network - not an IP on our actual subnetted class B.
- User usually complains to IT department (we love this part.)
- We check the dhcpd.leases file, which has a new entry like this:
- Once we're satisfied this box belongs on the network, edit
/etc/dhcpd.conf and add a static address in the 'valid' network section for this box:
- Add joeslaptop.internal.example.com to internal DNS
- Restart dhcpd
- Have user restart their computer.
Now it gets a static IP, with matching DNS entry, and we never even need to see the damned thing. When they take their laptop home, DHCP there will give them an address that works, they don't need to configure different profiles, etc.This provides the current (fake) IP address the machine is on, the client host name (usually something easy to identify). We can log into the machine and make any changes to match IT policy before we put it on our actual net, with an actual router address, etc.
All the benifits of static IP addresses, not nearly the same degree of hassle.
I thought this article was interesting, if for no other reason than because it reminded me of how difficult it was to teach myself DHCP configuration with very little outside help. It seems like it would be a good article for someone starting out, however the title for this news post is somewhat ambiguous. Old hats can smile and remember the good old days. Newbies can learn to build a better server or client.