Dynamic Host Configuration Protocol (DHCP)


How to configure the DHCP server in Linux ?


DHCP: The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on UDP/IP networks whereby a DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with other IP networks.



Configuration of DHCP (server)


Step 1:

install the dhcp pakage .


# yum -y install dhcpd

Step 2.

give one systems ip addr as 192.168.0.1

# vi /etc/dhcp/dhcpd.conf

                  default_lease-time 600;
  max_lease-time 7200;
                  subnet 192.168.0.0 netmask 255.255.255.0 {
                       range dynamic-bootp 192.168.0.25   192.168.0.30;
                       option broadcastaddress 192.168.0.255;
                       option routers 192.168.0.1;
}


Step 3:

# systemctl start dhcpd

# iptables -F

------------------------------------------------------------------------------------------------------------------------

client machine

# install yum -y install dhcpd

# systemctl start dhcpd

result : you will get dynamic access of ip from 192.168.1.25 to 192.168.1.30 





THANK YOU !!!

Comments