Wednesday, 20 April 2011

how to configuration DHCP Server


DHCP
Dhcp service profile
Type of service: Standalone service
Package: dhcp-**.rpm
Deamon: /usr/sbin/dhcpd
startup script: /etc/init.d/dhcpd
ports:67,68
conf file: /etc/dhcpd.conf, /var/lib/dhcpd/dhcpd.leases

Installation
Install dhcp package                            #yum install dhcp
copy sample configuration file from             #cat /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample > /etc/dhcpd.conf
/usr/share/doc                                  #cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
Edit the dhcpd.conf file according              #vim /etc/dhcpd.conf
to your requirement                                         subnet 192.168.9.0 netmask 255.255.255.0 {
                                                            option routers                  192.168.9.254;
                                                            option subnet-mask              255.255.255.0;
                                                      #     option nis-domain               "domain.org";
                                                            option domain-name              "example.com";
                                                            option domain-name-servers      192.168.9.254;
                                                      #     option time-offset              -18000; # Eastern Standard Time
                                                            range dynamic-bootp 192.168.9.101 192.168.9.120;

                                                      hangup the service at runlevel and start the service
                                                            #chkconfig dhcpd on
                                                            #service dhcpd start
Test dncpd.conf script before                   #service dhcpd configtest
starting service

Some Command line History of lecture class
                                          546  service dhcpd status
                                          547  service dhcpd restart
                                          548  vim /etc/dhcpd.conf
                                          549  service dhcpd restart
                                          550  init 6

No comments:

Post a Comment