DHCP Server Pada Fedora

A. Pengantar

DHCP Server adalah sebuah mesin yang melayani permintaan alamat IP maupun konfigurasi jaringan secara dinamis program ini dibuat oleh Ted Lemon yang bekerja untuk Vixie Labs, dengan DHCP Server ini anda tidak perlu lagi untuk mengkonfigurasikan jaringan pada sisi client, anda cukup mengkonfigurasikan DHCP Server anda maka konfigurasi alamat ip, gateway bahkan nameserver pada sisi client tidak perlu dilakukan lagi.

Layanan ini bisa juga diberikan kepada suatu komputer dengan kriteria tertentu, misalnya saja berdasarkan alamat MAC Address Network Card ataupunberdasarkan hostnamenya. Untuk dapat menggunakan DHCP Server maka anda harus mempunyai program yang dapat meminta layanan DHCP Server ini salah satunya adalah dhclient yang juga dibuat oleh Ted Lemon.

B. Instalasi

Karena sistem yang digunakan adalah Fedora, maka instalasinya sebagai berikut :

[root@NMS-Kuningan ~]#yum install dhcp

Pastikan semua file dibawah ini sudah di install :

[root@NMS-Kuningan ~]# rpm -qa | grep dhcp

libdhcp6client-1.0.14-1.fc9.i386
libdhcp-1.99.8-1.fc9.i386
dhcp-4.0.0-14.fc9.i386
dhcpv6-client-1.0.14-1.fc9.i386
libdhcp4client-4.0.0-14.fc9.i386

Untuk memeriksa apakah dhcp sudah jalan atau tidak maka gunakan perintah berikut :

[root@NMS-Kuningan ~]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]

C. Konfigurasi

Konfigurasi dilakukan di file dhcpd.conf , untuk melakukan konfigurasi lakukan perintah di bawah ini :

[root@NMS-Kuningan ~]# vim /etc/dhcpd.conf

Hasilnya adalah :

# DHCP Server Configuration file.

# see /usr/share/doc/dhcp*/dhcpd.conf.sample

# see ‘man 5 dhcpd.conf’

# VLAN 232 (Server_Farm)

#ini adalah segmen dari DHCP server, ini harus didaftarkan dulu biar jalan kalau tidak didaftarkan, service dhcpd akan failed.

