LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-14-2005, 01:31 AM   #1
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Rep: Reputation: 15
No subnet declaration for restart (0.0.0.0)


Having problems with my DHCP server.
DHCP is actually running at the time, and was only recently rebooted, so I find it wierd that I get the error(in the subject) when I do a dhcp restart(as I have made some changes to the dhcp.conf file). I removed my changes and it still didn't want to restart...anyone got any ideas, the server only has one NIC and it's ip is on the same subnet out of the DHCP scope.

# dhcpd.conf
#
# Configuration file for BLAH dhcpd
#
option domain-name "blah.com.au";
server-identifier Blah.blah.com.au;
option domain-name-servers 192.168.1.60;
option netbios-name-servers 192.168.1.60;
option routers 192.168.1.2;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
next-server 192.168.1.65;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.130 192.168.1.200;
option routers 192.168.1.2;
option broadcast-address 192.168.1.255;
default-lease-time 14400;
max-lease-time 86400;
server-name "192.168.1.65";
option root-path "/fai/fai-nfsroot";
}
 
Old 09-14-2005, 05:55 PM   #2
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
Are there multiple ethernet interfaces on this server? If so when you are starting dhcpd make sure you specify the interface you want the process to listen on. For example..

/usr/local/sbin/dhcpd eth0
 
Old 09-14-2005, 06:16 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Re: No subnet declaration for restart (0.0.0.0)

Quote:
Originally posted by changlinn
Having problems with my DHCP server.
DHCP is actually running at the time, and was only recently rebooted, so I find it wierd that I get the error(in the subject) when I do a dhcp restart(as I have made some changes to the dhcp.conf file). I removed my changes and it still didn't want to restart...anyone got any ideas, the server only has one NIC and it's ip is on the same subnet out of the DHCP scope.

# dhcpd.conf
#
# Configuration file for BLAH dhcpd
#
option domain-name "blah.com.au";
server-identifier Blah.blah.com.au;
option domain-name-servers 192.168.1.60;
option netbios-name-servers 192.168.1.60;
option routers 192.168.1.2;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
next-server 192.168.1.65;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.130 192.168.1.200;
option routers 192.168.1.2;
option broadcast-address 192.168.1.255;
default-lease-time 14400;
max-lease-time 86400;
server-name "192.168.1.65";
option root-path "/fai/fai-nfsroot";
}
I may be missing something, but there seems to be an extra closing bracket '}' after the next-server line.
 
Old 09-14-2005, 08:12 PM   #4
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Original Poster
Rep: Reputation: 15
the server only has one NIC... one ethernet card, even still I did try that, below is my ifconfig
In regards to the extra closing bracket, doesn't the subnet declaration need to be excluded from brackets? I tried it no go...

eth0 Link encap:Ethernet HWaddr 00:03:42:8F:21:35
inet addr:192.168.1.60 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19939517 errors:0 dropped:0 overruns:0 frame:0
TX packets:25645113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4112894548 (3.8 GiB) TX bytes:2375424267 (2.2 GiB)
Interrupt:5 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:151495 errors:0 dropped:0 overruns:0 frame:0
TX packets:151495 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16818220 (16.0 MiB) TX bytes:16818220 (16.0 MiB)
 
Old 09-14-2005, 08:27 PM   #5
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Original Poster
Rep: Reputation: 15
The plot thickens, if I vi /etc/init.d/dhcp I get the below... I have edited it to the best of my knowledge with no differing result...

#!/bin/sh
#
# $Id: dhcp.init.d,v 1.1.1.1.2.1 2002/02/11 03:44:26 eparis Exp $
#

test -x /usr/sbin/dhcpd || exit 0

# Defaults
INTERFACES="eth0" #I added the eth0 to test no go

# Reads config file (will override defaults above)
# [ -r /etc/default/dhcp ] && . /etc/default/dhcp #I commented this out and added the below line, no go.
-r /etc/dhcpd.conf

DHCPDPID=/var/run/dhcpd.pid

