DHCP Server Client Configuration:

[root@masterdns ~]# yum -y install dhcp

[root@masterdns ~]# vi /etc/sysconfig/dhcpd

DHCPDARGS=eth1

[root@masterdns ~]# vi /etc/dhcp/dhcpd.conf

#Adding   entry

option domain-name “ostloal.com”;

option domain-name-servers node1.ostlocal.com, node2.ostlocal.com;

default-lease-time 3600;

max-lease-time 7200;

authoritative;

#IP Address Range

subnet 192.168.211.0 netmask 255.255.255.0 {

option routers                  192.168.211.2;

option subnet-mask              255.255.255.0;

option domain-search            “ostlocal.com”;

option domain-name-servers      192.168.211.134;

range   192.168.211.128   192.168.211.148;

}

#To provide Static IP using DHCP

host node1.ostlocal.com {

hardware  ethernet 00:0c:29:37:ec:53;

fixed-address 192.168.211.131;

}

host node2.ostlocal.com {

hardware  ethernet 00:4g:8h:13:8h:3a;

fixed-address 192.168.211.132;

}

[root@masterdns ~]# ifconfig | grep HWaddr

eth1      Link encap:Ethernet  HWaddr 00:0C:29:88:88:49

root@masterdns ~]# service dhcpd restart

Starting dhcpd:                                            [  OK  ]

[root@masterdns ~]#

[root@masterdns ~]# chkconfig dhcpd on

[root@masterdns ~]#

[root@masterdns ~]# iptables -A INPUT -p tcp -m state –state NEW –dport 67 -j ACCEPT

[root@masterdns ~]#

[root@masterdns ~]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

[root@masterdns ~]#

ON Ubuntu Client:

avk@node1:/etc$ sudo vi /etc/network/interfaces

avk@node1:/etc$ sudo ufw allow  67/udp