How to Install DHCP Server on Cent OS
In this tutorial, you will learn how to install DHCP service on your Cent OS server. DHCP is the Dynamic Host Configuration Protocol that is a service that can manage and deliver IP addresses for your network.
Installing DHCP Service
To install DHCP service, you need to type the following command:
# yum install dhcp
Configuring a Basic DHCP Configuration
Configuration Setting that will use through this document:
- IP Range: 172.16.1.100 – 172.16.1.200 /16
- DNS Server: 124.108.4.130, 124.108.4.131
- Default Gateway: 172.16.1.254
- Length of the lease:
- 600s => PCs > IPs
- 259200s (3 days) => IPs >PCs
- 43200s (12h) => Recommendation
- WINS Server: 172.16.1.253
- Domain Name: titdara.internal
To archive above configuration, you need to create or update text file /etc/dhcpd.conf as below:
# vi /etc/dhcpd.conf
ddns-update-style interim; Top of the file
ignore client-updates;
subnet 172.16.0.0 netmask 255.255.0.0 {
option routers 172.16.1.254; Default Gateway
option subnet-mask 255.255.0.0;
option domain-name “titdara.internal”;
option domain-name-servers 124.108.4.130, 124.108.4.131;
option time-offset -18000;
option netbios-name-servers 172.16.1.253; WINS Server
range dynamic-bootp 172.16.1.100 172.16.1.200; Range to be assign
default-lease-time 43200;
max-lease-time 86400;
}
If we have more than one network interface we need to specify which interface work DHCP server:
DHCPARGS=eth1
Checklists after everything done:
Network Interface must have IP Configuration (172.16.1.1/16)
Set DHCP as Startup service
# chkconfig –level 016 dhcpd off
Make sure it work:
dhcpd dhcpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Start dhcpd service
Related Articles
Comments ()
Popular Articles
- How to Install .XAP .APPXBUNDLE on Windows 10 Mobile Without Computer
- How to Root & Interop Unlock the Windows 10 Mobile devices
- How to Install Android Apps on Windows 10 Mobile
- Download Official Windows 10 Mobile Wallpapers From Here
- How to Create WiFi Hotspot on Windows 10 Without Softwares
- How to Install DHCP Server on Cent OS
- How to Use Windows Phone Recovery tool