Cara Konfigurasi DHCP Server di DEBIAN 9 VIRTUALBOX Mudah dan Jelas

3 min read 5 hours ago
Published on Sep 20, 2025 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial guides you through the process of configuring a DHCP server on Debian 9 using VirtualBox. It will cover the essential steps needed to set up the DHCP server, discuss its functions, and explain how to avoid common pitfalls. This setup is crucial for efficiently managing IP addresses in a local network, simplifying IP allocation for multiple devices.

Step 1: Install VirtualBox and Debian 9

  1. Download VirtualBox from the official website.
  2. Install VirtualBox on your host operating system following the installation instructions for your specific OS.
  3. Download Debian 9 ISO from the Debian website.
  4. Create a New Virtual Machine:
    • Open VirtualBox and click on "New".
    • Name your VM (e.g., "Debian 9") and select "Linux" and "Debian (64-bit)" as the type.
    • Allocate memory (at least 1GB recommended).
    • Create a virtual hard disk (at least 10GB).
  5. Load Debian 9 ISO:
    • Select the VM and go to "Settings".
    • Under "Storage", click on the empty disk icon and choose the Debian ISO.
  6. Start the Virtual Machine:
    • Click "Start" to boot from the ISO and follow the installation prompts to install Debian 9.

Step 2: Update Your System

  1. Open Terminal in Debian.
  2. Update Package List:
    sudo apt update
    
  3. Upgrade Installed Packages:
    sudo apt upgrade
    

Step 3: Install DHCP Server

  1. Install DHCP Server Package:
    sudo apt install isc-dhcp-server
    

Step 4: Configure the DHCP Server

  1. Open the DHCP Configuration File:
    sudo nano /etc/dhcp/dhcpd.conf
    
  2. Add Configuration Settings:
    • Define your network range and options. For example:
    subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.10 192.168.1.50;
        option routers 192.168.1.1;
        option domain-name-servers 8.8.8.8, 8.8.4.4;
    }
    
  3. Save and Exit the editor (Ctrl + O, Enter, Ctrl + X).

Step 5: Specify Network Interfaces

  1. Edit the DHCP Server Default File:
    sudo nano /etc/default/isc-dhcp-server
    
  2. Specify the Interface:
    • Find the line starting with INTERFACESv4 and add your network interface (e.g., eth0):
    INTERFACESv4="eth0"
    
  3. Save and Exit the editor.

Step 6: Start and Enable the DHCP Server

  1. Start the DHCP Service:
    sudo systemctl start isc-dhcp-server
    
  2. Enable the DHCP Service to Start on Boot:
    sudo systemctl enable isc-dhcp-server
    

Step 7: Verify DHCP Server Status

  1. Check the Status of the DHCP Server:

    sudo systemctl status isc-dhcp-server
    
    • Ensure it is active and running without errors.
  2. Test DHCP Server Functionality:

    • Connect a client device (another VM or a physical machine) to the same network and verify it receives an IP address from the DHCP server.

Conclusion

You've successfully configured a DHCP server in Debian 9 on VirtualBox. This setup automates IP address allocation, prevents conflicts, and simplifies network management. Explore additional configurations and settings in the DHCP configuration file to tailor the server to your specific needs. Consider setting up DHCP reservations for critical devices to ensure they always receive the same IP address.