MENTOR FIKLAB UPN JAKARTA

Konfigurasi DHCP di Slackware 12

fahran on January 17 2010 06:58:47Kategori : Linux

Setelah Beberapa jam Konfigurasi DHCP di slackware akhirnya selesai juga..hhuffhh.Untuk konfigurasi DHCP Server di slackware, kita hanya tinggal mengedit file konfigurasinya saja. Untuk file konfigurasinya berada di /etc/dhcpd.conf untuk defaultnya file ini tidak ada isinya. Sebelumnya kita cek dulu slackware di computer kita apa sudah memiliki paket DHCP Server apa blom.
fahran@slacker:~# ls /var/log/packages/ | grep dhcp
Untuk paket yang dipakai : dhcp-3.0.6-i486-1

Jika sudah terinstall maka selanjutnya kita tinggal mengeditnya..

fahran@slacker:~# vi /etc/dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "wedusupnvj.org";
option domain-name-servers 192.168.10.10;
ket : Domain Name dari server dhcp anda, jika ada. atau bisa diisi sebagai penamaan host lokal anda, tanpa harus menggunakan domain yang terdaftar.

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
ket : Lease time, adalah waktu yang dialokasikan ketika sebuah IP Address dipinjamkan kepada komputer client, setelah waktu pinjam ini selesai, maka IP tersebut dapat dipinjam lagi oleh komputer yang sama, atau komputer tersebut mendapatkan IP Address lain jika komputer yang sebelumnya dipinjam dipergunakan oleh komputer lain. default-lease-time, maksudnya adalah lama waktu server meminjamkan alamat ip kepada client, dalam satuan detik, 600 detik. sedangankan max-lease-time adalah waktu maksimum yang di alokasikan untuk peminjaman ip oleh dhcp server ke client dalam satuan detik, 7200 detik.


# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
#subnet 192.168.10.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.11 192.168.10.20;
#option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.
#subnet 192.168.10.0 netmask 255.255.255.0 {
# range dynamic-bootp 192.168.10.100 192.168.10.255;
# option broadcast-address 192.168.10.254;
# option routers rtr-239-32-1.example.org;
#}
# A slightly different configuration for an internal subnet.
#subnet 192.168.10.0 netmask 255.255.255.0 {
#range 192.168.10.100 192.168.10.200;
#option domain-name-servers 192.168.10.10;
#option domain-name "wedusupnvj.org";-> nama domain kita samakan saja di /etc/hosts
#option routers 192.168.10.1; –> gateway untuk pc klient eth0 server
#option broadcast-address 192.168.10.255; –> ini broadcastrnya
#default-lease-time 600;
#max-lease-time 7200;
#}

Untuk mengaktifkan DHCP Server gunakan perintah:
fahran@slacker:~# /usr/sbin/dhcpd
setelah dijalanin nanti akan muncul :

Internet Systems Consortium DHCP Server V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 leases to leases file.

** Ignoring requests on start. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface start is attached.

** Not configured to listen on any interfaces!
If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software – please
send them to the appropriate mailing list as described in
the README file.
exiting.
*** coba saja jalankan dhclient di komputer client, pasti akan dapat ip dari dhcp server yang kita bikin.

jika ingin melihat komputer yang pernah terhubung dengan dhcp server kita,
lihat isi file :
/var/state/dhcp/dhcpd.leases

di dalam folder ini terdapat file yang berakhiran .lease
ini adalah log dari dhcp (baik dhcp-client maupun dhcp-server)

Supaya DHCP Server aktif setiap kali boot maka masukkan di rc.local:
fahran@slacker:~# echo "/usr/sbin/dhpcd" >> /etc/rc.d/rc.local
Jika belum jalan juga DHCP servernya kita buat sebuah shell file “rc.dhcpd” di dalam folder “/etc/rc.d/” untuk itu kita buat dengan Text Editor :

#!/bin/sh
#
# /etc/rc.d/rc.dhcpd
#
# Start/stop/restart the DHCP daemon.
#
# To make dhcpd start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.dhcpd
#
#############################################

CONFIGFILE=”/etc/dhcpd.conf”
LEASEFILE=”/var/state/dhcp/dhcpd.leases”
INTERFACES=”eth0;
OPTIONS=”-q”

#############################################

dhcpd_start() {
if [ -x /usr/sbin/dhcpd -a -r $CONFIGFILE ]; then
echo “Starting DHCPD…”
/usr/sbin/dhcpd -cf $CONFIGFILE -lf $LEASEFILE $OPTIONS $INTERFACES
# /usr/sbin/dhcpd -q $INTERFACES
fi
}
dhcpd_stop() {
killall dhcpd
}
dhcpd_restart() {
dhcpd_stop
sleep 2
dhcpd_start
}
case “$1r43; in
’start’)
dhcpd_start ;;
’stop’)
dhcpd_stop ;;
‘restart’)
dhcpd_restart ;;
*)
echo “usage $0 start|stop|restart” ;;
esac

