Wednesday, July 27, 2011

Creating a DHCP Server in FreeBSD

In the activity PKL / Internships in Puskom UNS, I will make a DHCP server in the scope of the Faculty of Agriculture using the IP Router 10.82.57.1/24

Here are the steps:
1. First install the DHCP server package, with the first entry as root,

#cd /usr/ports/net/isc-dhcp31-server
#make install clean 
2.If so, Copy dhcpd.conf.simple to the dhcpd.conf file, in /usr/local/etc
#cd /usr/local/etc/
#cp dhcpd.conf.simple dhcpd.conf
3. Then, setting and configuration dhcpd.conf
#ee /usr/local/etc/dhcpd.conf
Edit :
A slightly different configuration for an internal subnet.
subnet 10.82.57.0 netmask 255.255.255.0 {
range 10.82.57.2 10.82.57.253;
option domain-name-servers 203.6.148.2;
option domain-name "fp.uns.ac.id";
option routers 10.82.57.1;
option broadcast-address 10.82.57.255;
default-lease-time 600;
max-lease-time 7200;
}
if finished, please "Save"
4. Next, add the script in /etc/rc.conf/ :
#ee /etc/rc.conf/
 add the following script :
dhcpd_enable="YES"
dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="re0"
dhcpd_withumask="022"
 if finished, dont forget to "Save"

5. Then, please to start DHCP Server :
#/usr/local/etc/rc.d/isc-dhcpd start

0 comments:

Post a Comment

Ayo Berkomentar disini :