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 :) 






Friday, October 9, 2015

How to Create Local YUM repository on RHEL 7 using DVD

In Previous post we have installed RHEL7 64bit on WMware Workstation 11. To install, update and configure more packages we need YUM repository. YUM is a package management tool. In this How-To we are going to use RHEL7 DVD as local Repository. 

First we need to configure the source. 

Mount the CD-ROM to any directory you wish to use. Open Terminal and run following commands.


Now Create a new repo file cdrom.repo under /etc/yum.repos.d directory.


Add the Following lines in local.repo file


Save the file and exit.
Lets test it by installing DHCP


Type Y and Press Enter


All is well. We have successfully created Local Repository and installed a package from Local Repository using YUM.

Cheers :-)