dhcp not matching subnet if not first address on interface

Steve Clark sclark at netwolves.com
Tue Sep 6 12:10:13 UTC 2011


On 09/06/2011 03:00 AM, Simon Hobson wrote:
> Steve Clark wrote:
>
>>> 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?
> Yes it's a known problem - it's called "administrator didn't
> configure things right"
> The workaround is to configure things right - see below !
>
>
>> 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
> 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.
>
Should I include subnet declaration for all interfaces? Or just the subnets on the
interface where the subnet is that I will actually be handing out ips for.

Thanks,


-- 
Stephen Clark
*NetWolves*
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark at netwolves.com
http://www.netwolves.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110906/17571778/attachment.html>


More information about the dhcp-users mailing list