Wildcard hardware address syntax

HAWKER, Dan dan.hawker at astrium.eads.net
Thu Aug 3 11:30:11 UTC 2006


Hi All,

Have a DHCPD 3.0.2 server running on FC4. Runs fine and is extensively used.

Is there a way of using a wildcard to grab a group of network cards and
allocate them to a particular address pool (& hence subnet/group)??

Reason...
We have a project ongoing that will be used by some developers to test using
VMware the booting and application of some embedded devices via PXE.
Presently this works fine, however we presently have to explicitly set some
parameters and I'd like to make it all a bit more automated.

I have distributed a basic VMware config that is setup as required. When you
*startup* a pre-existing image it will ask if you wish to reset the MAC
address and such like. Which we'd obviously need to do. Unfortunately this
uses a pretty random algorithm, so other than going to the user and getting
the automatically-generated MAC address, there isn't a way of knowing the
MAC addresses at the start. A small *area* of hostnames have been allocated
to specific IP addresses on our DNS box (BIND).

Obviously at this point, the MAC address is unknown to the DHCPD server,
however VMware MAC addresses are generated with the following syntax...
00:0c:29:xx:xx:xx

I have setup a class which I *think* sees this and hence uses a particular
pool of addresses. This seems to work, however unless I add the full MAC
address to a host declaration, it fails to allocate the address and boot.
Have tried both within and without a group declaration (we group our hosts
per PXE config). The subnet/class/hosts etc for this area of my DHCPD config
is below...

Later as this becomes used more, I'd like to add Dynamic updating of the DNS
too, however at the moment, I'd be happy with just this :)

Any ideas???

Dan

###### Start of dhcpd.conf file #######

# Global
<snip>
# have some standard global settings set. Just to ensure pxe works, etc.
This does so, so have not included
</snip>

# Class to match vmware MAC addresses
class "vmware" {
	match if substring (hardware,1 ,5) = 00:0c:29;
	}

shared-network pms {
	default-lease-time	3600;
	max-lease-time		43200;

# vmware subnet
subnet 172.30.0.0 netmask 255.255.240.0 {
	option routers		172.30.15.254;
	option subnet-mask	255.255.240.0;
	option domain-name 	"local";
	option domain-name-servers	192.168.203.238, 192.168.203.240;
	option ntp-servers	192.168.203.92
	default-lease-time	3600;
	max-lease-time		7200;
#close subnet
}

#pools#
# vmware pool
pool {
	allow members of "vmware";
	range 172.30.1.1 172.30.1.50;
	}

#close shared-network
}

# group to apply PXE attributes
group {
	next-server voyager;
	filename "pxelinux.0";
	use-host-decl-names	on;

host vmware1 {
	hardware ethernet	00:0c:29:09:fc:cd;
	fixed-address	vmware1.local;
	}
host vmware2 {
#	hardware ethernet	00:0c:29:09:fc:cd;
	fixed-address	vmware2.local;
	}
#close group
}

########### EOF ###############

This email is for the intended addressee only.
If you have received it in error then you must not use, retain, disseminate or otherwise deal with it.
Please notify the sender by return email.
The views of the author may not necessarily constitute the views of Astrium Limited.
Nothing in this email shall bind Astrium Limited in any contract or obligation.

Astrium Limited, Registered in England and Wales No. 2449259
Registered Office: Gunnels Wood Road, Stevenage, Hertfordshire, SG1 2AS, England


More information about the dhcp-users mailing list