setelah kita buat sebuah shell “rc.dhcpd” selanjutnya file ini kita executable agar bias di eksekusi dengan perintah :
chmod 755 /etc/rc.d/rc.dhcpd


akhirnya selesai juga buat DHCP Server di slackware…..hhuffh
smoga bermanfaat…. _____________________________________________________________________________


Dapatkan Artikel Terbaru dari www.mentorupnvj.co.cc melewati Subscriptions RSS Feeds RSS Feeds atau Email Subscriptions lewat e-mail Anda
masukkan alamat e-mail anda di form ini :

Delivered by FeedBurner


Suka dengan Artikel ini ?, Silahkan Bookmark Artikel ini.

Url
BBCode
HTML

Comments

#1 | henki on January 26 2010 22:47:55
dah dicoba blm n berhasil tdk ??Cool
#2 | fahran on February 03 2010 22:48:31
nanti di perbaiki lgy pak..Grin

Post Comment

Name:




Enter Validation Code:

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.

Berlangganan Artikel

Subscriptions RSS Feeds RSS Feeds
Email Subscriptions Via E-Mail

Delivered by FeedBurner

Follow Us

MENTOR FIKLAB UPN JAKARTA on Facebook

Member Poll

Bagaimana Tampilan Web Mentor Sekarang ???











You must login to vote.

Users Online

Guests Online: 2

Members Online: 0

Total Members: 216
Newest Member: Peter01

Shoutbox

You must login to post a message.

03/09/2010 00:44
selamat menunaikan ibadah puasa... Grin
02/09/2010 11:38
Assalamu Alaikum semuanya -- Hosting Profesional Indonesia yang murah
25/08/2010 01:19
yang laen mana!
23/08/2010 13:21
hi all!
15/08/2010 14:29
sepi euy,, tutorial yg baru mana??? Hosting Profesional Indonesia yang murah
12/08/2010 00:11
kmn nich pada y....sepi amat web mentor Sad
05/08/2010 21:53
sepi dah ni skrg .. hahaha Grin
04/08/2010 08:44
ngomong apa ya?? tung tung Pfft
29/07/2010 03:30
Askum .. Smile
26/07/2010 02:36
gak komunikatif cuy web fik nya..
25/07/2010 11:38
http://www.fik.upn
vj.ac.id/ .. d'sini tempad kita cuy Smile ..
25/07/2010 11:35
ehh tadi gw iseng masuk situs UPN .. trus masuk web FIK .. ternyata dalem'a udah bagus loh .. dan elearning udah bisa d'akses secara online Smile ..
20/07/2010 09:12
jiaah,, apalagi gua,,, kaga punya rumah, jadi tidur di poon bareng lutung... Frown
20/07/2010 08:56
rese nilai gue kosong dirumah gag ada komputer ka jadi gag bisa buka web mentor tv aja nontonnya bareng -bareng di kelurahan ^_^
20/07/2010 01:10
walaikum salaam...
19/07/2010 23:11
assalamualaikum, ane baru dtg nih,
19/07/2010 23:06
Sudah final...
19/07/2010 12:07
Kata nya poin web dh final ya
19/07/2010 11:03
kumsalam gan .. saya juga jarang buka nih web .. ayo kita ramaikan lagi :b ..
19/07/2010 10:42
aihhh ,, dah lama ane ga buka ni situs ,, hehe assmualaikum agan2 ..
© 2008 by AlexALX

Comments

boddocwra on August 29 2010 13:18:56
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=ht...
>>Read More
nyul on August 15 2010 14:29:06
makasih tutorialnya mas... [url=http://psychobone.dagdigdug.com/2010/08/08/hosting-profesional-indonesia-yang-murah/]Hosting Profesional Indones...
>>Read More
Likoveriko on August 12 2010 11:36:09
Äà è ìíå ñòàòüÿ ïðèãîäèëàñü...[url=http://moskva-rt....
>>Read More
katiemaci on August 11 2010 20:28:08
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=ht...
>>Read More
candidamckec on July 09 2010 00:28:48
It is conceivably killed if potassium bicarbonateitric hypoparathyroid is found in [url=http://forum.foxestail.com/index.php?topic=24277.0]Zithroma...
>>Read More


Copyleft! © by mentorupnvj
Render time: 0.17 seconds | 427,543 unique visits | Best Optimization for with 1024 x 768px | jq_blog themes Modified by i'am