Configure dhcpd (Configure DHCP Server)
Hi guys..
I'm new here and greeting to all of u here. I'm a newbie in linux and I hope to learn new things here and hopefully i can contribute to this great team as well and learn new stuffs together.. I hope this guide will help newbie get an idea on the quick start guide to configure DHCP server.. hope it helps.. If there's improvement on this guide, I'd love to hear from you guys too.. Thanks....
Logon as “root” and enter your password…
Download dhcpd from:
ftp.isc.org
Unpack it
tar -zxvf dhcp-3.0.1.tar.gz
cd dhcp-3.0.1
After you do cd into the unpacked directory “dhcp-3.0.1” and type:
./configure
It will take some time to configure the settings. After it is done type:
make
and
make install
Pre-installation and Kernel setup…
Before you do an install, or configuration for DHCP you need the following kernel options installed.
1. TCP/IP networking enabled
2. MULTICAST enabled - To check to see if MULTICAST is enabled, type "ifconfig -a". You should see "MULTICAST" listed in your outputs for your ethernet devices.
3. CONFIG_PACKET=y
4. CONFIG_FILTER=y
If you need to re-compile your kernel, follow the instructions on the section or the howto on the kernel. If you make the CONFIG_PACKET and CONFIG_FILTER options modular, you will need to add lines in your /etc/rc.d/rc.local file to load these two modules.
Edit /etc/rc.d/rc.local and add two line:
CONFIG_PACKET=y
CONFIG_FILTER=y
Create “dhcpd.conf” file…
Create and edit /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.123.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.123.254;
option subnet-mask 255.255.255.0;
option nis-domain "whitebox";
option domain-name "whitebox";
option domain-name-servers 165.21.83.88, 165.21.100.88;
# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:
option netbios-name-servers 192.168.123.104;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.123.104;
# --- 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.123.10 192.168.123.20;
default-lease-time 86400;
max-lease-time 86400;
# we want the nameserver to appear at a fixed address
host ns {
next-server whitebox;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 192.168.123.104;
}
}
Starting the server…
In most cases the DHCP installation doesn't create a "dhcpd.leases" file. Before you start the server, you must create an empty file:
touch /var/lib/dhcp/dhcpd.leases
Use the redhat-config-services tool or the service command with the start, restart, and stop options. The following example starts the DHCP server. Use the stop option to shut it down, and restart will restart it.
service dhcpd start
This will start dhcpd on eth0 device. If you need to start it on another device, simply supply it on the command line as shown below:
/usr/sbin/dhcpd eth1
If you wish to test the configuration for any oddities, you can start dhcpd with the debugging mode. Typing the command below will allow you to see exactly what is going on with the server.
/usr/sbin/dhcpd -d -f
u're all set for ur DHCP server....
|