complex classes
Andrey Joukov
jav at dev.aelita.com
Fri Aug 31 17:44:30 UTC 2007
Hi Gents,
Could you please explain, how can I do my conf with classes and
subclasses ?
Now I have approx the following configuration:
Flat network 10.0.0.0/8
10.1.0.0/16 - servers, user's computers
10.2.0.0/16 - pool for Virtual Machines (VM)
I match a VM client by first 3 octets of the mac address.
class "vmware-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:50:56);
}
class "vmware-clients-beta" {
match if substring(hardware, 0, 4) = concat("\001", 00:0c:29);
}
# virtual server
class "virtsrv-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:03:ff);
}
subnet 10.0.0.0 netmask 255.0.0.0 {
pool {
range 10.2.1.1 10.2.10.254
allow members of "vmware-clients";
allow members of "vmware-clients-beta";
allow members of "virtsrv-clients";
}
}
I would like to split the pool 10.2.0.0/16 for two parts:
10.2.0.0/17 -- pool for VMware machines on users PC. Users can run
local Vmware Workstation or Virtual PC/Server
10.2.128.0/17 - pool for VMware machines on dedicated VM servers
All servers connected to the specific switches (I know agent.remote-ID).
How can I create a complex class/subclass for assigning ip address
from appropriate pool ?
I.e. if VM runs on users pc, ip address should be obtained from pool
10.2.0.0/17.
If VM runs on dedicated VM server, ip address should be obtained from pool
10.2.128.0/17.
I tried to change my configuration:
Created a copy of the classes for VM servers:
class "vms-vmware-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:50:56) and agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
class "vms-vmware-clients-beta" {
match if substring(hardware, 0, 4) = concat("\001", 00:0c:29) and agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
class "vms-virtsrv-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:03:ff) and agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
But the existing classes for users should be changed too. VM should not match into "vms-*" classes.
I.e. there should be something like that:
class "vmware-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:50:56)
and not agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
class "vmware-clients-beta" {
match if substring(hardware, 0, 4) = concat("\001", 00:0c:29)
and not agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
# virtual server
class "virtsrv-clients" {
match if substring(hardware, 0, 4) = concat("\001", 00:03:ff)
and not agent.remote-ID = 0:6:0:13:c4:92:e0:0;
}
Any comments ? I don't check that.
Is there the best solution ?
Is it possible to create one class for each group of vm clients ? How?
Thanks,
--
Andrey
More information about the dhcp-users
mailing list