case "$1" in
start)
echo -n "Starting DHCP server: dhcp"
start-stop-daemon --start --quiet --pidfile $DHCPDPID \
--exec /usr/sbin/dhcpd -- -q $INTERFACES
echo "."
;;
stop)
echo -n "Stopping DHCP server: dhcp"
start-stop-daemon --stop --quiet --pidfile $DHCPDPID
echo "."
;;
restart | force-reload)
echo -n "Stopping DHCP server: dhcp"
start-stop-daemon --stop --quiet --pidfile $DHCPDPID
echo "."
sleep 2
echo -n "Starting DHCP server: dhcp"
start-stop-daemon --start --quiet --pidfile $DHCPDPID \
--exec /usr/sbin/dhcpd -- -q $INTERFACES
echo "."
;;
*)
echo "Usage: /etc/init.d/dhcp {start|stop|restart|force-reload}"
exit 1
esac

exit 0
 
Old 09-14-2005, 11:33 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Code:
    # dhcpd.conf
    #
    # Configuration file for BLAH dhcpd
    #
    option domain-name "blah.com.au";
    server-identifier Blah.blah.com.au;
    option domain-name-servers 192.168.1.60;
    option netbios-name-servers 192.168.1.60;
    option routers 192.168.1.2;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    next-server 192.168.1.65;
    } <-- extra bracket
    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.130 192.168.1.200;
    option routers 192.168.1.2;
    option broadcast-address 192.168.1.255;
    default-lease-time 14400;
    max-lease-time 86400;
    server-name "192.168.1.65";
    option root-path "/fai/fai-nfsroot";
    }
 
Old 09-15-2005, 03:44 AM   #7
changlinn
LQ Newbie
 
Registered: Jan 2005
Location: Australia
Distribution: ParrotOS, Kali, Ubunut
Posts: 28

Original Poster
Rep: Reputation: 15
yep took your advice removed the extra bracket still the same message.
This is really odd...
 
