I) Need to check in Linux DHCP installed or not first ?
2) In teminal type : "rpm -q dhcp" like below[root@iccserver ~]# rpm -q dhcp
package dhcp is not installed
3) if not install software -
please get rpm file from http://rpmfind.net search 'dhcp' and get this
file "dhcp-3-0.EL.i386.rpm" for Redhat ES4 & save to /opt then cd /opt
4) then install "rpm -ivh dhcp-3-0.EL.i386.rpm" enter like below
[root@iccserver opt]# rpm -ivh 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
Preparing... ########################################### [100%]
1:dhcp ########################################### [100%]
[root@iccserver opt]#
5) After install success need to edit dhcpd.conf like below:
Vi /etc/dhcpd.conf
=============================================================
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
authoritative;
deny unknown-clients;
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name "www.nsharif.com,";
option domain-name-servers 66.178.2.25, 66.178.2.16;
option time-offset -18000;
range dynamic-bootp 192.168.0.5 192.168.0.253;
default-lease-time 51600;
max-lease-time 93200;
#}
# through mac address assigned ip address without aquiring like below
host sharif {
ddns-updates on;
hardware ethernet 00:00:E2:47:12:75;
fixed-address 192.168.0.150;
}
host xxx {
ddns-updates on;
hardware ethernet 00:00:E2:47:12:75;
fixed-address 192.168.0.131;
}
}
=================================================================
save command : Esc, shift+: wq (will save and quit from dhcpd.conf)
6) Assign which interface want to get dhcp range and edit below file:
Vi /etc/sysconfig/dhcpd
=============================
DHCPDARGS=eth0 or eth1
=============================
save command : Esc, shift+: wq (will save and quit from dhcpd.conf)
7) service dhcpd start - ( it will show success [ok] if not check file any mistakes in dhcpd.conf)
8) service network restart
9) If need start by auto during boot : go to "ntsysv" check the option "dhcpd" then clik save.
10) For checking dhcp lease :
touch /var/lib/dhcp/dhcpd.leases ( it will result dhcp client list).............
Comments (0)
Post a Comment