Thursday, January 26, 2012

Debian "wheezy" DHCP server setup notes

The DHCP server package on "wheezy" is called "isc-dhcp-server".

Basic instructions are available over at the Debian Wiki: DHCP_Server

Here's what happens on my machine:

# apt-get install isc-dhcp-server
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  isc-dhcp-server
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 412 kB of archives.
After this operation, 856 kB of additional disk space will be used.
Get:1 http://localhost/wheezy-amd64/ wheezy/main isc-dhcp-server amd64 4.1.1-P1-17 [412 kB]
Fetched 412 kB in 0s (4,174 kB/s)  
Preconfiguring packages ...
Selecting previously unselected package isc-dhcp-server.
(Reading database ... 122678 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-17_amd64.deb) ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.1.1-P1-17) ...
Generating /etc/default/isc-dhcp-server...
Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Now, that doesn't look very good: the DHCP server fails to start. But it isn't configured yet, so maybe that's why.

The configuration file for the DHCP server is /etc/dhcp/dhcpd.conf. Here's a very basic one:


ddns-update-style none;
    option domain-name "mshome.net";
    default-lease-time 600;
    max-lease-time 7200;
    authoritative;

    subnet 192.168.0.0 netmask 255.255.255.0 {
    }

    # For NetVista N2200:
    option nv-211 code 211=string;

    host netvista {
      hardware ethernet 00:06:29:23:9b:64;
      fixed-address     192.168.0.44;
      option nv-211     "tftp";
      filename          "netvista/kernel.2200";
      option root-path  "/srv/netvista";
    }

Sure enough, now it starts:
# invoke-rc.d isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed!
Starting ISC DHCP server: dhcpd.

No comments:

Post a Comment