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. On BSD DHCP is an acronym� by Anonymous Coward · · Score: -1, Flamebait

    ...for Dying Host Configuration Protocol

  6. Dear, americans... by Anonymous Coward · · Score: -1, Offtopic

    ..we (europeans) feel really sorry for the you and the negative impact of the DCMA and other freedom cutting laws. Just get your shit together and put it onto european servers. You're welcome (really)!

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

  8. 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?

  9. 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?
  10. Developers lament: What Killed FreeBSD by Anonymous Coward · · Score: -1, Troll
    The End of FreeBSD

    [ed. note: in the following text, former FreeBSD developer Mike Smith gives his reasons for abandoning FreeBSD]

    When I stood for election to the FreeBSD core team nearly two years ago, many of you will recall that it was after a long series of debates during which I maintained that too much organisation, too many rules and too much formality would be a bad thing for the project.

    Today, as I read the latest discussions on the future of the FreeBSD project, I see the same problem; a few new faces and many of the old going over the same tired arguments and suggesting variations on the same worthless schemes. Frankly I'm sick of it.

    FreeBSD used to be fun. It used to be about doing things the right way. It used to be something that you could sink your teeth into when the mundane chores of programming for a living got you down. It was something cool and exciting; a way to spend your spare time on an endeavour you loved that was at the same time wholesome and worthwhile.

    It's not anymore. It's about bylaws and committees and reports and milestones, telling others what to do and doing what you're told. It's about who can rant the longest or shout the loudest or mislead the most people into a bloc in order to legitimise doing what they think is best. Individuals notwithstanding, the project as a whole has lost track of where it's going, and has instead become obsessed with process and mechanics.

    So I'm leaving core. I don't want to feel like I should be "doing something" about a project that has lost interest in having something done for it. I don't have the energy to fight what has clearly become a losing battle; I have a life to live and a job to keep, and I won't achieve any of the goals I personally consider worthwhile if I remain obligated to care for the project.

    Discussion

    I'm sure that I've offended some people already; I'm sure that by the time I'm done here, I'll have offended more. If you feel a need to play to the crowd in your replies rather than make a sincere effort to address the problems I'm discussing here, please do us the courtesy of playing your politics openly.

    From a technical perspective, the project faces a set of challenges that significantly outstrips our ability to deliver. Some of the resources that we need to address these challenges are tied up in the fruitless metadiscussions that have raged since we made the mistake of electing officers. Others have left in disgust, or been driven out by the culture of abuse and distraction that has grown up since then. More may well remain available to recruitment, but while the project is busy infighting our chances for successful outreach are sorely diminished.

    There's no simple solution to this. For the project to move forward, one or the other of the warring philosophies must win out; either the project returns to its laid-back roots and gets on with the work, or it transforms into a super-organised engineering project and executes a brilliant plan to deliver what, ultimately, we all know we want.

    Whatever path is chosen, whatever balance is struck, the choosing and the striking are the important parts. The current indecision and endless conflict are incompatible with any sort of progress.

    Trying to dissect the above is far beyond the scope of any parting shot, no matter how distended. All I can really ask of you all is to let go of the minutiae for a moment and take a look at the big picture. What is the ultimate goal here? How can we get there with as little overhead as possible? How would you like to be treated by your fellow travellers?

    Shouts

    To the Slashdot "BSD is dying" crowd - big deal. Death is part of the cycle; take a look at your soft, pallid bodies and consider that right this very moment, parts of you are dying. See? It's not so bad.

    To the bulk of the FreeBSD committerbase and the developer community at large - keep your eyes on the real goals. It'

  11. *BSD is dying by Anonymous Coward · · Score: -1, Troll
    It is official; Netcraft now confirms: *BSD is dying

    One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

    FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

    Let's keep to the facts and look at the numbers.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

    Fact: *BSD is dying

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