Tuesday, March 31, 2015

dhcp server configuration in linux step by step.

Dynamic Host Configuration Protocol

DHCP dynamically assigns Network Information to client systems.

It maintains all Network Information centralized, like IP-address, Subnet mask, Router-IP, Domain Information etc.

Authorized DHCP Server:

Act as a Authorized DHCP Servers, so it can avoid illegal DHCP Servers on the same network.

DHCP Scope:

Pool of IP addresses for client systems.


DHCP- DORA Process: 

D=Discover: In a process the client machine sends broadcast message for discover the DHCP Server.

O=offer:  The DHCP server offers a pool of IP-address to clients.

R=Request: The client machine request for an IP-address to DHCP Server.

A=Acknowledgment: Finally DHCP accepts and gives acknowledgment to client with IP-address.

  
Packages :   dhcp

Script         : /etc/dhcpd.conf

Services and Demon : dhcpd

Port number : 68 

Configuration of DHCP SERVER 

Step 1 : CHECK & INSTALL THE PACKAGES 

[root@dhcpserver ~]# rpm -qa  dhcp-* 
or 
[root@dhcpserver ~]# yum list installed  dhcp-* 
[root@dhcpserver ~]# yum remove dhcp-* -y 

Step 2)Now Install the packages 
[root@dhcpserver ~]# yum  install dhcp-* -y 
Step 3) Edit Main Configuration File 
[root@dhcpserver ~]# vi /etc/squid/squid.conf 

4  subnet 192.168.0.0 netmask 255.255.255.0 { # Network ID
7  option routers 192.168.0.254; # GateWay orRouter IP
8  option subnet-mask 255.255.255.0;
10 option nis-domain "zoom.com"; # NIS DOMAIN
11 option domain-name "zoom.com"; # DNS DOMAIN
12 option domain-name-servers 192.168.0.1; # DNS IP
21 range dynamic-bootp 192.168.0.150 192.168.0.170; # Pool of IP
31 host nfs { # reservation ofIP
32 option host-name "nfs.zoom.com"; # OR
33 hardware ethernet aa:ab:56:78:AB:CD; # Mac binding
34 fixed-address 192.168.0.10;
35 }
36 host smb {
37 option host-name "smb.zoom.com";
38 hardware ethernet ad:ab:56:78:AB:CD;
39 fixed-address 192.168.0.15;
40 }
41 } 

:wq 
Step 4 ) START THE SERVICES 
[root@dhcpserver ~]# service dhcpd restart 

CLIENT SIDE CONFIGURATION

Step 1) Select the Dhcp in netconfig command
[root@client ~]# netconfig




































Step 2) START THE SERVICES
[root@client ~]# service network restart
Step 3 ) Now Check wheather all the Entries are comming
[root@client ~]# ifconfig 
[root@client ~]# route -nv
[root@client ~]# cat /etc/resolv.conf [root@client ~]# nisdomainname

# to now IP
# to check GateWay 
# to check DNS  entries 
# to check NisDomainName
[root@client ~]# hostname 

NOTE : Host name will not come the /etc/sysconfig/network file should have following entries ONLY 
[root@client ~]# vi /etc/sysconfig/network NETWORKING=yes 

:wq! 
Reboot the machine and check the entries 




No comments:

Post a Comment