Tuesday, April 10, 2012

Step by Step DHCP Server Configuration
===============================
Step 1. Check the Installation
    => dpkg --list | grep dhcp

Step 1.a. Check the status of dhcp3
=> lsof | grep dhcp3
=> pgrep dhcp3
=> service dhcp3 status
=> netstat -ntlp | grep dhcp3    
=> netstat -ntlp | grep 547 (for server)
=> netstat -ntlp | grep 546 (for client)

Step 2. Remove previous Installation (if needed)
    => apt-get --purge remove dhcp3
    => rm -rf /etc/dhcp3/

Step 3. Install dhcp3-server
    => apt-get install dhcp3-server

Step 4. Configure dhcpd.conf file
    =>gedit /etc/dhcp3/dhcpd.conf or
    => nano -w /etc/dhcp3/dhcpd.conf

# Replace the following according to your network

# option definitions common to all supported networks...
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
#option gateway 192.168.0.1;
option domain-name "modernherbal.com.local";
option domain-name-servers 192.168.0.1;
option netbios-name-servers 192.168.0.1;

########################################

subnet 192.168.0.0 netmask 255.255.255.0 {
 range dynamic-bootp 192.168.0.15 192.168.0.20;
 range 192.168.0.100 192.168.0.150;
}

Step 5. Restart dhcp
=> /etc/init.d/dhcp3-server restart

Step 6. Check syslog file  
    => tail -f /var/log/syslog


-------- arahman.iit@gmail.com --------



No comments:

Post a Comment