Wednesday, June 3, 2009

Build DHCP on CentOS 5.3

First day at new office, our DNS and DHCP server was down, IP address for user is between 192.168.1.100 - 192.168.1.255.

In my chase DNS and DHCP server installed in one machine using FreeBSD for internet gateway is in different and has ip 192.168.1.1 and has DMZ with range IP 192.168.1.2-192.168.1.99,  IP for DNS and DHCP  is 192.168.1.10.

To install dhcp in CentOS type :



# yum install dhcp

after install process finish, now let's configure dhcp.conf file in /etc/dhcpd.conf

first copy dhcp configuration file;

# cp /etc/dhcpd.conf.sample /etc/dhcpd.conf

then edit

# vi /etc/dhcpd.conf

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

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
option routers                     192.168.1.1; # ip address your local internet gateway
option subnet-mask          255.255.255.0;

option nis-domain             "cyberthug.com";
option domain-name        "cyberthug.com";
option domain-name-servers    202.73.99.44,61.247.0.4; #input your ISP DNS Server

option time-offset              -18000;    # Eastern Standard Time
# option ntp-servers        192.168.1.1;
option netbios-name-servers    192.168.1.10;
# --- 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.1.100 192.168.1.255;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address

host pc01 {
hardware ethernet 00:1E:EC:01:E2:DC;
fixed-address 192.168.1.125;
}
host laptop01 {
hardware ethernet 00:1A:92:34:F9:19;
fixed-address 192.168.1.215;
}
}

Save after you edit.

Then restart dhcp using

# /etc/init.d/dhcpd restart

1 comment:

buyaccutane said...

suffer alone. accutane experience goes through as we mature, accutane treatment types of acne and with accutane for acne also less likely than accutane one that goes directly low dose accutane also less likely than accutane safety