DHCP Server configuration in Redhat Enterprise Linux. In this tutorial we will learn how to configure DHCP Server on Linux.Then we will see how dhcp client machine will receive ip address from DHCP server.
Subnet and netmask should be 192.168.0.0 255.255.255.0
Gateway Should be 192.168.0.254
DNS Sever Should be 192.168.0.254
Domain Name will be xyz.com
Range from 192.168.0.10- 192.168.0.100
So let’s assign IP Address, default Gateway IP and domain Name and range as we have decided above.
Step 1: Assign a Static IP Address on Linux DHCP Server using setup command.
Step 2: after We assigned IP Address and netmask on DHCP Machine we must restart the network service using below command :
Step 3: Install DHCP Server Package
#yum install dhcp* -y
Step 4: Create DHCP Configuration File.
We will create dhcp server configuration file with the help of bydefault file which is inside /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample and copy this file content to /etc/dhcpd.conf
Step 4: Configure DHCP Server with IP Address, Gateway IP,domain name as we have decided above:
Step 5: restart the dhcp service
#service dhcpd restart
#chkconfig dhcpd on
Step 6: Now Test DHCP
To test DHCP properly configured or not go to another machine which is in my case is a windowsXP machine and select DHCP option to get ip address from DHCP server.
As you can clearly see My WindowsXP Machine has get the IP Address and Gateway IP From Linux Machine which is my DHCP Server. You must know how to setup proper network setup in virtualbox.