DHCP means Dynamic Host Configuration Protocol. It is one of the most important server in networking. Even everywhere at every place when we are in network, we are using it. Configuration of it is very very simple.
option domain-name "hackers001.linux";
option domain-name-servers hackers001.linux.redhat;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.0.1 netmask 255.255.255.0 {
}[root@princy ~]#systemctl start dhcpd.service
[root@princy ~]#systemctl enable dhcpd.service
[root@princy ~]#yum -y install dhcp
[root@princy ~]#vi /etc/dhcp/dhcpd.conf
# create new
# specify domain name in file dhcpd.conf
option domain-name "hackers001.linux";
# pecify DNS's hostname or IP address
option domain-name-servers hackers001.linux.redhat;
# default lease time
default-lease-time 600;
# max lease time
max-lease-time 7200;
# this DHCP server to be declared valid
authoritative;
# specify network address and subnet mask
subnet 192.168.0.1 netmask 255.255.255.0 {
# specify the range of lease IP address
range dynamic-bootp 192.168.0.12 192.168.0.120;
# specify broadcast address
option broadcast-address 192.168.0.255;
# specify default gateway
option routers 192.168.0.1;
}
[root@princy ~]#systemctl enable dhcpd.service