X

Rate Us :



Share with Friends :

Menu

Dynamic Host Configuration Protocol(DHCP) :

It assign IP addresses automatically to the clients.

It provides centralized IP address management.

It prevents IP address conflicts.

DHCP reduces the complexity and amount of administrative work by assigning other TCP/IP configurations along with IP address.


Requirements :


Installation package : dhcp*.rpm Port numbers : 67 (Bootp/DHCP server) , 68 (Bootp/DHCP client) Configuration file : /etc/dhcp/dhcp.conf Service/Daemon : dhcpd


Configure DHCP setup :


Check the system IP address - [root@localhost~]#ifconfig [Let say, IP address - 192.168.0.180] Install the packages for DHCP server - [root@localhost~]#yum install dhcp* -y Enter into dhcp database location - [root@localhost~]#cd /usr/share/doc/dhcp-4.2.5 [root@localhost~/usr/share/doc/dhcp-4.2.5]#cp dhcpd.conf.example /etc/dhcp/dhcpd.conf Edit the configuration file - [root@localhost~]#vi /etc/dhcp/dhcpd.conf Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 47 to 52 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 47 subnet 192.168.0.0 netmask 255.255.255.0{ 48 range 192.168.0.172 192.168.0.180; 49 option domain-name-servers 192.168.0.260; 50 option domain-name "algovalley.com"; 51 option routers 192.168.0.175; 52 option broadcast-address 255.255.255.255; Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Update the service - [root@localhost~]#service dhcpd restart Go to client system - [root@localhost~]#dhclient -v To check default gateway IP Address - [root@localhost~]#route -n To check the DNS IP Address - [root@localhost~]#cat /etc/resolv.conf