LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-25-2012, 08:32 PM   #1
snoopcd
LQ Newbie
 
Registered: May 2012
Location: London
Distribution: Fedora 16
Posts: 4

Rep: Reputation: Disabled
issue in DHCP Server


Hi All,
i am trying to install DHCP Server
OS : Fedora 16
DHCP version : DHCP Server 4.2.3-P2

Code:
[root@ark ~]# ls -ltrh /etc/dhcp/dhcpd.conf 
-rw-r--r-- 1 root root 1.6K May 26 03:05 /etc/dhcp/dhcpd.conf
[root@ark ~]#
Network Interface Card Configuration:-
sure it is statis IP's
Code:
[root@ark ~]# ifconfig -a
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:114 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:11614 (11.3 KiB)  TX bytes:11614 (11.3 KiB)

p5p1      Link encap:Ethernet  HWaddr 00:24:81:56:14:E3  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:81ff:fe56:14e3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17866 errors:0 dropped:1491 overruns:0 frame:0
          TX packets:15265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13136772 (12.5 MiB)  TX bytes:2877417 (2.7 MiB)
          Interrupt:17 

wlan0     Link encap:Ethernet  HWaddr 00:22:FA:8D:D7:6E  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@ark ~]#
my dhcpd.conf
Code:
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see dhcpd.conf(5) man page
#
ddns-update-style interim
ignore client-update

subnet 192.168.1.0 netmask 255.255.255.0 
{

	# the range if ip addresses the server
	# will issue to DHCP enabled PC clisnts
	# booting up on the network 

	range 192.168.1.201 192.168.1.220;

	# set the amount of time in secands that
	# a client may keep the IP address

	default-lease-time 86400;
	max-lease-time 86400;

	# set the default gateway to be used by
	# the PC Clients 
	
	option routers 192.168.1.101

	# Don't forward DHCP requests from this 
	# NIC interface to any other NIC
	# interface
	
	option ip-forwarding off;

	# Set the broadcas address and subnet mask
	# to be used by the DHCP clients

	option broadcast-address 192.168.1.255;
	option subnet-mask 255.255.255.0;

	# Set the NTP server to be used by the 
	# DHCP clients
	
	option ntp-servers 192.168.1.100;

	# Set the DNS server to be used by the 
	# DHCP clients 

	option domain-name-servers 4.2.2.2;

	# if you specify a WINS server for your windows clients, 
	# you need to include the following option in the dhcpd.conf file:
	
	option netbios-name-servers 192.168.1.100

	# you can also assign specific IP addresses based on the clients'
	# ethernet MAC address as follows (Host's name is "laser-printer";
	
	host laser-printer 
		{
		hardware ethernet 08:00:2b:4c:59:23;
		fixed-address 192.168.1.222;
		}
}
#
# List an unused interface here
#
subnet 192.168.2.0 netmask 255.255.255.0
{
}

doing this commands to start dhcpd service
Code:
[root@ark ~]# systemctl enable dhcpd.service
[root@ark ~]# chkconfig dhcpd on
Note: Forwarding request to 'systemctl enable dhcpd.service'.
[root@ark ~]# systemctl start dhcpd.service
[root@ark ~]# systemctl stop dhcpd.service
[root@ark ~]# systemctl restart dhcpd.service
[root@ark ~]# service dhcpd start
Redirecting to /bin/systemctl  start dhcpd.service
[root@ark ~]# service dhcpd stop
Redirecting to /bin/systemctl  stop dhcpd.service
[root@ark ~]# service dhcpd restart
Redirecting to /bin/systemctl  restart dhcpd.service
[root@ark ~]# systemctl restart dhcpd.service
[root@ark ~]# pgrep dhcpd
[root@ark ~]#
i can't start dhcp service
i got this result

Code:
[root@ark ~]# systemctl status dhcpd.service
dhcpd.service - DHCPv4 Server Daemon
	  Loaded: loaded (/lib/systemd/system/dhcpd.service; enabled)
	  Active: failed since Sat, 26 May 2012 03:30:47 +0200; 1min 1s ago
	 Process: 3110 ExecStart=/usr/sbin/dhcpd -f -user dhcpd -group dhcpd --no-pid $DHCPDARGS (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/dhcpd.service
[root@ark ~]#
 
Old 05-25-2012, 11:22 PM   #2
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
there are some things that just don't go in the (or just don't get along with the dhcp daemon) in the subnet declaration, the only things i ever put in there are the
-subnet-mask
-option routers
and
-broadcast-address
on average this is what my dhcpd.conf file looks like
Code:
domain-name-servers 192.168.1.4;
domain-name "baronobeefdip.josh";
max-lease-time 10000;
default-lease-time 1000000;
authoritative;
subnet 192.168.1.0 255.255.255.0 {
range 192.168.1.50 192.168.1.254;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
}

Last edited by baronobeefdip; 05-25-2012 at 11:23 PM.
 
Old 05-26-2012, 05:38 PM   #3
snoopcd
LQ Newbie
 
Registered: May 2012
Location: London
Distribution: Fedora 16
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks baronobeefdip for you reply
i get trying to do the same as you post before
and trying to restart dhcp service and i got the same result as before
Code:
domain-name-servers 192.168.1.101;
domain-name "ark.alexandercorvinus.com";
max-lease-time 10000;
default-lease-time 1000000;
authoritative;
subnet 192.168.1.0 255.255.255.0 {
range 192.168.1.10 192.168.1.20;
option routers 192.168.1.101;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
}
 
Old 05-26-2012, 11:55 PM   #4
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
I am using Debian Squeeze as my server and here is what my dhcpd.conf file looks like, i just tested it and it works, in case the last post had some syntax errors in it try something like this one
Code:
option domain-name-servers 8.8.8.8;
option domain-name "baronobeefdip.josh";
default-lease-time 10000;
max-lease-time 100000;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.55 192.168.1.254;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
}
what Linux distribution are you using? the dhcpd syntax should remain the same through not only all linux distributions but with all unix-like operating systems (OpenBSD has the same synntax too the difference between all these platforms is that each one is setup differently than all the others)

Normally I don't suggest this for educational purposes, i believe the one sure fire way of learning Linux real well is knowing how something works through the command line and the manual configurations of the text files but whenever something doesn't work out a GUI is a nice thing to have even though you won't always have the luxury of the GUI

my personal favorite gui when it comes to configuring the Linux Servers is WebMin
http://www.webmin.com/
it's a great way to configure server daemons through a web browser, it is also in it's own way remote accessable just type in the ip address along with the port number 10000 in a web browser on another computer and you'll have administrative control over it's daemons. personally i never used webmin for the dhcp server but you can give it a try and see what you think

Last edited by baronobeefdip; 05-27-2012 at 12:03 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
DHCP CLIENT Issue w/ ISP DHCP Server itsecx@gmail.com Linux - Networking 1 08-26-2010 09:27 AM
DHCP Server Issue wegadnie Linux - Server 7 09-07-2008 06:44 PM
dhcp server issue shio Linux - Server 1 07-06-2007 09:37 AM
dhcp server issue ruddernz Linux - Networking 2 01-27-2006 08:21 PM
dhcp server issue dshafi Linux - Networking 2 09-02-2005 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:33 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