Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Configure DHCP Server Step-by-Step config Guide Using Webmin

Rumi, April 30, 2017April 30, 2017

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.

In our previous article, you have setup your DNS Server using Webmin, refer below link for more information.

In this article We will seen how to configure DHCP Server Using Webmin(web-based interface). Webmin tool offer to new system administrators to perform all system management task from via a web browser, Instead of using the command line console or terminal. You can also manage a system from the console or remotely.

My Network Setup:

DHCP  server ip address and hostname(RHEL7): 192.168.1.1 (server1)
Network name: IntranetDHCP
Network address: 192.168.1.0
Netmask: 255.255.255.0
Address range: 192.168.1.210 – 192.168.1.230  (Range of DHCP server gives 20 IPs)
Default lease time: 86400sec (24 hr.)
Maximum lease time:172800sec (48 hr.)
server name: server1
Default routers: 192.168.1.1
Broadcast address: 192.168.1.255
DNS servers: 192.168.1.10  8.8.8.8
192.168.1.10 -> DNS Server Local (our own DNS Server, within our network)
8.8.8.8 -> Google Public DNS

Step by Step configuration of DHCP Server Using Webmin

1) Setting up Webmin

As previous, we have seen how to configure Webmin on Centos/RHEL7 systems, refer below link.

Setting up Webmin on Centos/RHEL7

2) Install the package for DHCP using Webmin

After Log into Webmin, First we need to search “DHCP Server” and install the DHCP Server Packages, refer below screen shots.

After search “DHCP Server”, Click on “Click here” option to downloaded the DHCP server Packages using YUM. If you are not configured the YUM server, refer the link.(Configure the Yum Server in Centos7/RHEL7/Fedora22)

On Below screenshot, The DHCP Packages can be automatically installed by Webmin.

Note: If you already installed the DHCP packages, then there is no need to perform above steps. Similarly you Go to Servers, and then click on “DHCP Server”.

3) Create a new subnet

Now Go to Servers, then click on “DHCP Server” and Click on “Add a new subnet”

Enter the subnet description (In our case we are using IntranetDHCP). For the subnet you can provide the Network address, Netmask and Address range of DHCP Server. You can change the Default and Maximum lease time(In our case we are using 24 hr. and 48 hr. respectively) and Click “save” button, refer below screenshot.

4) Edit DHCP Client options.

Click on “Edit client options”, It will apply to all subnets, shared networks, hosts and groups. refer below screen shot.

On the next Step, You will add the Default routers, broadcast address and DNS Server and select “interim” option from Dynamic DNS update style. It will apply to subnet(i.e IntranetDHCP) which we have created above, refer below screenshot.

Configuration of DHCP Server is over, now start the DHCP service.

5) Check the status of DHCP service and make the service enable even after reboot of the server.

#systemctl status <service name> This command used for check the status of DHCP service.
[root@server1 ~]# systemctl status dhcpd
dhcpd.service – DHCPv4 Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled)
   Active: active (running) since Fri 2016-12-30 04:49:34 EST; 10s ago
     Docs: man:dhcpd(8)
           man:dhcpd.conf(5)
 Main PID: 1270 (dhcpd)
   CGroup: /system.slice/dhcpd.service
           └─1270 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd –no-pid
Dec 30 04:49:34 server1 systemd[1]: Started DHCPv4 Server Daemon.
Dec 30 04:49:35 server1 dhcpd[1270]: Internet Systems Consortium DHCP Server 4.2.5
Dec 30 04:49:35 server1 dhcpd[1270]: Copyright 2004-2013 Internet Systems Consortium.
Dec 30 04:49:35 server1 dhcpd[1270]: All rights reserved.
Dec 30 04:49:35 server1 dhcpd[1270]: For info, please visit https://www.isc.org/software/dhcp/
Dec 30 04:49:35 server1 dhcpd[1270]: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified i…ig file
Dec 30 04:49:36 server1 dhcpd[1270]: Wrote 2 leases to leases file.
Dec 30 04:49:36 server1 dhcpd[1270]: Listening on LPF/enp0s3/08:00:27:35:17:7c/192.168.1.0/24
Dec 30 04:49:36 server1 dhcpd[1270]: Sending on   LPF/enp0s3/08:00:27:35:17:7c/192.168.1.0/24
Dec 30 04:49:36 server1 dhcpd[1270]: Sending on   Socket/fallback/fallback-net
Hint: Some lines were ellipsized, use -l to show in full.
[root@server1 ~]#

And # systemctl enable <service name> This command used for enable the service after reboot of the server

[root@server1 ~]# systemctl enable dhcpd

ln -s ‘/usr/lib/systemd/system/dhcpd.service’ ‘/etc/systemd/system/multi-user.target.wants/dhcpd.service’
[root@server1 ~]#

9) Allow DHCP service on firewall.

[root@server1 ]# firewall-cmd –permanent –add-service=dhcp
 success
[root@server1 ]# firewall-cmd –reload
 success
[root@server1 ]#

Hope this post will help Linux/Unix beginners. Please share you feedback and Comments.!!!

Src: http://ittroubleshooter.in/configure-dhcp-server-step-step-config-guide-using-webmin/

Administrations Configurations (Linux) Networking CentOSDHCPWebmin

Post navigation

Previous post
Next post

Comments (2)

  1. Pankaj Khurana says:
    October 9, 2019 at 2:56 pm

    This is great and I also have proceed similar process however it was done over ubuntu-18.04 (64-bit Desktop). I have been using the internet through a public IP (196.207.123.xx) configured on a desktop.

    I want to use Webmin likewise ClearOS ie I wish to configure router (with IP 192.168.1.1), for generating LAN IPs whose range has set up 192.168.1.2 to 162.168.1.254 and create subnet for DHCP Server through webmin. I am planning an architecture shown here: https://www.youtube.com/watch?v=22XLM5uO2XI and covered all steps shown in above video series. I connected a laptop to router it assign me local ip 192.168.1.2. When I ping to public 196.207.123.xx through my laptop it is showing data packets but when I ping to google.com or other outside network it does not work for me.

    I do have screenshots of configured webmin, router etc but I did not find option here to share with you. Please suggest if you may help me out, for connecting my router generated IP based laptop to outside world.

    Reply
    1. Rumi says:
      October 9, 2019 at 5:44 pm

      Since you are able to ping to IP, but unable to domain, it means, there is something wrong with the DNS configurations. Most probably your DNS is not properly configured in your DHCP settings.

      Reply

Leave a Reply Cancel reply

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

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes