Software projects/OS/Slackware/Advanced usage/DHCP server - Pandora Wiki

Dnsmask and dhcpd

  • I never used Dnsmask. Seems it's great.
  • dhcpd is the most common dhcp server.

dhcpd

  • Check google for "dhcpd.conf examples".
  • Here's a simple and understandable configuration:
# dhcpd.conf
 
option domain-name "nom_choisi";

option subnet-mask 255.255.255.0;

option domain-name-servers 217.115.138.24 , 192.168.1.3;
ddns-update-style ad-hoc;

option routers 192.168.1.1;

default-lease-time 86400;

max-lease-time 604800;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option broadcast-address 192.168.1.255;
}

#host PC-1 {
#hardware ethernet 00:00:4C:72:86:68;
#fixed-address 192.168.1.50;
#}
  • Edit /etc/dhcpd.conf as you need.
  • Note that the network interface has to be configured before running dhcpd on it. So you'll have to comment or remove
/etc/rc.d/rc.networkmanager start

from /etc/rc.d/rc.local , and put something like

ifconfig eth0 11.22.33.44/24

instead, depending on which interface/network address you plan to use.

  • Run dhcpd eth0, dhcpd usb0 or dhcpd usb1 depending which interface you intend to use to deliver dhcp service.
  • Once you got a satisfying configuration, put the command in /etc/rc.d/rc.local , after the fixed adress.
Top