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 netmask
# — default gateway
option routers;
option subnet-mask;
option nis-domain "";
option domain-name “”;
option domain-name-servers;
option time-offset -18000; # Eastern Standard Time
#option ntp-servers;
# option netbios-name-servers;>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;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns
hardware ethernet 11:3A:46:78:AB:CD;

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

No comments:

Post a Comment

Twitter Bird Gadget