Chitika

Saturday, October 10, 2015

Install and Configure DHCP Server On RedHat Enterprise Linux With Multiple NIC's

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway. 

In some cases a RedHat Machine may have 2 or more NIC's. To setup DHCP server to listen on specific interface we have to configure DHCP server.

In this How-To we have RedHat Enterprise Linux 64bit with 2 NIC's. One is connected to WAN and other is for internal Network.

WAN IP : 192.168.10.37/24
LAN IP: 11.0.0.3/24 

We want DHCP server to listen on LAN interface to assign IP addresses to clients.

First we have to Install DHCP server. Open Terminal and run following.



Type "Y" and Press Enter.


DHCP is installed. Now we have to configure it.
Run following commands to edit the dhcpd.conf file.


Copy following Code and paste it into the file and edit as per your configuration.


As we have mentioned Subnet for only LAN interface DHCP will only listen on LAN interface. IF you have multiple NIC's then You have to mention Subnets for Each interface in /etc/dhcp/dhcpd.conf.

To start DHCP Service Type following


You can also check the status of DHCPD service by running following command. You will see that DHCP is ignoring request on WAN interface i.e eno16777736 and assigned IP address 11.0.0.31 to a clients attached to LAN interface.


By Default DHCP will not start automatically at boot time. To start DHCPD service at boot time run the following comman. 



we have successfully installed and configure DHCP server on RedHat Enterprise Linux 64-bit on VMware workstation 11.

That's all :) 






No comments:

Post a Comment