FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-15-2011, 06:06 PM
Ljubomir Ljubojevic
 
Default CentOS-6 dhcpd

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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 06:54 PM
Timothy Murphy
 
Default CentOS-6 dhcpd

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 ?

--
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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 06:56 PM
Timothy Murphy
 
Default CentOS-6 dhcpd

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
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 07:03 PM
Steve Clark
 
Default CentOS-6 dhcpd

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. **

*

--

Stephen*Clark

NetWolves

Sr.*Software*Engineer*III

Phone:*813-579-3200

Fax:*813-882-0209

Email:*steve.clark@netwolves.com

http://www.netwolves.com




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 07:26 PM
Les Mikesell
 
Default CentOS-6 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
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org