Tuesday, February 2, 2010

DHCP Configuration

Dynamic Host Configuration Protocol, or DHCP is a client-server networking protocol. A DHCP server provides configuration parameters specific to the DHCP client host requesting, generally, information required by the client host to participate on an IP network. DHCP also provides a mechanism for allocation of IP addresses to client hosts.

            Copy the dhcpd configuration file “dhcpd.conf.sample” from the following directory to /etc/dhcpd.conf in linux host machine.

            #cp /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /etc/dhcpd.conf

            To configure the DHCP, edit /etc/dhcpd.conf file and ensure the file contains the following.

            #vi /etc/dhpcd.conf

            The file should contain the following.........

            ddns-update-style interim;
            ignore client-updates;
                                                                                               
            subnet 192.168.0.0 netmask 255.255.255.0 {
                                                                                                

            # --- default gateway
                    option routers                  192.168.0.1;
                    option subnet-mask              255.255.255.0;
                                                                  
                    option nis-domain               "domain.org";
                    option domain-name              "domain.org";
                    option domain-name-servers      192.168.1.1;
                    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.45 192.168.0.120;
                    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 00:0F:EA:92:78:59;
                            fixed-address 192.168.0.10;
                    }
            }

Important note:
            Type ifconfig in the linux host machine and note down the hardware ethernet(MAC) address of your linux host machine. The hardware ethernet address has to be mentioned in this file.
           
            The DHCP services can be controlled with the following set of commands.

            #service dhcpd stop
           
            #service dhcpd start

            #service dhcpd restart

            On executing dhcpd restart, it suppose to display the following.

            [root@omap root]# service dhcpd restart
            Shutting down dhcpd:                                 [  OK  ]
            Starting dhcpd:                                            [  OK  ]
            [root@omap root]#

            The above information ensures the proper working of DHCP server.

0 comments:

Post a Comment

Recent Comments

About This Blog

Blog Archive

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP