Thursday 20 May 2010

CentOS 5.4 dhcp setting

1. root#yum -y install dhcp
2. root#cat /usr/share/doc/dhcp3.0.5/dhcpd.conf.sample > /etc/dhcpd.conf
3. vi dhcpd.conf

# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#

ddns-update-style interim;
ignore client-updates;

subnet 10.1.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.1.1.1;
option subnet-mask 255.255.255.0;

option nis-domain "dsal.local";
option domain-name "dsal.local";
option domain-name-servers 10.1.1.1;

option time-offset -18000; # Eastern Standard Time
option ntp-servers time.smg.gov.mo;
# 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 10.1.1.128 10.1.1.200;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host ws-student.dsal.local {
next-server marvin.redhat.com;
hardware ethernet 00:0C:29:1F:F2:53;
fixed-address 10.1.1.100;
}
}
:wq!

root#/etc/init.d/dhcpd start

4. type "man dhcp-options" for more details.

No comments:

Post a Comment