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 http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Introduction.
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 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.100;
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.254;
option domain-name "indofreebsd.or.id";

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

add:

# ---- 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 / ISC-dhcpd.sh start

Starting dhcpd.
Internet Systems Consortium DHCP Server V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
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/192.168.1.0/24

Sending on BPF/sk1/00: 0a: 5e: 53: e3: 5d/192.168.1.0/24
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 192.168.1.1 {
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.

Sincerely,
ogeb

0 comments: