Setting Up DHCP Server FreeBSD 7

Sekilas tentang DHCP : DHCP (Dynamic Host Configuration Protocol) adalah protokol yang berbasis arsitektur client/server yang dipakai untuk memudahkan pengalokasian alamat IP dalam satu jaringan. Sebuah jaringan lokal yang tidak menggunakan DHCP harus memberikan alamat IP kepada semua komputer secara manual. Jika DHCP dipasang di jaringan lokal, maka semua komputer yang tersambung di jaringan akan mendapatkan alamat IP secara otomatis dari server DHCP. Selain alamat IP, banyak parameter jaringan yang dapat diberikan oleh DHCP, seperti default gateway dan DNS server (wikipedia).OK… mulai yuks
Konfigurasi :
DHCP Interface : xl0
Subnet Mask : 255.255.255.0
Gateway : 192.168.0.200
Name Server : 192.168.0.200, 208.67.222.222, 208.67.220.220

Cek mesin :

[root@arema /home/arema]# uname -a
FreeBSD arema 7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Oct 13 09:51:42 UTC 2009     arema@arema:/usr/obj/usr/src/sys/FEBRIEKO  i386
Install DHCP Server :
[root@arema /home/arema]# pkg_add -r isc-dhcp30-server
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/isc-dhcp30-server.tbz…
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/isc-dhcp30-server.tbz… Done.
Added group “dhcpd”.
Added user “dhcpd”.
****  To setup dhcpd, you may have to copy /usr/local/etc/dhcpd.conf.sample
to /usr/local/etc/dhcpd.conf for editing.
Edit dhcpd.conf :
[root@arema /home/arema]# nano /usr/local/etc/dhcpd.conf
#########mulai########
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.20 192.168.0.29;
option routers 192.168.0.200;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.200, 208.67.222.222, 208.67.220.220;
}
#########selesai########
Buat file leases :
[root@arema /home/arema]# touch /var/db/dhcpd.leases
Tambahkan di rc.conf :
[root@arema /home/arema]# nano /etc/rc.conf
dhcpd_enable=”YES”
dhcpd_ifaces=”xl0″
restart mesin……
lihat client yang aktif :
[root@arema /home/arema]# tail -f /var/db/dhcpd/dhcpd.leases
contoh hasilnya :
}
lease 192.168.0.25 {
starts 1 2009/11/09 01:07:32;
ends 1 2009/11/09 01:17:32;
binding state active;
next binding state free;
hardware ethernet 00:24:3a:0f:20:76;
uid “\001\000$,\017 v”;
client-hostname “eka”;
}
lease 192.168.0.29 {
starts 1 2009/11/09 01:09:06;
ends 1 2009/11/09 01:19:06;
binding state active;
next binding state free;
hardware ethernet 00:01:6c:45:4c:99;
uid “\001\000\001l\000L\231″;
client-hostname “admin-eb7ff63ff”;
}
lease 192.168.0.23 {
starts 1 2009/11/09 01:09:36;
ends 1 2009/11/09 01:19:36;
binding state active;
next binding state free;
hardware ethernet 00:1b:77:23:82:4f;
uid “\001\000\033w\341\202O”;
client-hostname “b3rta-e73ac8654″;
}

Selesai selamat mencoba...

credited by: Yasir

0 Response to "Setting Up DHCP Server FreeBSD 7"

Posting Komentar

Related Posts with Thumbnails
Thank's For Visiting, Don't Forget To Come Back !!! :)