Install DHCP Server on FreeBSD

The Dynamic Host Configuration Protocol (DHCP) is a network service that enables host computers to be automatically assigned settings from a server as opposed to manually configuring each network host. Computers configured to be DHCP clients have no control over the settings they receive from the DHCP server, and the configuration is transparent to the computer’s user.

1) Install DHCP Server from port system.

# cd /usr/ports/net/isc-dhcp42-server

# make install clean

2) Configure the DHCP Server

# vi /usr/local/etc/dhcp.conf

option domain-name ““;

option domain-name-servers;  # IP address of Name server

option netbios-name-servers;  # IP address of Netbios Name Server or WINS Server

default-lease-time 600;

max-lease-time 7200;

ddns-update-style none;

log-facility local7;


subnet netmask {    # NetID and Subnet Mask of your network.

range;       # IP range will be assigned to client automatically.

option routers;                       # It usually is the IP address of your network default gateway.


# Create record that configures a reserved IP address of will be assigned to the client with MAC address of  00:55:31:73:D6:AA. It will be assigned default gateway is;

host noname {

hardware ethernet 00:55:31:73:D6:AA;



# Configure a reserved IP address of will be assigned to the client with MAC address of  00:78:5a:1d:23:45 and its default gateway is;

host ip-phone2 {

hardware ethernet 00:78:5a:1d:23:45;


option routers;


3) Configure to start  DHCP server  at the system boot time.

# vi /etc/rc.conf



4) Start DHCP server.

# /usr/local/etc/rc.d/isc-dhcpd start

Be the first to comment

Leave a Reply