The DHCP server
Except for the server machines, all the hosts in the Lab get their network configuration data (IP address, gateway, DNS server) from the DHCP server running on ["james"]. Almost all configuration of the DHCP server is stored on our ["LDAPServer"].
The structure of the DHCP/LDAP database
The DHCP/LDAP database is located at ou=DHCP,ou=Services,dc=ps,dc=uni-saarland,dc=de. It consists of two entries: one dhcpServer and one dhcpService object. The dhcpServer object is what is searched for by the DHCP server binary; it in turn needs to contain a pointer to the dhcpService object that it should use. The dhcpService object declares the network and host entries also normally found in standard DHCP configuration files.
Creating a new host entry
Host entries are dhcpHost and gosaHost objects in cn=<HostGroup>,cn=Configuration; they can be created most comfortably using [http://james.ps.uni-saarland.de/phpldapadmin PHPLDAPAdmin]. The important attributes are
dhcpHWAddress: MAC address of the host in the format ethernet aa:bb:cc:dd:ee:ff (case-sensitive!)
dhcpStatements: hosts with static IPs should have a fixed-address hostname here. Other hosts will automatically get a dynamic IP from the pool.
description: A textual description of the host. It should contain the room number (for fixed hosts), or the string Laptop and the name of the person the laptop is assigned to, or Student's Laptop and the name of the owner.
The host groups we are using are
cn=Hosts with dynamic IPs: for example for laptops that don't need a static IP, especially for guests
cn=Hosts with static IPs: for our normal hosts and those laptops that benefit from a static IP
cn=Printers: for our network printers
cn=Disabled hosts: for hosts that are currently switched off
Here is an example:
dn:cn=leela,cn=Hosts with static IPs,cn=Configuration,ou=DHCP,ou=Services,dc=ps,dc=uni-saarland,dc=de cn: leela dhcpHWAddress: ethernet 00:02:b3:3a:23:60 dhcpStatements: fixed-address leela objectClass: dhcpHost objectClass: top objectClass: gosaHost description: Room 523
After creating the new host entry, the DHCP server needs to be restarted via /etc/init.d/dhcp3-server restart.
Monitoring of host liveness
The hosts and printers with static IPs that are not marked as disabled are checked every night if they still respond to a ping. If some hosts do not respond, a mail is sent to roots@ps.uni-saarland.de. For a more fine-grained configuration, the following "flags" can be put into a host's description attribute:
sometimes standby marks a host with a static IP that goes to sleep automatically and is therefore sometimes not available
switched off marks a host or printer with a static IP as switched off (e.g. for temporarily disabling a host, without moving it to the Disabled Hosts section)
The status of all our hosts can be queried using [https://www.ps.uni-saarland.de/Internal/liveness.html our host liveness web page].
The DHCP/LDAP package
DHCP is one of the few self-compiled services we use in the Lab. The major part of the installation is done via the standard DHCP packages in Debian, in particular, dhcp3-server. In addition to that, there is the dhcp3-server-ldap package, which is compiled from the dhcp3-server sources patched using the [http://home.ntelos.net/~masneyb/ DHCP/LDAP patch by Brian Masney]. The package only provides a single file: a drop-in replacement for the server binary. As the self-compiled package depends on the official one, it should be easy to track security updates.
In debian lenny dhcp3-server-ldap package is available in main (http://packages.debian.org/de/lenny/dhcp3-server-ldap).