<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 09/06/2011 03:00 AM, Simon Hobson wrote:
<blockquote cite="mid:p0624086bca8b73468f8a@simon.thehobsons.co.uk"
type="cite">
<pre wrap="">Steve Clark wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">I am using dhcp-4.1.1-11.P1 on EL6. I am running dhcpd without
specifying an interface
expecting dhcpd to match the interface based on the subnet defined
in the dhcpd.conf file.
This works as expected unless I have multiple addresses on the
interface and the
subnet that matches the dhcpd.conf file is not the first address
listed on the interface.
Is this a known problem? Is there a work around?
</pre>
</blockquote>
</blockquote>
<pre wrap="">
Yes it's a known problem - it's called "administrator didn't
configure things right"
The workaround is to configure things right - see below !
</pre>
<blockquote type="cite">
<pre wrap="">Here is an example:
/etc/dhcp/dhcpd.conf
#dhcpd.conf
ddns-update-style interim;
shared-network DHCP{
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.1 10.0.1.253;
option domain-name-servers 10.0.1.254;
option routers 10.0.1.254;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.1.255;
default-lease-time 86400;
max-lease-time 86400;
deny bootp;
}}
ip a s eth2
2: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state
DOWN qlen 1000
link/ether 00:02:b6:36:d1:39 brd ff:ff:ff:ff:ff:ff
inet 172.16.3.1/24 brd 172.16.3.255 scope global eth2
inet 10.0.1.254/24 scope global eth2
</pre>
</blockquote>
<pre wrap="">
OK, eth2 is what we call a shared-network - it has two IP ranges on
the same network (you appear to have realised that bit). What you
need to do is define **ALL** subnets on that shared-network and group
them in a shared-network statement like this :
shared-network DHCP{
... shared options
subnet 10.0.1.0 netmask 255.255.255.0 {
... subnet options
}
subnet 172.16.3.0 netmask 255.255.255.0 {
... subnet options
}
}
DHCPD will not work unless you correctly tell it about your network
and it's topology. That means you accurately tell it about **all**
subnets on **all** networks it will be servicing - you forgot to tell
it about a subnet.
</pre>
</blockquote>
Should I include subnet declaration for all interfaces? Or just the
subnets on the<br>
interface where the subnet is that I will actually be handing out
ips for.<br>
<br>
Thanks,<br>
<br>
<br>
<div class="moz-signature">-- <br>
Stephen Clark<br>
<b>NetWolves</b><br>
Sr. Software Engineer III<br>
Phone: 813-579-3200<br>
Fax: 813-882-0209<br>
Email: <a class="moz-txt-link-abbreviated" href="mailto:steve.clark@netwolves.com">steve.clark@netwolves.com</a><br>
<a class="moz-txt-link-freetext" href="http://www.netwolves.com">http://www.netwolves.com</a><br>
</div>
</body>
</html>