Friday, March 18, 2011

Install DHCP Server

DHCP is a protocol used by computers in a network to determine parameters such as default gateway, subnet mask, and IP address, DNS from DHCP server. General functions of the DHCP server is to facilitate the allocation of IP addresses (hereinafter referred to as IP) and also a very dynamic IP settings to help facilitate the users to not need IP setting when there is the addition of a new user or after reformat a PC. Detailed information on DHCP please read on
Once you understand the function and workings of DHCP Server, let us try to install a DHCP Server.

First thing to do is login as root on your server, then enter the ports directory dhcp server

indofreebsd # cd / usr/ports/net/isc-dhcp3-server /
indofreebsd # make install

After the installation is complete do the configuration on dhcp server.

indofreebsd # pico / usr / local / etc / dhcpd.conf

example dhcpd.conf its contents

#---- Start ----- #

ddns-update-style none;

subnet netmask {
option routers;
option subnet-mask;
option domain-name-servers;
option domain-name "";

default-lease-time 3600;
max-lease-time 86400;

---- # # --- Completed

Save when you're done editing the configuration files above.

Perform configuration in rc.conf to determine the course of a DHCP server and listens on the interface where the DHCP server.

indofreebsd # pico / etc / rc.conf


# ---- Start ---- #

dhcpd_enable = "YES" # enable DHCP server
dhcpd_ifaces = "sk1" # interfaces to listen on the DHCP

--- # #---- Completed

then save the changes.

Start the DHCP server

indofreebsd # / usr / local / etc / rc.d / start

Starting dhcpd.
Internet Systems Consortium DHCP Server V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 37 leases to leases file.
Listening on BPF/sk1/00: 0a: 5e: 53: e3: 5d/

Sending on BPF/sk1/00: 0a: 5e: 53: e3: 5d/
Sending on Socket / fallback / fallback-net

Until the completion of this stage is the process of installing and running the DHCP server. For the other feature-feature please to experiment yourself.

Now we try a new DHCP server to obtain IP address automatically setting on a PC running Windows or on a PC dhcpclient freebsd. Note the DHCP server lease activity in the following manner:

indofreebsd # tail-f / var / db / dhcpd.leases
lease {
starts 2 30/01/2007 23:25:05;
ends 3 01/31/2007 00:25:05;
tstp 3 01/31/2007 00:25:05;
binding state active;
next binding state free;
hardware ethernet 00:01:6 c: B0: d0: 44;
uid "\ 001 \ 000 \ 001l \ 260 \ 320D";
client-hostname "ogeb";

So a bit about from my DHCP server.