Wrong gateway when using class in a subnet

Randall C Grimshaw rgrimsha at syr.edu
Fri Jun 1 11:44:38 UTC 2012


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 [dhcp-users-bounces+rgrimsha=syr.edu at lists.isc.org] on behalf of Nuno Marques [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 - 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]



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120601/13b683f5/attachment.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/13b683f5/attachment.jpg>


More information about the dhcp-users mailing list