Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday 28 August 2017

DHCP Configuration in Linux (Redhat or Centos 6)



                         DHCP(Dynamically Host Configuration Protocol)

  dhcp provide a method for hosts on a network to request and be granted,configuration information including the address of routers and nameservers
      Ipv4 addresses are either dynamically assigned from a range of address and netmask,its default gateway  .Domain name and dns server,timeserver,and location of kickstart conf.files

service profile:

type :SysteV-managed service
package:dhcp
Daemon: /usr/sbin/dhcpd
script : /etc/init.d/dhcpd
ports : 67(bootps), 68 (bootpc)
conf.file: /etc/dhcpd.conf,/var/lib/dhcpd/dhcpd.leases
related: dhclient,dhcpv6-client,dhcpv6


steps to configure dhcp server:

#yum install dhcpd-* -y
#service dhcpd start
#chkconfig dhcpd on
#cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
# vi /etc/dhcpd.conf
(change as follows)

ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.0.254; (server ip)
        option subnet-mask              255.255.255.0;  (subnetmask)

        option nis-domain               "domain.org";
        option domain-name              "redhat.com";   (domain name)
        option domain-name-servers      192.168.0.254;   (dns ip)

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.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.0.1 192.168.0.20; (ip range)
        default-lease-time 21600;
        max-lease-time 43200;

save & quit
#service dhcpd restart
if you want to give a specific ip for a system

at the end of the file specify as follows

host station1
            { hardware ethernet 00:a0:cc:3d:45:3e
 
              fixed address 192.168.0.10;
             }
}
         (here in this example we are providing 192.168.0.10 for a specific system we have to type mac address of that system at hardware ethernet)


No comments:

Post a Comment