Feeds:
Pos
Komentar

Archive for the ‘DHCP Server’ Category

Instalasi DHCP Server

Untuk instalasi DHCP di slackware, yang dibutuhkan adalah paket  dhcp-3.0.4-i486-2.tgz.

# cd /usr/src/

Anda bisa mendownload file tersebut copy alamat ini di browser.

http://slackware.bgbits.com/slackware/slackware-11.0/slackware/n/dhcp-3.0.4-i486-2.tgz

Cara Instalasi seperti biasa:

# cd /usr/src

# installpkg dhcp-3.0.4-i486-2.tgz

Setelah selesai,Anda langsung edit aja file konfigurasinya sebagai berikut:

# ISC DHCP-Server Configuration
# /etc/dhcpd.conf
#
default-lease-time 86400 ; # one day
max-lease-time 604800 ; # one week
ddns-update-style ad-hoc ;
ddns-updates on;
option ip-forwarding off;
option routers 192.168.2.1 ; # important when this corresponds to: ‘gateway’
option subnet-mask 255.255.255.0 ;
ignore client-updates ;
option broadcast-address 192.168.2.255 ;
option domain-name “mydomain.com” ;
option domain-name-servers 194.22.190.10 , 194.22.194.14; # important when this corresponds to: ‘DNS Servers’

#
# LAN
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.40 192.168.2.60;
}

# DMZ
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.40 192.168.3.60;
}

#
# List an unused interface here
subnet 192.168.1.0 netmask 255.255.255.128 {
}

Kemudian test, mode debug

shell> killall dhcpd

shell> dhcpd -d &

Cek script init untuk dhcp di
/etc/rc.d/rc.local
sh ./rc.dhcpd start

Jika belum ada file rc.dhcpd, buat sendiri. misalnya seperti ini:

#!/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=”eth1″
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 “$1″ in
’start’)
dhcpd_start ;;
’stop’)
dhcpd_stop ;;
‘restart’)
dhcpd_restart ;;
*)
echo “usage $0 start|stop|restart” ;;
esac

Demikianlah cara instalasi DHCP Server.

……………………. Selamat Mencoba ………………………..

Iklan

Read Full Post »