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

24 comments

  1. Neat little article but... by Sevn · · Score: 1

    I had NOTHING to do with configuring a simple DHCP
    server at all. It's only about dhclient and
    dhcp terminology. Way to screen the story.

    --
    For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
    1. Re:Neat little article but... by eht · · Score: 1

      the title makes it sound like freebsd is just getting dhcp on it's list of things it can do, and why is it in the developers section instead of bsd

  2. DHCP is just akin to laziness by DonFinch · · Score: 0, Funny

    nothing like having tons of large (comparably with other management messages) broadcast packets splattered all over the network, just to save the admin from having to keep up with a spreadsheet of IP's and which box goes with what.

    --
    -- Insert wisdom here:
    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 override11 · · Score: 1

      *is speechless*

      Are you just concerned with job security or what man?? Thats a rediculous attitude. Sure, we have a spreadsheet for all our fixed IP systems (servers, email, firewalls, etc) but to have each client have a fixed IP is not realistic in an enterprise. Systems die, things change, and if you would rather spend valuable IT time solving IP conflicts be my guest, but I have TONS more important things to do. :P

      --
      No I didnt spell check this post...
    3. 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! ;)

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

    5. Re:DHCP is just akin to laziness by DonFinch · · Score: 1

      See now thats an excellent idea. I knew I was going to catch sh*t for this comment

      --
      -- Insert wisdom here:
    6. Re:DHCP is just akin to laziness by itwerx · · Score: 1

      I mod this a +1 Troll. :)

    7. Re:DHCP is just akin to laziness by SN74S181 · · Score: 1

      That's why you have a small block of DHCP addresses to serve out temporarily, and most of the boxes on your network assigned static IPs. It's not all one or the other way, you know...

    8. Re:DHCP is just akin to laziness by spongman · · Score: 1
      Yup, that's a good tip. My company bought a new T1 recently and we had to move a whole bunch of new machines over to the new class C. Changing the static addresses and the dynamic ranges in the server's DHCP config meant that all the machines including stubbornly DHCP/BOOTP-only network print adapters could be moved nets by renewing the client leases.

      I can't speak to DHCP, BOOTP and DNS servers on linux, but I found the NT DHCP extremely simple to install/configure.

    9. Re:DHCP is just akin to laziness by Anonymous Coward · · Score: 0

      I use DHCP to tie a MAC address to an IP. That way if someone else hooks in to my network, they get an unused IP. When I need to take a maching elsewhere and use someone else's network, I'll get whatever IP is available. And when I'm on my own network I can access my machines through IP address or the local domain name.

      Lord Kano
      Too Lazy To Log In

    10. Re:DHCP is just akin to laziness by fputs(shit,+slashdot · · Score: 0

      Speechless... I'm never setting statics on a per machine basis again. Simple, elegant and obvious - thanks :)

      --
      I am the bastard of base minus 12! Turing was the ejaculate of my complete machine!
  3. 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 ?

    1. Re:WTF ? News for nerds ?! by josepha48 · · Score: 1
      ROTFLOL.. how true... is slashdot running out of things to post?

      The title of this article had me confused, since I have been running a FreeBSD DHCP client for a while now. I guess they are talking about setting up DHCP servers, but still that's been around for a while to.

      --

      Only 'flamers' flame!

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

  5. How to configue a DHCP server? by Blaine+Hilton · · Score: 1
    It seems this had more to do with client setup, rather then a server, but http://www.onlamp.com/pub/ct/15 has a great index of their articles and some of them look interesting.

    Go calculate something.

  6. DHCP vs static with regard to security by Dave+Briccetti · · Score: 1

    What I'd like to have is the convenience of DHCP for quickly adding new machines to a network, but still have an easy way to identify the machine involved in a security or policy violation (a firewall log shows that a student went to a bad web site, for instance). Ideas?

  7. How to use more than 640k ram in MS OSes by ariels · · Score: 1

    Well, the first thing you have to do is pick between Extended Memory or Expanded Memory. For conciseness, we term both types "Expended Memory".

    --
    2 dashes and a space, or just 2 dashes?
  8. Re:*BSD is dying by scorp888 · · Score: 1

    Of course it is.

    I mean it's not like they just got a new version out is it (5.0), one that works with SMP and threads now, oh and had time to revamp the stable one, (4.8)

    Of course it's dieing, and everyone is going to swith from Windows to Linux on the desktop this year too, every new device that comes on the market are going to provide linux drivers, and news just in, MS Office XP for Linux is going to be released.