dhcp not matching subnet if not first address on interface

Steve Clark sclark at netwolves.com
Tue Sep 6 00:57:24 UTC 2011


On 09/05/2011 08:40 PM, Steve Clark wrote:
> Hi,
>
> 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?
>
> Thanks,
>
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

/usr/sbin/dhcpd -4 eth2
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.

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


Not configured to listen on any interfaces!

exiting.

*now switch the address order so the 10.0.1.254 is first:*
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 10.0.1.254/24 scope global eth2
     inet 172.16.3.1/24 scope global eth2

/usr/sbin/dhcpd -4 eth2
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.
Listening on LPF/eth2/00:02:b6:36:d1:39/DHCP
Sending on   LPF/eth2/00:02:b6:36:d1:39/DHCP
Sending on   Socket/fallback/fallback-net

*Running OK.*

-- 
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/20110905/aadfc527/attachment.html>


More information about the dhcp-users mailing list