From LQWiki
Jump to navigation Jump to search

dhpcd (Dynamic Host Configuration Protocol Daemon) is a DHCP-daemon which manages dynamic IP addresses. It reads its configuration from /etc/dhcpd.conf. dhcpd keeps track of the current leases in dhcpd.leases, usually located in /var/db. You can usually install dhcpd from your distribution as described under installing software. If this is not possible, download it from www.isc.org.

  # Sample /etc/dhcpd.conf
  ddns-update-style interim;
  default-lease-time 600;
  max-lease-time 3600;
  option broadcast-address;
  option routers;
  option domain-name-servers,;
  option domain-name "mydomain.net";

  subnet netmask {

Start your dhcp-server using


add a static host

If you want one of your hosts to always get the same IP address, add something like this inside the subnet definition:

host somecomputer { hardware ethernet 0:a1:a1:0:b4:56; fixed-address; }

somecomputer is the hostname, the 0:a1 stuff is the MAC address, and is the IP that will always get assigned to it.

See also

  • dhcpcd -- DHCP client daemon
  • named -- DNS service
  • NAT -- network address translation

external links