Wrong gateway when using class in a subnet

Randall C Grimshaw rgrimsha at syr.edu
Fri Jun 1 12:59:52 UTC 2012


Correct, but to be precise the allow/deny is part of a pool definition that *is* a valid part of a subnet definition. For my needs the class he describes required a third pool definition.... [quietly singing] and the ham bone connects to the backbone...

I think of the structure of the dhcpd.conf file in sections: 1.) general environment and log section, 2.) class definitions section, 3.) subnet declaration section, 4.) hosts/group section.
Section 1 is host specific and using include statement brings in the more global sections.

Randall Grimshaw rgrimsha at syr.edu<mailto:rgrimsha at syr.edu>

________________________________
From: dhcp-users-bounces+rgrimsha=syr.edu at lists.isc.org [dhcp-users-bounces+rgrimsha=syr.edu at lists.isc.org] on behalf of Jason Gerfen [jason.gerfen at gmail.com]
Sent: Friday, June 01, 2012 8:20 AM
To: Users of ISC DHCP
Subject: Re: Wrong gateway when using class in a subnet

You can however implement allow/deny statements within your subnet declaration specifying the class you wish to allow/deny

On Fri, Jun 1, 2012 at 5:44 AM, Randall C Grimshaw <rgrimsha at syr.edu<mailto:rgrimsha at syr.edu>> wrote:

not a bug, but perhaps a misunderstanding of the parser.

you must keep the class definitions out of the subnets definitions.

for the parser there is no relationship so you have effectively created a duplication

which results in a collision.



Randall Grimshaw rgrimsha at syr.edu<mailto:rgrimsha at syr.edu>

________________________________
From: dhcp-users-bounces+rgrimsha=syr.edu at lists.isc.org<mailto:syr.edu at lists.isc.org> [dhcp-users-bounces+rgrimsha=syr.edu at lists.isc.org<mailto:syr.edu at lists.isc.org>] on behalf of Nuno Marques [nmm at ul.pt<mailto:nmm at ul.pt>]
Sent: Friday, June 01, 2012 7:28 AM
To: Users of ISC DHCP
Subject: Wrong gateway when using class in a subnet

Hi all,

I'm using dhcp-4.1.1-25.P1.el6_2.1.i686 on RHEL6, and have somthing like this:

subnet 10.99.112.0 netmask 255.255.255.0{
                option routers 10.99.112.1;

        class "Cisco-AP-c1140" {
        match if option vendor-class-identifier = "Cisco AP c1140";
        option vendor-class-identifier "Cisco AP c1140";
        vendor-option-space Cisco_LWAPP_AP;
        option Cisco_LWAPP_AP.server-address 10.99.4.221; }

....
}

subnet 10.99.113.0 netmask 255.255.255.0{
                option routers 10.99.113.1;

        class "Cisco-AP-c1140" {
        match if option vendor-class-identifier = "Cisco AP c1140";
        option vendor-class-identifier "Cisco AP c1140";
        vendor-option-space Cisco_LWAPP_AP;
        option Cisco_LWAPP_AP.server-address 10.99.4.221; }

....
}

The problem is, an AP on the second subnet will receive the gateway from the first (10.99.112.1).
My guess is DHCP is giving the first 'option router' that matches the class.

If I put the class declaration on the top of the configuration and remove it from every subnet it works as expected, but I got several subnets that shouldn't have this configuration, so I want to keep it out of the general configuration.

Is this a bug?

Thanks,

--
Nuno Miguel Lopes Marques
Núcleo de Administração de Sistemas -  Área de Sistemas e Comunicações - Serviços Tecnológicos

E. nmm at ul.pt<mailto:nmm at ul.pt>
T. +351 21 044 34 23<tel:%2B351%2021%20044%2034%2023> - Ext. 30243
M. 924 138 406
Morada
Alameda da Universidade, Cidade Universitária
1649-004 Lisboa

www.sp.ul.pt<http://www.sp.ul.pt/>

[cid:part3.03090109.04030302 at ul.pt]




_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/dhcp-users



--
Jason Gerfen
jason.gerfen at gmail.com<mailto:jason.gerfen at gmail.com>

http://www.github.com/jas-
http://phpdhcpadmin.sourceforge.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120601/101425b9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT00001.jpg
Type: image/jpeg
Size: 3286 bytes
Desc: ATT00001.jpg
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120601/101425b9/attachment-0001.jpg>


More information about the dhcp-users mailing list