subnet 10.200.16.0 netmask 255.255.255.128 {

range 10.200.16.70 10.200.16.75;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.16.1;

option broadcast-address 10.200.16.127;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 200 (Inet_Ultima1)

subnet 10.200.0.0 netmask 255.255.255.128 {

range 10.200.0.90 10.200.0.100;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.0.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 201 (Inet_Ultima2)

subnet 10.200.0.128 netmask 255.255.255.128 {

range 10.200.0.139 10.200.0.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.0.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 202 (Video_Ultima1)

subnet 10.200.1.0 netmask 255.255.255.128 {

range 10.200.1.11 10.200.1.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.1.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 203 (Video_Ultima2)

subnet 10.200.1.128 netmask 255.255.255.128 {

range 10.200.1.139 10.200.1.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.1.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 204 (Video_Ultima3)

subnet 10.200.2.0 netmask 255.255.255.128 {

range 10.200.2.11 10.200.2.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.2.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 205 (IpPhone_Ultima1)

subnet 10.200.2.128 netmask 255.255.255.128 {

range 10.200.2.139 10.200.2.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.2.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 206 (IpPhone_Ultima2)

subnet 10.200.3.0 netmask 255.255.255.128 {

range 10.200.3.11 10.200.3.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.3.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 207 (IpPhone_Ultima3)

subnet 10.200.3.128 netmask 255.255.255.128 {

range 10.200.3.139 10.200.3.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.3.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 208 (IpPhone_Ultima4)

subnet 10.200.4.0 netmask 255.255.255.128 {

range 10.200.4.11 10.200.4.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.4.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 209 (IpPhone_Ultima5)

subnet 10.200.4.128 netmask 255.255.255.128 {

range 10.200.4.139 10.200.4.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.4.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 210 (Wireless_Ultima1)

subnet 10.200.5.0 netmask 255.255.255.128 {

range 10.200.5.11 10.200.5.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.5.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 211 (Inet_Infina1)

subnet 10.200.5.128 netmask 255.255.255.128 {

range 10.200.5.139 10.200.5.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.5.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 212 (Inet_Infina2)

subnet 10.200.6.0 netmask 255.255.255.128 {

range 10.200.6.11 10.200.6.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.6.11;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 213 (Video_Infina1)

subnet 10.200.6.128 netmask 255.255.255.128 {

range 10.200.6.139 10.200.6.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.6.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 214 (Video_Infina2)

subnet 10.200.7.0 netmask 255.255.255.128 {

range 10.200.7.11 10.200.7.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.7.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 215 (Video_Infina3)

subnet 10.200.7.128 netmask 255.255.255.128 {

range 10.200.7.139 10.200.7.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.7.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 216 (Video_Infina4)

subnet 10.200.8.0 netmask 255.255.255.128 {

range 10.200.8.11 10.200.8.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.8.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 217 (IpPhone_Infina1)

subnet 10.200.8.128 netmask 255.255.255.128 {

range 10.200.8.139 10.200.8.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.8.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 218 (IpPhone_Infina2)

subnet 10.200.9.0 netmask 255.255.255.128 {

range 10.200.9.11 10.200.9.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.9.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 219 (IpPhone_Infina3)

subnet 10.200.9.128 netmask 255.255.255.128 {

range 10.200.9.139 10.200.9.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.9.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 220 (IpPhone_Infina4)

subnet 10.200.10.0 netmask 255.255.255.128 {

range 10.200.10.11 10.200.10.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.10.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 221 (IpPhone_Infina5)

subnet 10.200.10.128 netmask 255.255.255.128 {

range 10.200.10.139 10.200.10.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.10.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 222 (Wireless_Infina1)

subnet 10.200.11.0 netmask 255.255.255.128 {

range 10.200.11.11 10.200.11.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.11.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 223 (Inet_Lumina1)

subnet 10.200.11.128 netmask 255.255.255.128 {

range 10.200.11.139 10.200.11.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.11.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 224 (Video_Lumina1)

subnet 10.200.12.0 netmask 255.255.255.128 {

range 10.200.12.11 10.200.12.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.12.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 225 (Ipphone_Lumina1)

subnet 10.200.12.128 netmask 255.255.255.128 {

range 10.200.12.139 10.200.12.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.12.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 226 (Wireless_Lumina1)

subnet 10.200.13.0 netmask 255.255.255.128 {

range 10.200.13.11 10.200.13.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.13.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 227 (Inet_Rukan1)

subnet 10.200.13.128 netmask 255.255.255.128 {

range 10.200.13.139 10.200.13.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.13.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 228 (Video_Rukan1)

subnet 10.200.14.0 netmask 255.255.255.128 {

range 10.200.14.11 10.200.14.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.14.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 229 (IpPhone_Rukan1)

subnet 10.200.14.128 netmask 255.255.255.128 {

range 10.200.14.139 10.200.14.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.14.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 230 (Wireless_Rukan1)

subnet 10.200.15.0 netmask 255.255.255.128 {

range 10.200.15.11 10.200.15.126;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.15.1;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

#VLAN 231 (NOC)

subnet 10.200.15.128 netmask 255.255.255.128 {

range 10.200.15.139 10.200.15.254;

option domain-name-servers 10.101.0.2;

option domain-name “triplayplus.com”;

option routers 10.200.15.129;

option subnet-mask 255.255.255.128;

default-lease-time 600;

max-lease-time 7200;

}

Untuk menjalankan dhcp secara otomatis apabila server di restart adalah dengan cara :

[root@NMS-Kuningan ~]# ntsysv

dhcpp

Beri tanda bintang pada dhcpd

Perlu diingat bahwa arti dari default-lease-time 600; adalah bahwa setiap 10 menit akan dilakukan konfirmasi dari server terhadap client.

D. Kesimpulan

Hal-hal yang perlu diingat adalah :

1. File konfigurasi disimpan di file dhcpd.conf

2. Setiap ada perubahan pada file dhcpd.conf maka lakukan restart pada dhcp dengan perintah :

[root@NMS-Kuningan ~]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *