Configuration by subclass and subnet
Joao E Pereira Jr
joao at cti.ufu.br
Fri Oct 19 13:17:17 UTC 2012
On Thursday 18 October 2012 18:28:05 Sten Carlsen wrote:
> Ok, good to know. I was afraid that was going to be the answer. Well,
> one more thing to avoid, though it should not be that hard.
>
> Thanks for the enlightenment.
>
> On 18/10/12 17:24, Simon Hobson wrote:
> > Sten Carlsen wrote:
> >> Right, my question was also more generic, IF for some obscure reason
> >> I decide it makes sense to have two classifications based on X and Y
> >> , so I would have, say:
> >>
> >> classes X1, X2, X3, ...
> >> classes Y1, Y2, Y3, ...
> >>
> >> All devices belong to one of the Xn classes and to one of the Yn
> >> classes. This could give me some freedom to use allow/deny to
> >> allocate from pools, etc.
> >>
> >> I happen to put option Z in both class X3 and Y2 (my mistake or
> >> something very convoluted) how would dhcp decide which option Z to
> >> use? the one from X3 or the one from Y2?
> >
> > It's undefined. There may be an implementation specific ordering, but
> > relying on that would be "poor practice" to say the least.
Thanks for all answers. I am using dhcp 4.1.1 and rendered the following
conclusions from my tests.
1)If I configure:
subnet A {
option switch-controller one;
}
subnet B {
option switch-controller two;
}
Works fine, I am currently using this configuration. Clients from subnet A get
controller one and clients from subnet B
get controller two. The drawback is that all clients (regardless device type)
get option 43 without side effects.
2)If I configure:
subnet A {
class ap {
match if option vendor-class-identifier = "ArubaAP";
option switch-controller one;
}
}
subnet B {
class ap {
match if option vendor-class-identifier = "ArubaAP";
option switch-controller two;
}
}
Only the access points from subnets A and B get controller one, when access
points from subnet B should get controller two. Somehow class ap is assuming
global scope, so device configuration is always the first matched class, even
with different class names.
3) If I configure:
class vendor-classes {
match option vendor-class-identifier;
}
subclass vendor-classes ap {
option vendor-class-identifier "ArubaAP";
option switch-controller one;
}
subnet A {
}
or
subnet B {
subclass vendor-classes ap {
option vendor-class-identifier "ArubaAP";
option switch-controller two;
}
}
I got the same bahavior of configuration 2. So, no matter scope class is
declared, it is interpreted in global scope and all devices get the same
controller. Also tested group some subnets without sucess. My dhcpd.conf is
composed from 130 files using include, maybe this could be a problem (not
tested yet).
--
Att,
João E. Pereira Jr
Analista de TI
Universidade Federal de Uberlandia
Divisao de Redes - Centro de Tecnologia da Informacao
Av. Para 1720, Bloco 2Y, Sala 19 - Umuarama
Uberlandia - MG - CEP 38400-902 - CP 592
Cel: 34 9136 3196
Fone: 34 3218 2519
VoIP: 1181 3003
More information about the dhcp-users
mailing list