Old 09-15-2005, 08:07 AM   #8
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
Originally posted by changlinn
yep took your advice removed the extra bracket still the same message.
This is really odd...
Yes it is odd. Other than removing some of the redundancy you had listed between the global and local options (which shouldn't really hurt anything), I had no problems starting dhcpd on my test server using your dhcpd.conf file edited for my subnet (192.168.9.0/24).

Code:
ddns-update-style ad-hoc;
option domain-name "blah.com.au";
server-identifier Blah.blah.com.au;
option domain-name-servers 192.168.9.4;
option netbios-name-servers 192.168.9.4;
next-server 192.168.9.65;
 
subnet 192.168.9.0 netmask 255.255.255.0 {
        range 192.168.9.130 192.168.9.200;
        option routers 192.168.9.2;
        option broadcast-address 192.168.9.255;
        option subnet-mask 255.255.255.0;
        default-lease-time 14400;
        max-lease-time 86400;
        server-name "192.168.1.65";
        option root-path "/fai/fai-nfsroot";
}

[root@excelsior etc]# service dhcpd start
Starting dhcpd:                                            [  OK  ]

Snip from /var/log/messages
Sep 15 06:46:03 excelsior dhcpd: dhcpd startup succeeded
If I were in your shoes, I would try reloading the dhcpd package. Your ifconfig output looks correct for the subnet and the dhcpd.conf file looks OK too (minus the redundancy).
 
Old 02-02-2010, 12:47 PM   #9
jlandstrom
LQ Newbie
 
Registered: Feb 2010
Location: Pagosa Springs, CO
Distribution: Red Hat EL5
Posts: 2

Rep: Reputation: 0
Note

I was having the same message when trying to restart dhcpd. My current is /etc/init.d/

I found that I had to run ./dhcpd restart

I hope this help someone else in the future.
-----------------------------------------------------------------------

Results below.

[root@ldap0 init.d]# dhcpd restart
Internet Systems Consortium DHCP Server V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 339 leases to leases file.

No subnet declaration for restart (0.0.0.0).
** Ignoring requests on restart. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface restart is attached. **


Not configured to listen on any interfaces!

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
[root@ldap0 init.d]# ./dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
[root@ldap0 init.d]#
 
Old 08-04-2011, 02:54 AM   #10
engelienart
Member
 
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73

Rep: Reputation: 16
Last sollution didnt work out for me

Sorry for replying to a 6 month old article, but I have the same problem, and the sollutions here, dont work for me:

here is my dhcpd.conf

Code:
ddns-update-style interim;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

# DAG netwerk
subnet 128.10.1.0 netmask 255.255.255.0 {
    option domain-name "dag.local";
    option domain-name-servers 128.10.1.1; #128.10.1.10, 128.10.2.2;

    range 128.10.1.50 128.10.1.80;
    option routers 128.10.1.10;
}
host ColorLaserJet2840 {
  hardware ethernet 00:14:38:D7:DB:A7;
  fixed-address 128.10.1.4;
}

host LaserJet2200 {
  hardware ethernet 00:01:e6:79:18:bd;
  fixed-address 128.10.1.5;
}

host LaserJet4200DTN {
  hardware ethernet 00:11:0A:F1:2A:F0;
  fixed-address 128.10.1.6;
}
host ColorLaserjetCM4730 {
  hardware ethernet 00:1E:0B:FF:41:4F;
  fixed-address 128.10.1.9;
}

host BALIEEEN {
  hardware ethernet 00:10:DC:E6:DB:90;
  fixed-address 128.10.1.50;
}

host Crematie {
  hardware ethernet 00:10:DC:E6:C0:95;
  fixed-address 128.10.1.52;
}

host Administratie1 {
  hardware ethernet 00:10:DC:E6:BF:CC;
  fixed-address 128.10.1.53;
}
host Administratie2 {
  hardware ethernet 00:10:DC:E6:C0:5E;
  fixed-address 128.10.1.54;
}

host Planning {
  hardware ethernet 00:10:DC:E6:C0:A9;
  fixed-address 128.10.1.55;
}

host DagDirectie {
  hardware ethernet 00:23:54:BB:AA:CD;
  fixed-address 128.10.1.56;
}

host EHBO1 {
  hardware ethernet 00:10:DC:E6:C0:97;
  fixed-address 128.10.1.57;
}
host Backup {
  hardware ethernet 00:0C:6E:1B:88:B5;
  fixed-address 128.10.1.58;
}

host Kattenverblijf {
  hardware ethernet 00:10:DC:E6:BF:DB;
  fixed-address 128.10.1.59;
}

host EHBO2 {
  hardware ethernet 00:11:2F:AE:4C:36;
  fixed-address 128.10.1.60;
}
host BALIETWEE {
  hardware ethernet 00:13:21:F8:5B:2E;
  fixed-address 128.10.1.51;
}
I tried looking via google, but I couldnt find any sollution.
 
Old 08-04-2011, 03:09 AM   #11
engelienart
Member
 
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73

Rep: Reputation: 16
Additional information:

My network interfaces are allrigth:

vi /etc/network/interfaces

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 128.10.1.1
netmask 255.255.255.0
gateway 128.10.1.10
 
Old 07-16-2013, 10:09 PM   #12
ssoorruu
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
Post trial & error

So, you have different pool for each subnet. Let's say you have DHCP pool 10.10.10.0/24 for subnet 10.10.10.0/24, and you have DHCP pool 10.100.100.0/24 for subnet 10.100.100.0/24.
But you only have 1 interface 'eth0' with assigned IP 192.168.255.1/24, which obviously another subnet from both pools.

So, I think the interface on the DHCPD server need to be assigned an IP with the same subnet as the pool's subnet in dhcpd.conf*

Otherwise, how the DHCPD server can determine which pool 'the MAC Address' had to assigned a pool to, for every DHCP REQUEST sent from different subnet/VLAN/network?

My suggestion would be:
- create VLAN interface with IP (let's say) 10.10.10.1/24 on VLAN10 on the physical interface eth0
- create VLAN interface with IP (let's say) 10.100.100.1/24 on VLAN15 on the physical interface eth0

Anyone have another suggestion?
 
  


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
declaration does not declare anything tristanm Programming 5 10-24-2005 05:00 PM
char * declaration in c; alaios Programming 19 09-14-2005 10:50 PM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 11:32 AM
the c declaration kapsikum Programming 3 04-06-2005 03:12 AM
Can IP from different subnet be configured on another subnet russell Linux - Networking 1 08-23-2002 02:47 AM

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

All times are GMT -5. The time now is 09:46 PM.

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