Kali ini kita akan melakukan installasi dan konfigurasi DHCP SERVER untuk melakukan installasi maka anda harus menyiapkan DVD binary 1. Untuk lebih jelasnya perhatikan langkah di bawah ini.
- Siapkan komputer anda yang telah di install sistem operasi debian.
- Setelah masuk ke sistem silahkan anda login sebagai administrator pada root.
- Setelah login ke dalam root maka kita akan melakukan proses installasi, untuk installasi silahkan anda menggunakan perintah
apt-get install dhcp3-server
|
|
Konfirmasi Installasi DHCP Server
|
|
Pesan Filed Pada Saat Selesai Installasi
|
- Proses installasi telah selesai kita laksanakan maka langkah
berikutnya adalah melakukan konfigurasi terhadap dhcp yang baru saja
kita lakukan installasi. Gunakan perintah berikut untuk melakukan
konfigurasi.
nano /etc/dhcp/dhcpd.conf
|
|
Konfigurasi DHCP Server
|
- Disini saya menggunakan trexs editor "nano" anda jga bisa
menggunakan text editor lain yang ada di debian. Berikut ini adalah
konfigursi awal DHCP yang belum anda lakukan editing. Apabila anda
mengetikkan perintah di atas maka anda akan di suguhkan tampilan seperti
di bawah ini.
|
Tampilan Awal Konfigurasi DHCP
|
berikut ini adalah script lengkap DHCP server
#
# Sample configuration file for ISC dhcpd for Debian
#
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
# 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 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.
#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.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 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";
# server-name "toccata.fugue.com";
#}
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}
#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}
|
|
Melakukan Pencarian
|
- Setelah bertemu maka silahkan anda lakukan konfigurasi sesuai
dengan yang anda inginkan. Hilangkan tanda pagar pada perintah yang
berwarna merah seperti pada gambar di bawah ini.
|
Hasil Konfogurasi DHCP Server
|
berikut ini konfigurasi lengkap yang telah saya lakukan perubahan.
#
# Sample configuration file for ISC dhcpd for Debian
#
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
# 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 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.
#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.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 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}
# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 { -----> isikan dengan subent network anda dan netmasknya
range 192.168.1.3 192.168.1.10; -----> isikan range ip yang nantinya anda sewakan untuk client
option domain-name-servers ns1.e-learningk.blogspot.com; -----> isikan dengan domain anda
option domain-name "e-learningk.blogspot.com"; -----> isikan dengan domain anda
option routers 192.168.1.1; -----> isikan dengan ip address router anda
option broadcast-address 192.168.1.255; -----> isikan dengan ip broadcast anda
default-lease-time 600;
max-lease-time 7200;
}
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";
# server-name "toccata.fugue.com";
#}
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}
#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}
|
- Setelah anda selesai melakukan konfigurasinya maka selanjutnya
kita akan melakukan penyimpanan. Untuk melakukan penyimpanan menggunakan
text editor nano silahkana anda menekan tombol "CTRL + X" kemudia " Y " dan tekan "enter"
maka konfigurasi anda akan tersimpan. Hal yang sama dapat anda lakukan
untuk text editor pico. Untuk yang menggunakan gedit anda tinggal
menekan tombol "save" saja.
- Setelah anda save maka kita akan tentukan default dari DHCP kita.
Maksutnya kita akan menggunakan eth? berapa yang akan kita gunakan
sebagai DHCP di sini saya menggunakan eth0 untuk melakukan DHCP server.
Untuk itu kita dapat menggunakan perintah
|
Perintah Untuk Mengkonfigurasi Default Pada DHCP Server
|
setelah anda mengetikkan perintah di atas dan anda menekan enter maka hasilnya akan menjadi seperti di bawah ini
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth?" ------> isikan dengan eth yang akan kita gunakan sebagai dhcp server
|
- Setelah anda melakukan konfigurasi terhadap seluruhnya maka kita
akan melakukan restart. Karena di dalam debian apabila kita melakukan
installasi dan kita melakukan konfigurasi maka langkah terakhir kita
akan melakukan restart agar sistem yang baru saja kita konfigurasi dapat
di load oleh sistem. Untuk melakukan restart kita bisa menggunakan
perintaj di bawah ini.
/etc/init.d/isc-dhcp-server restart
|
|
Hasil Restart
|
apabila sudah muncul seperti di atas maka konfigurasi yang kita berikan tadi sudah benar.
0 comments:
Post a Comment