Le serveur DHCP le plus utilisé est celui de Paul Vixie chez ISC : ftp://ftp.isc.org/isc/dhcp/
Installation :
si on récupère un binaire, sauter la partie suivante, sinon :
Décompacter
./configure
make
make install
Configuration :
ifconfig -a
Il doit y avoir MULTICAST. Sinon, recompiler le noyau et ajouter le support multicast
Il existe une interface de configuration dans KDE appelée kcmdhcpd
Exemple de fichier de configuration :
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mondomaine.fr";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
Bail par défaut : 600 secondes
Bail max : 7200 secondes
subnet mask : 255.255.255.0
adresse routeur : 192.168.1.254
adresse serveurs DNS : 192.168.1.1 et 192.168.1.2
nom de domaine par défaut : mondomaine.fr
Pour définir un serveur WINS :
option netbios-name-servers 192.168.1.1 ;
Pour attribuer une adresse fixe :
host station1{
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.222;
}
Pour le détail des options , lire le man de dhcpd.conf
Ex :
option broadcast-address - Broadcast address in my case would be "option broadcast-address 192.168.199.255 ;".
option dhcp-client-identifier - String rather than hardware address used to identify DHCP clients.
option domain-name - The name of the domain the DHCP server is serving.
option domain-name-servers - The address(es) of the DNS servers on the domain. Ex : "option domain-name-servers 192.168.199.1, 192.168.199.5 ;" The names are separated by a comma and whitespace with a semicolon ending the line.
option host-name - The client’s host name.
option lpr-servers - Lists print server addresses.
option nntp-server - Network News Transfer Protocol (NNTP) server address
option pop-server - Mail server address.
option routers - The default router address.
option smtp-server - The SMTP e-mail server address(es).
option subnet-mask - The subnet mask is not necessary since the subnet statement (see example file) contains a netmask value.
option time-offset - The difference between your time zone and the Coordinated Universal Time.
option netbios-name-servers - Define the address of the NBNS name server for samba services.
Exemple d’utilisation des options dans /etc/dhcpd.conf :
subnet 192.168.199.0 netmask 255.255.255.0 {
# --- default gateway
option routers192.168.199.1;
option subnet-mask255.255.255.0;
option nis-domain"monnet.net";
option domain-name"monnet.net";
option domain-name-servers192.168.199.1;
option time-offset-5;# Eastern Standard Time
#option ntp-servers192.168.199.1;
#option netbios-name-servers192.168.199.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#option netbios-node-type 2;
default-lease-time 1209600; # 2 weeks
max-lease-time 1814400;# 3 weeks
range 192.168.199.10 192.168.199.250;
# we want the nameserver to appear at a fixed address
host nameserver {
next-server nameserver.monnet.net;
hardware ethernet 00:10:4b:ca:db:b5;
fixed-address 192.168.199.1;
}
}