DHCP Server Configuration

 Administrasi Sistem Jaringan ❘ Configure the DHCP Server

A. Learning Objective

  • Know how to dhcp configuration 
  • Know how the local repository work
  • Learn how the client's Mac address is registered in order to get a static ip address.

B. Learning Material

   DHCP also known as Dynamic Host Configuration Protocol is a network protocol that has the function of automatically providing network configuration to devices that are newly connected to a network. 

   A DHCP server is a device that provides DHCP services. Upon establishing a connection to the network, a device will initiate a DHCP request to the server. In response, the DHCP server will provide the necessary network configuration for the device in question.

C. Learning Preparation

   It would be beneficial to have some preparation before learning about DHCP server configuration. Some tools and materials could be useful for that, such as:

1. PC/LAPTOP


2. Internet

3. Iso file Linux Debian 11


4. Iso file Windows 7

5. PuTTY

6. VMware (for virtual machine)

wwwwwwww@


D. Topology 


E. Configuration

1. First is a virtual machine should be created with Linux Debian 11 (server) as the operating system. Two network adapters should then be used, with the first adapter configured in bridged mode and the second adapter in host-only mode. 

2. In order to gain access to the virtual machine, it is necessary to power it on and enter CLI mode. This may be achieved by utilising the username and password that were created either during the installation process of Debian 11 or within the BIOS settings. 

3. Use command ip a to see our IP address on the first interface, which is 192.168.10.10. Use this IP address to remote via PuTTY.

4. Please enter the IP address that we will be connecting to via PuTTY (SSH). Click Open to begin the remote session. To access PuTTY, ensure that you have completed the 'apt update' and 'apt install ssh' commands in the CLI on the VMware virtual machine.

5. If there is information appear like this just go ahead and accept it. 

6. In order to gain access to the server, it is necessary to enter the username and password corresponding to the IP address. Once this has been done, the su command should be entered in order to enter root mode or super user. The network configuration can then be opened and edited by typing the command 'nano /etc/network/interfaces'.

7. The second interface, ens36, should then be added and the IP address entered. It should be noted that there are rules pertaining to the use of the attendance number; for example, 10.15.26.1 is used with the /24 prefix. Once this has been done, the changes should be saved by using the CTRL X> Y> enter.

8. To restart the system, enter the 'systemctl reboot' command. This will send a signal to all components of the system, instructing them to stop and restart. 

9. Please access PuTTY once more by entering the IP address on the ens33 interface. Then, enter the 'ip a' command in root mode to ascertain whether the IP address that was added earlier has been added successfully. 

10. Use the 'cd /etc/apt' command to access and edit the apt configuration files. CD stands for 'change directory'. The command here /etc/apt usually stores the configuration of the APT package manager in the Debian operating system. then 'ls' is to display the table of contents of the current directory. Type 'cp sources.list sources.list.backup' this is important for keeping Debian-based operating system running smoothly.

11. Search for local Indonesian repositories on the web: 👉 the link 👈
Then copy the local repository kebo vlsm 
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

12. Type 'rm sources.list' to remove the sources.list file or directory, then command ‘nano sources.list’ to add the local repository that we have searched for earlier on the website.

13. Paste the local repository kebo vlsm into the sources.list by right-clicking once this has been done, the changes should be saved by using the CTRL X> Y > enter.

14. Use 'cat sources.list' to display the list of repositories in the sources.list file, we will see whether the local repository has been successfully added or not.

15. Update the system by typing 'apt update'. This will ensure that the information is recognised and updated, including the repositories that have been added.  

16. The 'apt install isc-dhcp-server-ldap' command installs a DHCP server integrated with LDAP (Lightweight Directory Access Protocol) directory services. This protocol is used to access and update information in directories, enabling the DHCP server to retrieve client configuration information from the LDAP directory, such as the IP address to be assigned, hostname, and other configuration options. Type 'y' to proceed.

17. To change the working directory, please enter the command 'cd /etc/dhcp/' in order to configure and manage the DHCP server. 

18. 'nano dhcpd.conf' is used to open the main configuration file of the DHCP (Dynamic Host Configuration Protocol) server using the nano text editor. 

19. Search down until you find the line ‘a slightly’ 

20. Then edit from subnet to domain name like this example. To save the change using the CTRL X > Y > enter.

21. To edit the settings of the dhcp server main configuration file use the nano /etc/default/isc-dhcp-server command. 

22. Enter the interface that will act as dhcp server for example ens36, then click CTRL X Y > enter to save the changes.

23. Restart the DHCP service using the /etc/init.d/isc-dhcp-server restart command. This is necessary because we have made changes to the configuration file.  


24. Set up virtual windows 7 as a dhcp client, use the host only adapter. If it is set up, activate the virtual machine by clicking power on the virtual machine.


25. Enter the control panel on Windows, then change the internet protocol version 4 (ipv4). then select the obtain so that the ip is obtained dynamically.


☆ Result of DHCP

  • Network Details


  • Leases of DHCP


  • Ipconfig on Windows CMD


Posting Komentar

0 Komentar