About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Wednesday, October 19, 2011

Configure DHCP On REDHAT LINUX-5



DYNAMIC HOST CONTROL PROTOCOL (DHCP)

Setup:
Server: sandeeplinux-server (192.168.4.1 Local Network IP)
Client: Linux & Windows XP/2003 etc...

Requirement: This DHCPD package available on RHEL5 DVD only
dhcp-3.0.5-3.el5.i386.rpm

Installation Of Required Packages:

[root@sandeeplinux-server ~]# rpm -qa |grep dhcp
dhcpv6_client-0.10-33.el5
[root@sandeeplinux-server ~]#

[root@sandeeplinux-server RHEL5_Total_Pack]# rpm -i dhcp-3.0.5-3.el5.i386.rpm
warning: dhcp-3.0.5-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
[root@sandeeplinux-server RHEL5_Total_Pack]#

Configure DHCP config file:

NOTE: Modify dhcpd.conf file (Before Modifying any Files take one backup copy)

In this file you will get information to modify dhcpd.conf.sample file which located in “/usr/share/doc/dhcp-3.0.5”

[root@sandeeplinux-server ~]# cd /etc/
[root@sandeeplinux-server etc]# cat dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#[root@sandeeplinux-server etc]#

GO TO --> /usr/share/doc/dhcp-3.0.5/

[root@sandeeplinux-server etc]# cd /usr/share/doc/dhcp-3.0.5/
[root@sandeeplinux-server dhcp-3.0.5]#

[root@sandeeplinux-server dhcp-3.0.5]# vi dhcpd.conf.sample
ddns-update-style interim;
ignore client-updates;

subnet 192.168.4.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.4.1;
option subnet-mask 255.255.255.0;

option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.4.1;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.4.1;
# option netbios-name-servers 192.168.4.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.4.128 192.168.4.254;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 192.168.4.100;
}
}
[root@sandeeplinux-server dhcp-3.0.5]#

Now Try To Start DHCPD Service:

[root@sandeeplinux-server RHEL5_Total_Pack]# service dhcpd status
dhcpd is stopped
[root@sandeeplinux-server RHEL5_Total_Pack]# service dhcpd start
Starting dhcpd: [FAILED]
[root@sandeeplinux-server RHEL5_Total_Pack]# chkconfig dhcpd on
[root@sandeeplinux-server RHEL5_Total_Pack]#


IF ITS GETTING FAIL TO START MEANS copy dhcpd.conf.sample file to dhcpd.conf file

[root@sandeeplinux-server dhcp-3.0.5]# cp dhcpd.conf.sample /etc/dhcpd.conf

It will ask for over write dhcpd.conf file give YES

[root@sandeeplinux-server dhcp-3.0.5]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
[root@sandeeplinux-server dhcp-3.0.5]#

Now Check DHCP with Windows Client:



Go To My Network Places --> Properties --> Local Area Connection --> Properties --> General Tab --> Internet Protocol (TCP/IP) --> Properties --> Obtain an IP Address Automatically --> OK

No comments:

Post a Comment