I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
Timothy Murphy wrote:
I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
I can not say about DHCPd in CentOS with certainty, but it should be ISC DHCP, and ISC DHCP on my routers has following syntax for subnet:
subnet 192.168.219.0 netmask 255.255.255.0 {
range 192.168.219.170 192.168.219.199;
option routers 192.168.219.100;
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
This is on my router, but should be true for all ISC DHCP servers.
Ljubomir
Ljubomir Ljubojevic wrote:
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
What exactly do you mean when you say that "you can only set DHCP service on the first IP on the interface"?
Timothy Murphy wrote:
Ljubomir Ljubojevic wrote:
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
What exactly do you mean when you say that "you can only set DHCP service on the first IP on the interface"?
I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on the interface, just for the subnet original, true IP is set.
Since ISC DHCP should be the same, this should be also true for CentOS version of ISC DHCP server.
Ljubomir
On 7/15/2011 2:56 PM, Ljubomir Ljubojevic wrote:
Timothy Murphy wrote:
Ljubomir Ljubojevic wrote:
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
What exactly do you mean when you say that "you can only set DHCP service on the first IP on the interface"?
I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on the interface, just for the subnet original, true IP is set.
Since ISC DHCP should be the same, this should be also true for CentOS version of ISC DHCP server.
Did you use a 'shared-network' declaration? It still isn't going to be able to distinguish which address range to give out to any particular client unless you've specified the hardware ethernet for it, though.
Les Mikesell wrote:
On 7/15/2011 2:56 PM, Ljubomir Ljubojevic wrote:
Timothy Murphy wrote:
Ljubomir Ljubojevic wrote:
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
What exactly do you mean when you say that "you can only set DHCP service on the first IP on the interface"?
I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on the interface, just for the subnet original, true IP is set.
Since ISC DHCP should be the same, this should be also true for CentOS version of ISC DHCP server.
Did you use a 'shared-network' declaration? It still isn't going to be able to distinguish which address range to give out to any particular client unless you've specified the hardware ethernet for it, though.
On the router I am using I guess that info is taken from the router it self. I just have to declare subnet and that is it. Routers always respond on any interface with first IP declared on that interface, and it is always with the first IP. Giving out IP is on the same principle, request comes on the interface and server queries first IP address of the interface and searches for the subnet.
But ones again, this is *not* on the CentOS, ISC DHCP version is newer (4.1.0) then in CentOS 5.6 (3.0.5),
Here is config file and output of the server with only one active subnet declaration (and coincidence is it is with shared lan) on 5 interface router:
option domain-name "plnet.rs"; option domain-name-servers x.x.x.x, x.x.x.y, z.z.z.z; ddns-update-style none; default-lease-time 43200;
max-lease-time 86400; authoritative;
shared-network drlan {
subnet 172.26.21.0 netmask 255.255.255.0 { }
subnet 192.168.219.0 netmask 255.255.255.0 {
range 192.168.219.170 192.168.219.199;
option routers 192.168.219.100;
}
host ljubomir_lap-top { hardware ethernet 00:19:DB:F1:0B:36; fixed-address 192.168.219.102; } host ljubomir_laptop_wifi { hardware ethernet 00:15:af:4e:b2:11; fixed-address 192.168.219.102; } host ljubomir_wildfire_wifi { hardware ethernet 90:21:55:e7:16:35; fixed-address 192.168.219.101; } }
<start> Internet Systems Consortium DHCP Server 4.1.0p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
WARNING: Host declarations are global. They are not limited to the scope you declared them in. │ Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 3 leases to leases file.
No subnet declaration for tap0 (172.29.0.200).
** Ignoring requests on tap0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface tap0 is attached. **
No subnet declaration for wpci2 (172.26.16.100).
** Ignoring requests on wpci2. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface wpci2 is attached. **
No subnet declaration for wpci1 (172.26.19.200).
** Ignoring requests on wpci1. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface wpci1 is attached. **
No subnet declaration for wpci3 (172.26.10.100).
** Ignoring requests on wpci3. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface wpci3 is attached. **
No subnet declaration for wpci0 (172.26.14.100).
** Ignoring requests on wpci0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface wpci0 is attached. **
No subnet declaration for eth1 (172.26.221.100).
** Ignoring requests on eth1. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth1 is attached. **
Listening on LPF/eth0/00:19:5f:00:91:96/drlan
Sending on LPF/eth0/00:19:5f:00:91:96/drlan
Sending on Socket/fallback/fallback-net
<emd>
Ljubomir
On 7/15/2011 3:53 PM, Ljubomir Ljubojevic wrote:
and there is no mention of interfaces, just their IP's, and you can only set DHCP service on the first IP on the interface.
What exactly do you mean when you say that "you can only set DHCP service on the first IP on the interface"?
I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on the interface, just for the subnet original, true IP is set.
Since ISC DHCP should be the same, this should be also true for CentOS version of ISC DHCP server.
Did you use a 'shared-network' declaration? It still isn't going to be able to distinguish which address range to give out to any particular client unless you've specified the hardware ethernet for it, though.
On the router I am using I guess that info is taken from the router it self. I just have to declare subnet and that is it. Routers always respond on any interface with first IP declared on that interface, and it is always with the first IP. Giving out IP is on the same principle, request comes on the interface and server queries first IP address of the interface and searches for the subnet.
No, it isn't quite the same. The shared-network declaration should let dhcpd match up the physical interface with one of the subnets and associate all that are grouped. But it may give out all of one range before starting on another in the group.
But ones again, this is *not* on the CentOS, ISC DHCP version is newer (4.1.0) then in CentOS 5.6 (3.0.5),
Here is config file and output of the server with only one active subnet declaration (and coincidence is it is with shared lan) on 5 interface router:
shared-network drlan { subnet 172.26.21.0 netmask 255.255.255.0 { } subnet 192.168.219.0 netmask 255.255.255.0 { range 192.168.219.170 192.168.219.199; option routers 192.168.219.100; }
You only have one range, so it can't give out anything for the other subnet.
On 07/15/2011 05:45 PM, Timothy Murphy wrote:
I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
Hi, I had this problem on my Fedora 12 & 14 box a while back, and I found by adding a "dummy" network fixed the issue. I would assume the fix to be the same on CentOS6 as their so closely related.
Here's an example of what I mean by dummy network in my dhcpd.conf
-- Begin --
ddns-update-style none; ignore client-updates; DHCPARGS=eth1;
subnet 0.0.0.0 netmask 0.0.0.0 { # This remains blank. }
subnet 192.168.2.0 netmask 255.255.255.0 { # Here would go the settings you wish for eth1. }
-- end --
Basically as you can see, there is a subnet "0.0.0.0" this would be for eth0 while the other subnet below is in use and configured how you would like.
This for me fixed the error you mentioned. Also just a note, you will often see "service dhcpd start" fail, if their is no device connected to it.
I do not know why, however command dhcpd will work. However, the service appears to start anyway, it just reports a fail. as connected said device to eth1 works even though service apparently failed to start. device connected and powered up, service reports to start OK.
I hope this can help you and fixes your issues. :-)
Jake Shipton wrote:
On 07/15/2011 05:45 PM, Timothy Murphy wrote:
I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
Hi, I had this problem on my Fedora 12 & 14 box a while back, and I found by adding a "dummy" network fixed the issue. I would assume the fix to be the same on CentOS6 as their so closely related.
Here's an example of what I mean by dummy network in my dhcpd.conf
-- Begin --
ddns-update-style none; ignore client-updates; DHCPARGS=eth1;
subnet 0.0.0.0 netmask 0.0.0.0 { # This remains blank. }
subnet 192.168.2.0 netmask 255.255.255.0 { # Here would go the settings you wish for eth1. }
-- end --
Basically as you can see, there is a subnet "0.0.0.0" this would be for eth0 while the other subnet below is in use and configured how you would like.
This for me fixed the error you mentioned. Also just a note, you will often see "service dhcpd start" fail, if their is no device connected to it.
I do not know why, however command dhcpd will work. However, the service appears to start anyway, it just reports a fail. as connected said device to eth1 works even though service apparently failed to start. device connected and powered up, service reports to start OK.
I hope this can help you and fixes your issues. :-)
Yes I omitted that part, since my routers can do without that, but as a rule, you should declare ALL subnets in simple form:
subnet 192.168.2.0 netmask 255.255.255.0 { }
so ISC DHCP knows about them. Why, I do not know, but it is supposed to be in newer versions (more strict rules for config file.)
I can not say about 0.0.0.0, newer needed it.
Ljubomir
Ljubomir Ljubojevic wrote:
as a rule, you should declare ALL subnets in simple form:
subnet 192.168.2.0 netmask 255.255.255.0 { }
so ISC DHCP knows about them. Why, I do not know, but it is supposed to be in newer versions (more strict rules for config file.)
Thanks for your response. As far as I can see, my dhcpd.conf satisfies these conditions.
But what puzzles me is, what defines the correspondence between interface and network, eg in my case eth1 -> 192.168.2.0/24
Surely this should be there independently of dhcpd ?
On 7/15/2011 1:54 PM, Timothy Murphy wrote:
Ljubomir Ljubojevic wrote:
as a rule, you should declare ALL subnets in simple form:
subnet 192.168.2.0 netmask 255.255.255.0 { }
so ISC DHCP knows about them. Why, I do not know, but it is supposed to be in newer versions (more strict rules for config file.)
Thanks for your response. As far as I can see, my dhcpd.conf satisfies these conditions.
But what puzzles me is, what defines the correspondence between interface and network, eg in my case eth1 -> 192.168.2.0/24
Surely this should be there independently of dhcpd ?
Dhcpd shouldn't care about the name of the interface, but if the request hasn't been forwarded by a router/relay agent it needs to figure out the subnet of the interface where the request is received so it uses the corresponding range and options for the response.
Les Mikesell wrote:
But what puzzles me is, what defines the correspondence between interface and network, eg in my case eth1 -> 192.168.2.0/24
Surely this should be there independently of dhcpd ?
Dhcpd shouldn't care about the name of the interface, but if the request hasn't been forwarded by a router/relay agent it needs to figure out the subnet of the interface where the request is received so it uses the corresponding range and options for the response.
I'm not sure what router/relay agent is supposed to forward the request.
In my case, I am trying to run dhcpd on my CentOS-6 server, but I get the message ------------------------------------ alfred dhcpd: No subnet declaration for eth1 (no IPv4 addresses). alfred dhcpd: ** Ignoring requests on eth1. If this is not what alfred dhcpd: you want, please write a subnet declaration alfred dhcpd: in your dhcpd.conf file for the network segment alfred dhcpd: to which interface eth1 is attached. ** alfred dhcpd: alfred dhcpd: alfred dhcpd: Not configured to listen on any interfaces! ------------------------------------
My /etc/dhcpd.conf reads (after removing comments and several hosts) ------------------------------------- option domain-name "gayleard.com"; option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 600; max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 { }
subnet 192.168.2.0 netmask 255.255.255.0 {
authoritative;
option routers 192.168.2.1; option subnet-mask 255.255.255.0;
option domain-name "gayleard.com"; option domain-name-servers 208.67.222.222,208.67.220.220;
range 192.168.2.100 192.168.2.250; range dynamic-bootp 192.168.2.128 192.168.2.254;
host alfred { hardware 00:1B:21:AB:C9:4C; fixed-address 192.168.2.2; }
host blanche { hardware ethernet 00:1B:77:04:00:12; fixed-address 192.168.2.7; }
host blanche-ether { hardware ethernet 00:36:6B:35:26:8E; fixed-address 192.168.2.27; }
host linksys { hardware ethernet 00:16:B6:DA:56:B3; fixed-address 192.168.2.1; }
# several hosts omitted
} -------------------------------------
In /etc/sysconfig/network-scripts/ I have ifcfg-eth0 ------------------------------------- # Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe DEVICE=eth0 HWADDR=3C:4A:92:77:B3:AE IPADDR=192.168.1.2 GATEWAY=192.168.1.254 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes BOOTPROTO=none USERCTL=no ------------------------------------- ifcfg-eth1 ------------------------------------- # Intel Corporation 82574L Gigabit Network Connection DEVICE=eth1 TYPE=Ethernet HWADDR=00:1B:21:AB:C9:4C IPADDR=192.168.2.2 NETMASK=255.255.255.0 GATEWAY=192.168.2.1 NM_CONTROLLED=yes ONBOOT=yes BOOTPROTO=dhcp IPV6INIT=no USERCTL=yes -------------------------------------
eth0 is connected to a Billion modem/router and thence to the ethernet; eth1 is connected to a Linksys WRT54GL router.
If anyone can point out the error of my ways I should be most grateful.
On Jul 15, 2011, at 4:59 PM, Timothy Murphy wrote:
Les Mikesell wrote:
But what puzzles me is, what defines the correspondence between interface and network, eg in my case eth1 -> 192.168.2.0/24
Surely this should be there independently of dhcpd ?
Dhcpd shouldn't care about the name of the interface, but if the request hasn't been forwarded by a router/relay agent it needs to figure out the subnet of the interface where the request is received so it uses the corresponding range and options for the response.
I'm not sure what router/relay agent is supposed to forward the request.
In my case, I am trying to run dhcpd on my CentOS-6 server, but I get the message
alfred dhcpd: No subnet declaration for eth1 (no IPv4 addresses). alfred dhcpd: ** Ignoring requests on eth1. If this is not what alfred dhcpd: you want, please write a subnet declaration alfred dhcpd: in your dhcpd.conf file for the network segment alfred dhcpd: to which interface eth1 is attached. ** alfred dhcpd: alfred dhcpd: alfred dhcpd: Not configured to listen on any interfaces!
My /etc/dhcpd.conf reads (after removing comments and several hosts)
option domain-name "gayleard.com"; option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 600; max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 { }
subnet 192.168.2.0 netmask 255.255.255.0 {
authoritative; option routers 192.168.2.1; option subnet-mask 255.255.255.0; option domain-name "gayleard.com"; option domain-name-servers 208.67.222.222,208.67.220.220; range 192.168.2.100 192.168.2.250; range dynamic-bootp 192.168.2.128 192.168.2.254; host alfred { hardware 00:1B:21:AB:C9:4C; fixed-address 192.168.2.2; } host blanche { hardware ethernet 00:1B:77:04:00:12; fixed-address 192.168.2.7; } host blanche-ether { hardware ethernet 00:36:6B:35:26:8E; fixed-address 192.168.2.27; } host linksys { hardware ethernet 00:16:B6:DA:56:B3; fixed-address 192.168.2.1; }
# several hosts omitted
}
In /etc/sysconfig/network-scripts/ I have ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe DEVICE=eth0 HWADDR=3C:4A:92:77:B3:AE IPADDR=192.168.1.2 GATEWAY=192.168.1.254 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes BOOTPROTO=none USERCTL=no
ifcfg-eth1
# Intel Corporation 82574L Gigabit Network Connection DEVICE=eth1 TYPE=Ethernet HWADDR=00:1B:21:AB:C9:4C IPADDR=192.168.2.2 NETMASK=255.255.255.0 GATEWAY=192.168.2.1 NM_CONTROLLED=yes ONBOOT=yes BOOTPROTO=dhcp IPV6INIT=no USERCTL=yes
eth0 is connected to a Billion modem/router and thence to the ethernet; eth1 is connected to a Linksys WRT54GL router.
If anyone can point out the error of my ways I should be most grateful.
-- Timothy Murphy e-mail: gayleard /at/ eircom.net tel: +353-86-2336090, +353-1-2842366 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
I believe you need to wrap your networks in a "shared network" statement. My ISC dhcp server has no problem issuing address to either nic, and aliased address are no problem either.
The relevant portion of my dhcpd.conf file:
shared-network opt { subnet 192.168.2.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 192.168.2.255; option routers 192.168.2.150; option ntp-servers 192.168.2.150; ddns-updates-off; dynamic-bootp-lease-length 7200; }
subnet 192.168.12.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 192.168.12.255; option routers 192.168.12.1; option ntp-servers 192.168.12.1; ddns-updates-off; dynamic-bootp-lease-length 7200; }
subnet 172.24.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 172.24.1.255; option routers 172.24.1.1; option ntp-servers 143.197.200.121; ddns-updates-off; dynamic-bootp-lease-length 7200; #pool { # range 172.24.1.75 172.24.1.99; #} }
subnet 172.24.200.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 172.24.200.255; option routers 172.24.200.1; option ntp-servers 143.197.200.121; option netbios-name-servers 143.197.200.216; ddns-updates-off; dynamic-bootp-lease-length 7200; pool { range 172.24.200.10 172.24.200.250; } }
subnet 172.24.143.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 172.24.143.255; option routers 172.24.143.1; option ntp-servers 143.197.200.121; option netbios-name-servers 143.197.200.216; ddns-updates-off; dynamic-bootp-lease-length 7200; }
subnet 172.24.145.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 172.24.145.255; option routers 172.24.145.1; option ntp-servers 143.197.200.121; option netbios-name-servers 143.197.200.216; ddns-updates-off; dynamic-bootp-lease-length 7200; #pool { # range 172.24.145.10 172.24.145.250; #} }
subnet 172.24.0.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 172.24.0.255; option routers 172.24.0.1; option ntp-servers 143.197.200.121; ddns-updates-off; dynamic-bootp-lease-length 7200; } }
<-- sniped individual host assignments.. -->
As you can see, we only allocate address to unknown devices out of the 172.24.200/24 pool, all other hosts/devices are assigned addresses out of the other subnets.
The "opt" in the shared network line is just a name, can be anything.
Take care!
-- Don Krause Head Systems Geek, Waver of Deceased Chickens. Optivus Proton Therapy, Inc. P.O. Box 608 Loma Linda, California 92354 909.799.8327 Tel 909.799.8366 Fax dkrause@optivus.com www.optivus.com "This message represents the official view of the voices in my head."
On 07/15/2011 02:06 PM, Ljubomir Ljubojevic wrote:
Jake Shipton wrote:
On 07/15/2011 05:45 PM, Timothy Murphy wrote:
I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
Hi, I had this problem on my Fedora 12& 14 box a while back, and I found by adding a "dummy" network fixed the issue. I would assume the fix to be the same on CentOS6 as their so closely related.
Here's an example of what I mean by dummy network in my dhcpd.conf
-- Begin --
ddns-update-style none; ignore client-updates; DHCPARGS=eth1;
subnet 0.0.0.0 netmask 0.0.0.0 { # This remains blank. }
subnet 192.168.2.0 netmask 255.255.255.0 { # Here would go the settings you wish for eth1. }
-- end --
Basically as you can see, there is a subnet "0.0.0.0" this would be for eth0 while the other subnet below is in use and configured how you would like.
This for me fixed the error you mentioned. Also just a note, you will often see "service dhcpd start" fail, if their is no device connected to it.
I do not know why, however command dhcpd will work. However, the service appears to start anyway, it just reports a fail. as connected said device to eth1 works even though service apparently failed to start. device connected and powered up, service reports to start OK.
I hope this can help you and fixes your issues. :-)
Yes I omitted that part, since my routers can do without that, but as a rule, you should declare ALL subnets in simple form:
subnet 192.168.2.0 netmask 255.255.255.0 { }
so ISC DHCP knows about them. Why, I do not know, but it is supposed to be in newer versions (more strict rules for config file.)
I can not say about 0.0.0.0, newer needed it.
You have to have a subnet declaration(s) that matches an existing subnet(s) that is configured on the interface(s) you want to provide dynamic addresses for.
dhcpd will tell you which interfaces it is not configured to run on with a message like: dhcpd: No subnet declaration for eth1 (96.228.159.10). dhcpd: ** Ignoring requests on eth1. If this is not what dhcpd: you want, please write a subnet declaration dhcpd: in your dhcpd.conf file for the network segment dhcpd: to which interface eth1 is attached. **
Steve Clark wrote:
You have to have a subnet declaration(s) that matches an existing subnet(s) that is configured on the interface(s) you want to provide dynamic addresses for.
But how exactly is a subnet, in my case 192.168.2.0, "configured" on the interface eth1 ?
Timothy Murphy <gayleard@...> writes:
I've installed CentOS-6 on my server (in parallel to CentOS-5.6) and now I'm trying to set up dhcpd.
I'm not sure if there has been a change in dhcpd under CentOS-6, but I'm getting the dreaded message "Not configured to listen on any interfaces!" when I "sudo service dhcpd restart".
I realise now that I have never known how the connection between interface (eth0 and eth1, in my case) and network (192.168.1.0 and 192.168.2.0, in my case) is established.
I have DHCPDARGS=eth1 in /etc/sysconfig/dhcpd but evidently I need to say something more somewhere.
Can one actually specify the interface in /etc/dhcpd.conf and if so how?
Any suggestions or enlightenment gratefully received.
I read through the rest of the response but I'm thinking what I have to say fits better here than lower in the comments thread. Some things to check:
RHEL6/CentOS6 likes to let NetworkMangler control interfaces even if the system is a server and running services like dhcpd. You may be getting a failure message since the interface isn't up when dhcpd gets started. I only find NetworkMangler useful on systems that regularly change connectivity like my laptop. I just find it gets in the way on stable, wired networks.
The same problem can occur on VMs just because the virtual interface comes up more slowly the a "real" hardware device. That is, eth1 sn't there yet when dhcpd starts.
If you specify the correct interface that matches the IP address you want DHCP services on in /etc/sysconfig/dhcpd you shouldn't need a dummy interface/network specification.
I notice that you mention /etc/dhcpd.conf but the location of the configuration file moved to /etc/dhcp with RHEL6/CentOS6. Unless you edit the startup files, dhcpd will use the configuration file /etc/dhcp/dhcpd.conf
Cheers, Dave