Pages

Friday, 6 July 2012

DHCP Server Configuration on Linux

DHCP Server Configuration on Linux 
The Dynamic Host Configuration Protocol (DHCP) is an auto configuration protocol used on IP networks. Computers that are connected to IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping track of computers that have been connected to the network. This prevents two computers from accidentally being configured with the same IP address.
Install dhcp server,
# yum install dhcp* -y

copy sample configuration file & make suitable changes for your network.
# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
# cat /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;
subnet 192.168.100.0 netmask 255.255.255.0
{
# — default gateway
option routers 192.168.100.1;
option subnet-mask 255.255.255.0;
option nis-domain "LinuxArticles.org";
option domain-name “LinuxArticles.org”;
option domain-name-servers 192.168.100.1;
option time-offset -18000; # Eastern Standard Time
#option ntp-servers 192.168.100.1;
# option netbios-name-servers 192.168.100.1;>br>
# — 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.100.10 192.168.100.254;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns
{
next-server server1.linuxarticles.org;
hardware ethernet 11:3A:46:78:AB:CD;
fixed-address 122.169.104.71;
}
}

Finally Save and exit the file and restart dhcp service.
# service dhcpd start

No comments:

Post a Comment

Twitter Bird Gadget