LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2010, 10:16 AM   #1
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Rep: Reputation: 15
dhcpd service keeps failing in CentOS 5.4


Hi guys,

I'm having some trouble with getting my DHCP service up and running on my server. Below is my /etc/dhcpd.conf file, which I believe is the right file necessary to get this service up and running correctly. Does anyone have idea what i can be doing wrong? When I do service dhcpd resstart it just show in red letter [FAILED] next to it.

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

subnet 10.2.3.1 netmask 255.0.0.0 {

# --- default gateway
	#option routers			         10.2.1.1;
	#option subnet-mask		255.0.0.0;

	#option nis-domain		"domain.org";
	#option domain-name		"domain.org";
	#option domain-name-servers	10.7.8.1;

	option time-offset		-18000;	# Eastern Standard Time
#	option ntp-servers		192.168.1.1;
#	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.2.3.2 10.2.3.254;
	default-lease-time 21600;
	max-lease-time 43200;

	# we want the nameserver to appear at a fixed address
#	host ns {
#		next-server marvin.redhat.com;
#		hardware ethernet 12:34:56:78:AB:CD;
#		fixed-address 207.175.42.254;
	}
}
 
Old 01-21-2010, 10:40 AM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
I believe your line:

subnet 10.2.3.1 netmask 255.0.0.0 {

should be:

subnet 10.2.3.0 netmask 255.0.0.0 {


Assuming your netmask is correct for your network


And I believe you need to uncomment this line:

#option routers 10.2.1.1;

Making sure 10.2.1.1 is your router... Which should be something like 10.2.3.1 maybe.

And you probably need to uncomment this line:

#option subnet-mask 255.0.0.0;


Also you need to check out /var/log/messages. But since you didn't provide anything about your network its going to be hard to help you.
 
Old 01-21-2010, 10:52 AM   #3
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ncsuapex View Post
I believe your line:

subnet 10.2.3.1 netmask 255.0.0.0 {

should be:

subnet 10.2.3.0 netmask 255.0.0.0 {


Assuming your netmask is correct for your network


And I believe you need to uncomment this line:

#option routers 10.2.1.1;

Making sure 10.2.1.1 is your router... Which should be something like 10.2.3.1 maybe.

And you probably need to uncomment this line:

#option subnet-mask 255.0.0.0;


Also you need to check out /var/log/messages. But since you didn't provide anything about your network its going to be hard to help you.
Thank you so much for your quick response. I commented that line with the option router out because I do not have a router. I only have a dummy switch. Will that make any type of difference? I tried the recommended changes and my dhcpd service still fails.

A copy of my /var/log/messages
[code]
Jan 21 06:59:34 CenOServer dhcpd: /etc/dhcpd.conf line 4: subnet 10.7.8.0 netmask 255.0.0.0: bad subnet number/mask combination.
Jan 21 06:59:34 CenOServer dhcpd: subnet 10.2.1.0 netmask 255.0.0.0
Jan 21 06:59:34 CenOServer dhcpd: ^
Jan 21 06:59:34 CenOServer dhcpd: /etc/dhcpd.conf line 30: expecting a declaration
Jan 21 06:59:34 CenOServer dhcpd: }
Jan 21 06:59:34 CenOServer dhcpd: ^
Jan 21 06:59:34 CenOServer dhcpd: Configuration file errors encountered -- exiting
Jan 21 06:59:34 CenOServer dhcpd:
Jan 21 06:59:34 CenOServer dhcpd: If you did not get this software from ftp.isc.org, please
Jan 21 06:59:34 CenOServer dhcpd: get the latest from ftp.isc.org and install that before
Jan 21 06:59:34 CenOServer dhcpd: requesting help.
[code]

Last edited by linux_newb; 01-21-2010 at 11:22 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set dhcpd to start as service Allie Linux - Newbie 5 08-14-2009 02:12 AM
dhcpd service problem divyashree Linux - Newbie 6 03-26-2009 12:18 PM
DHCPD failing to serve correct lease expiration TheGorf Linux - Server 1 02-18-2009 11:16 AM
failing to run svnserve as a service wslyhbb Linux - Server 6 06-16-2007 08:14 PM
How to make TCP server a daemon / service much like a dhcpd service? rajat Linux - Networking 1 05-22-2007 01:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration