Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re:DHCP is just akin to laziness (Score 5, Informative) 24

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.

Slashdot Top Deals

Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

Working...