• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!


DHCP server setup on FreeBSD

Page history last edited by trunasuci 15 years, 3 months ago

U want to create DHCP server on FreeBSD ( NetBSD etc )?

simple just install the DHCP server pkg 1st, either thru ports or pkg_add..




trunasuci# pkg_info | grep dhcp

isc-dhcp30-server-3.0.7_3 The ISC Dynamic Host Configuration Protocol server




after install, edit /etc/rc.conf and add:









dhcpd_ifaces is your network card facing the network.. 


later edit dhcpd.conf and put something like this:


allow unknown-clients;

ddns-update-style ad-hoc;

subnet netmask {

range ;

default-lease-time 86400 ;

max-lease-time 86400 ;

option subnet-mask ;

option domain-name-servers,,,,,  ;

option routers;






subnet is your network subnet


default-lease-time and max-lease-time is your dhcp server ip leased given to client, in seconds, before it refresh/expired and ask for new ip..


option domain-name-servers is DNS servers of your ISP, and any other DNS servers such as OpenDNS etc..


option routers is default gateway for your client setting, in this case it's your network card facing the network ( anyway it can configured to other ip/gateway in the network, no problem )







time to start and check the dhcpd daemon...


trunasuci# dhcpd xl1

Internet Systems Consortium DHCP Server V3.0.7

Copyright 2004-2008 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

Wrote 1 leases to leases file.

Listening on BPF/xl1/00:01:02:7c:bb:f9/10.0.0/24

Sending on   BPF/xl1/00:01:02:7c:bb:f9/10.0.0/24

Sending on   Socket/fallback/fallback-net



that's it!.. and check on your client side...



it works!!!!




created on 20/3/2009 7:54am


Comments (0)

You don't have permission to comment on this page.