Assigning fixed and dynamic addresses via DHCP based on Option 82 and vendorclass
Anders Rosendal
anders at rosendal.nu
Sun Apr 13 17:57:01 UTC 2008
On Sun, 2008-04-13 at 16:46 +0100, Simon Hobson wrote:
> Anders Rosendal wrote:
>
> >I have configured a "shared-network" but did not put that in the
> >config since I regarded it as given for my configuration.
>
> We can't assume anything on this list !
>
> >The problem is when using the proposed configuration the
> >VoIP-devices matches my classes like "as07-Fa0/1", and assigns a
> >public IP. I would like to either add a third conditional statement
> >matching, or not matching the "voip vendor-class". Can a client
> >belong to more then one class?
>
> Yes
>
> >Are there a predictable order in which classes are assigned to a
> >request, or a class is mapped into a pool?
>
> No
>
> So in a case like this, where you have "class a does x, class b does
> y", then you have to make sure that the selection criteria for "a"
> and "b" are mutually exclusive if you want "x" and "y" to be.
>
>
>
Hi
The configuration is now working properly. I had an error in the
vendor-class identification which caused my problems. Below is the
working configuration:
class "VOIP_TA2S" {
match if(substring(option vendor-class-identifier, 0, 4) =
"voip");
}
class "as07-Fa0/1" {
match if(not (substring(option vendor-class-identifier, 0, 4) =
"voip") and substring (option agent.remote-id, 2, 4) = "as07" and suffix
(option agent.circuit-id, 1) = 3);
}
shared-network "my-network" {
subnet 172.31.253.0 netmask 255.255.255.0 {
option routers 172.31.253.1;
option subnet-mask 255.255.255.0;
option broadcast-address 172.31.253.255;
option tftp-server-name "172.31.253.10";
option bootfile-name "configfile.dat";
pool {
range 172.31.253.128 172.31.253.254;
allow members of "VOIP_TA2S";
}
}
subnet 1.2.3.0 netmask 255.255.255.0 {
option routers 1.2.3.1;
option subnet-mask 255.255.255.0;
option broadcast-address 1.2.3.255;
pool {
range 1.2.3.20;
allow members of "as07-Fa0/1";
}
}
}
Thanks for the help!
Regards Anders Rosendal
--
This message has been scanned for viruses and
dangerous content by MailScanner on mars.rosendal.nu,
and is believed to be clean.
More information about the dhcp-users
mailing list