Sunteți pe pagina 1din 5

Install and configure DHCP server on centos 6

http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/

Ubuntu

Install and configure DHCP server on


centos 6

Linuxmint

Jquery

Fedora

Centos

Sign up for our newsletter for updates

Your email address

Subscribe

Setup DHCP server on Centos 6 :


Dynamic Host Configuration Protocol

Follow @kriznadotcom

(DHCP) is used to assign IP addresses and


other stuff like gateway and DNS details
automatically to the clients. we need a
DHCP server configured for offering
ipaddress to the clients when it is required

Recent Posts

Setup File server on ubuntu


14.04 ( Samba )

Installing DHCP server on Centos 6:


After installing Centos 6 (Centos 6 installation step by step screenshots ) and
configuring network (How to setup network in centos 6)
Update yum repositories and packages by typing the below command
[root@localhost ~]# yum update

Step 1 Install dhcp server and client using the below command

Setup DHCP server on ubuntu


14.04
How to install VNC server on
ubuntu 14.04
How to install phpmyadmin on
centos 7
How to install LAMP server on
centos 7

[root@localhost ~]# yum install dhcp

Step 2 After installing dhcp server packages along with dependencies .Assign a
static ip (eg: 192.168.1.11) in the same DHCP range for the listening interface ( eg
: eth0 ). Open /etc/sysconfig/network-scripts/ifcfg-eth0 file and make the
changes as per your requirement .

DEVICE="eth0"
HWADDR="00:0C:29:F1:01:4B"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="none"
IPADDR=192.168.1.11
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
Step 3 Now open /etc/sysconfig/dhcpd file and add the preferred interface name
to DHCPDARGS variable as below

1 of 5You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

12/3/2014 9:19 AM

Install and configure DHCP server on centos 6

http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/

Ubuntu

Linuxmint

Jquery

Fedora

Centos

DHCPDARGS=eth0
Step 4 open /etc/dhcp/dhcpd.conf file and paste the below lines and save it.

#specify domain name


option domain-name "krizna.com";
#specify DNS server ip and additional DNS server ip
option domain-name-servers 192.168.1.10, 208.67.222.222;
#specify default lease time
default-lease-time 600;
#specify Max lease time
max-lease-time 7200;
#specify log method
log-facility local7;
#Configuring subnet and iprange
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.254;
option broadcast-address 192.168.1.255;
#Default gateway ip
option routers 192.168.1.1;
}
#Fixed ip address based on MAC id
host Printer01 {
hardware ethernet 02:34:37:24:c0:a5;
fixed-address 192.168.1.55;

Latest On Ubuntu

Setup File server on ubuntu


14.04 ( Samba )

}
Step 5 Now start the service
[root@localhost ~]# service dhcpd start

Setup DHCP server on ubuntu


14.04
How to install VNC server on
ubuntu 14.04

and type this below command to start dhcp service automatically while booting.
[root@localhost ~]# chkconfig --levels 235 dhcpd on

Thats it .Clients can get IP from DHCP server and Please ensure you dont have any
other dhcp servers in the same network ( Routers might have DHCP enabled ).

How to setup SVN server on


ubuntu 14.04
How to configure DNS server
in ubuntu 14.04

Latest On Centos
Tweet

How to install phpmyadmin on


centos 7
Tags: Basic guide, Centos, dhcp, download, how to, installation, step by step, Windows 7, Windows xp

How to install LAMP server on


centos 7
How to install VNC server on
Centos 7

2 of 5You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

12/3/2014 9:19 AM

Install and configure DHCP server on centos 6

http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/

Ubuntu

Linuxmint

Jquery

Fedora

Centos

centos 7
How to install webmin on
centos 6

Related Posts
How to install phpmyadmin on centos 7
How to install LAMP server on centos 7
How to install VNC server on Centos 7
How to Setup network on centos 7
How to install webmin on centos 6
How to install phpmyadmin on nginx on centos 6
How to install LEMP on centos 6 ( Nginx, PHP, Mysql )
Installing node.js on centos 6 with sample app
How to setup nfs server on centos 6
How to install vnc on centos 6

3 of 5You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

12/3/2014 9:19 AM

Install and configure DHCP server on centos 6

http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/

Ubuntu

Kamendra Chauhan

Linuxmint

Jquery

Fedora

Centos

I have installed and configured dhcp,exactly as told in this post but when I am starting
dhcpd service it's getting failed .....can u please help me ...and I also have disabled the
selinux....but problem is still persisting......

chris

thanks for this article, it works, now i know where to start as i go deeper studies on
dhcp server.

shell

I have a problem in configuring my dhcp server...when i tried to service dhcpd restart it


will always failed.

shell

thank you very much for the information here..it really helps a lot..

Daniel Raiche

I'm having an odd problem, it keeps telling me semicolon expected when I start the
dhcpd service, but I'm sitting here looking at the semicolon in the config file. I've
re-created a few times and the same thing happens, won't allow me to start the service.

rosesa

+1 for selinux troubleshooting comment

Jose luis

este error
setgroups: Operation not permitted

krizna

Hi luis,
It just because of selinux . please disable selinux and reboot your machine and
try again.
#vim /etc/selinux/config

find this line


SELINUX=enforcing

and replace with


SELINUX=disabled

and reboot your machine .

How to install adobe reader in ubuntu


14.04

Avatar

How to install audacious in ubuntu


12.04

it works perfectly, thanks!

Avatar
After 2 days of trying and
frustration I finally got it to work without
downloading anything. I upgraded my

4 of 5You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

12/3/2014 9:19 AM

Install and configure DHCP server on centos 6

http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/

Ubuntu

Linuxmint

RECENT POSTS

SOCIAL

HOT TOPICS

Setup File server on ubuntu 14.04 (

Follow on Delicious

How to install squid proxy on centos 6

Samba )

Follow on Diigo

74 comments received

Setup DHCP server on ubuntu 14.04

Follow on Pinterest

How to install VNC server on ubuntu

Follow on Scoop

Login with facebook using PHP ( Demo

14.04

Follow on Stumbleupon

and Download )

How to install phpmyadmin on centos 7

48 comments received

How to install LAMP server on centos 7

How to install phpmyadmin on centos 6

How to install VNC server on Centos 7

34 comments received

Jquery

Fedora

Centos

How to Setup network on centos 7


How to install webmin on centos 6

How to install dns server in centos 6

How to setup SVN server on ubuntu

32 comments received

14.04

Setup mail server on ubuntu 14.04 (

How to configure DNS server in ubuntu

Postfix - dovecot )

14.04

27 comments received

Privacy Terms and Conditions

Copyright 2014. All Rights Reserved.

5 of 5You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

12/3/2014 9:19 AM

S-ar putea să vă placă și