Slashdot Mirror


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."

5 of 24 comments (clear)

  1. Re:DHCP is just akin to laziness by Sevn · · Score: 2, Interesting

    If you've ever had to admin a network with a few
    nearly populated class c's or even a slightly filled
    class b along with a parade of arrogant cock
    contractors and traveling dignitaries coming and
    going with their laptops with alarming frequency,
    you'd understand how the benefits of DHCP far
    outweigh some broadcast packets when you are already
    severely understaffed.

    --
    For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
  2. Re:DHCP is just akin to laziness by nano2nd · · Score: 5, Interesting

    Heh heh - you're a funny guy.

    So what if you want to change your default gateway, your WINS server address or completely change your addressing scheme because you're linking with another network or something?

    I guess you're right - only a lazy sysadm wouldn't want to visit 3000 desktops and reconfigure them manually!

    And with regard to broadcast - fire up Ethereal (www.ethereal.com) and see how little DHCP clags your network compared to Netbios! Oh, you can't cos you're running static IPs! Good for you and your protestant work ethic! ;)

  3. Re:DHCP is just akin to laziness by foreach+(0..100) · · Score: 5, Informative
    Wherever we work, we've found that DHCP is the perfect answer to setting up static IP addresses.

    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:

    1. User plugs in
    2. User gets an IP address from the server for a 'bogus' network - not an IP on our actual subnetted class B.
    3. User usually complains to IT department (we love this part.)
    4. We check the dhcpd.leases file, which has a new entry like this:
      lease 192.168.1.63 {
      starts 5 2003/04/18 09:49:54;
      ends 6 2003/04/19 09:49:54;
      hardware ethernet 00:08:02:36:da:15;
      uid 01:00:08:02:36:da:15;
      client-hostname "Joe's Laptop";
      }

      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.

    5. 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:

      host joeslaptop {
      hardware ethernet 00:08:02:36:da:15;
      fixed-address joeslaptop.internal.example.com; }

    6. Add joeslaptop.internal.example.com to internal DNS
    7. Restart dhcpd
    8. 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.

    All the benifits of static IP addresses, not nearly the same degree of hassle.

  4. WTF ? News for nerds ?! by itsme1234 · · Score: 4, Funny

    For about 8 years there was DHCP support in *doze; *BSD and linux had support since I don't remember when. What's next, TCP/IP stack for openbsd ? Support for 486's in linux kernel ? How to use more than 640k ram in MS operating systems ?

  5. Good Article, Bad Title by asdfx · · Score: 3, Informative

    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.