DHCP Server Configuration with Debian 11 Server
System Administrasi | Installation DHCP Server in Debian Server
a. Learning Objectives
Knowing what DHCP Server
Learning how to do DHCP Server configuration with Debian 11 on VMware.
DHCP stands for Dynamic Host Configuration Protocol. DHCP is a protocol or rule used on a network that is useful for facilitating the distribution or allocation of network configurations in a network. The network configuration consists of IP Address, IP Gateway, IP DNS, NTP and so on. DHCP is divided into several stages, namely discovery (request to get an IP address), offer (offer of available IP addresses, along with other network configurations), request (confirmation of the use of the IP address offered by the server), and acknowledgement (confirmation that the IP address and other network configurations have been given to the client).
In MikroTik, DHCP has three features including DHCP Server, DHCP Client, and DHCP Relay. This practice will discuss DHCP Server which is a protocol that can dynamically assign IP Addresses to devices in a network.
c. Learning Preparation
1. First, open VMware Workstation Pro 17. Then, click on DHCP Server or Debian Server that you have in Library. Set up the Network of Debian Server into two interfaces of network, one Bridged Adapter and the other one is Host Only Adapter. After set up the Network, run the Debian Server by clicking Power on this virtual machine.
2. Configure the IP Address for the second interface or Host Only Adapter that will be used by the DHCP Server. The interface to be used is ens36, then enter the IP Address to be used. For example 28.28.3.1/24. This IP Address will be used as the IP Gateway by the client device later. Edit the file contained in the interface with the command : nano /etc/network/interfaces
3. After configuring the IP Address on the second interface or ens36, reboot so that the configuration can be saved. We can reboot the server by entering the command systemctl reboot.
4. After rebooting, login back into the server. Then check the IP Address that has been configured previously by entering the command : ip address. Interface ens33 is the interface that contain IP Host of the server, while interface ens36 is the interface that contain IP Address that will be used for DHCP Server.
5. Move the directory to /etc/apt by entering the command : cd /etc/apt . Then backup the sources.list file by entering the command : cp sources.list sources.list.backup. Command cd means change directory and command cp means copy.

6. Open local repository, for example Indonesia local reposiroty. Open the Indonesia local repository by opening this link Daftar-Repository-Lokal-Indonesia Then copy one of the local repository file, for example Kebo VLSM repository file:
deb http://kebo.vlsm.org/debian/ bullseye main contrib non-free
deb http://kebo.vlsm.org/debian/ bullseye-updates main contrib non-free
deb http://kebo.vlsm.org/debian-security/ bullseye/updates main contrib non-free
7. Delete the sources.list file first by entering the command : rm sources.list. After that, open the sources.list file by entering the command : nano sources.list.
8. Then paste the repository from Kebo.VLSM into the sources.list by right-clicking on PuTTY Dashboard.
9. Then save the file with the command ctrl + x then select yes and press enter.
10. Before update the director, we need to check the sources.list file that the local repository we enter is right. We can check it by entering the command : cat sources.list.
12. Install the DHCP Server application in our Debian Server by entering the command : apt install isc-dhcp-server-ldap. Click y -> Enter on keyboard to continue the installation process.
13. Move the directory to /etc/dhcp by entering the command : cd /etc/dhcp/ . Then backup the dhcpd.conf file by entering the command : cp dhcpd.conf dhcpd.conf.backup. Command cd means change directory and command cp means copy.
14. Edit the configuration file before editing with the command: nano dhcpd.conf
15. Configure the DHCP Server through the dhcpd.conf file. Search section that has sentence A slightly different configuration for an internal subnet. Remove the hastag according to the picture. Then Configure the Subnet, Netmask, range of IP Address, Routers (Route or IP Gateway) and Broadcast Address according to the IP Address that has been configured on the second interface or ens36. Subnet means IP Network of IP Address that has been configured. Netmask is the decimal or IP Address version of the prefix that we use for IP Address that has been configured, Netmask or prefix determines the number or range of IP Address that can be used for the client device, for example 28.28.3.1-28.28.3.100. Routers means an IP Gateway that will be used for the device client in order to connect with the network, the IP Gateway we will be used is the default gateway of IP Address that has been configured on interface ens36. Broadcast Address is a special IP Address used to send data to all devices within a specific network segment or subnet. We can change the domain name according to what we want. After the configuration is complete, save it by clicking ctrl + x -> y -> Enter on keyboard.
16. Open the default directory or folder of DHCP Server by entering the command : nano /etc/default/isc-dhcp-server.
17. Configure the interface that DHCP Server will use to serve DHCP request or provides the IP Address. The interfaces that we used is ens36 in INTERFACESv4 add the interface that serves as the dhcp server in this case ens36.. Save the configuration by clicking ctrl + x -> y ->Enter on keyboard.
18. Restart the DHCP Server by entering the command : /etc/init.d/isc-dhcp-server restart, so the configuration of DHCP Server will be save and run.
1. Change the Network Adapter into Host Only Adapter. Then, running it by clicking Power on the virutal machine.
2. Change the Internet Protocol Verison 4 (TCP?IPv4) Properties into dynamic or obtain. Select internet protocol version 4 to obtain:

























