linux dhcp
DHCP : DHCP stands for Dynamic Host Configuration Protocol and is an Internet protocol for automating the configuration of computer’s IP that use TCP/IP protocol. DHCP can be used to automatically assign IP addresses, to deliver TCP/IP stack configuration parameters such as the subnet mask and default router, and to provide other configuration information such as the addresses for printer, time and news servers.
Setting up DHCP server
Step 1) Editing the /etc/dhcp.conf File
Explanation: When DHCP service/protocol starts it firstly reads the file /etc/dhcp.conf. Normally you can find a sample copy of dhcpd.conf in the following directory which you can always use as a guide and configuration base.
/usr/share/doc/dhcp-/dhcpd.conf.sample
Here is a quick explanation of the dhcp.conf file: Most importantly, there must be a “subnet” section for each interface on your Linux box.
{
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 “sharetab.com“;
option domain-name “sharetab.com“;
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.128 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;
“/etc/dhcpd.conf.backup” 31L, 852C
}
Note:- Changing Values are indicated in Red
Step2) Starting the dhcp service manually with commands
# chkconfig dhcpd on
# service dhcpd restart
Comment on this entry if you face any problem in DHCP configuration




