Oleh : Imam A.W., S.Kom., M.Kom.

  1. Instalasi dhcpserver dengan perintah :

    root@ubuntu:/ # sudo apt-get install isc-dhcp-server –y

    Readingpackagelists…Done

    Buildingdependencytree








    Readingstateinformation…Done

    Suggestedpackages:

    

isc­dhcp­server­ldap

    ThefollowingNEWpackageswillbeinstalled:

    

isc­dhcp­server

    0upgraded,1newlyinstalled,0toremoveand0notupgraded

  2. Konfigurasi file dengan perintah :

    root@ubuntu:/ # Sudo pico /etc/default/isc-dhcp-server

    # 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=”eth0″

  3. Tambahkan TambahSubnetnetworkkita ke dalam file dhcpd.conf dengan perintah :

    root@ubuntu:/ # sudo pico /etc/dhcp/dhcpd.conf

    subnet 192.168.237.0 netmask 255.255.255.0 {

         range 192.168.237.10 192.168.237.20;

    option domain-name-servers 192.168.237.2;

    option domain-name “labmi.polinela.ac.id”;

        option routers 192.168.237.2;

        option broadcast-address 192.168.237.255;

        default-lease-time 600;

        max-lease-time 7200;

    }

  4. Restart service DHCP dengan perintah

    root@ubuntu:/ # /etc/init.d/isc­dhcp­serverrestart

    StoppingISCDHCPserver:dhcpdfailed!

    StartingISCDHCPserver:dhcpd

  5. Gunakan perintah netstat untuk memantau aktifitas di dalam jaringan.

    root@ubuntu:/ # netstat -uap

    Active Internet connections (servers and established)

    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

    udp 0 0 *:bootps *:* 1126/dhcpd

  6. Ujicobakan dengan merubah konfigurasi pada client menjadi Obtain.


  7. Lihat hasilnya (sesuaikan dengan computer masing-masing)


  8. Log dhcp server yang aktif dapat dilihat dengan perintah

    root@ubuntu:/ # tail -f /var/log/syslog

    Nov 6 22:18:02 ubuntu dhcpd: DHCPREQUEST for 192.168.237.10 from 08:00:27:00:68:3a (abunabiha) via eth1

    Nov 6 22:18:02 ubuntu dhcpd: DHCPACK on 192.168.237.10 to 08:00:27:00:68:3a (abunabiha) via eth1

    Nov 6 22:23:02 ubuntu dhcpd: DHCPREQUEST for 192.168.237.10 from 08:00:27:00:68:3a (abunabiha) via eth1

  9. Untuk menghentikan service dhcp gunakan perintah :

    root@ubuntu:/ #/etc/init.d/isc­dhcp­serverstop

    * Stopping ISC DHCP server dhcpd [ OK ]

  10. Untuk menghidupkan service dhcp gunakan perintah:

    root@ubuntu:/ # /etc/init.d/isc­dhcp­serverstart

    * Starting ISC DHCP server dhcpd          [ OK ]