RE: how to config class

Julie Xu xll40 at hotmail.com
Sat Nov 30 03:51:05 UTC 2013




Stier and expert


Great thanks, I have fixed my problem, by using your method.  

class ...
 match if A and B


And now I have another question, regards “server-identifier 10.2.2.10;”.Pl


My client need if the dhcp client is in subnet10.2.2.0/24, it do not get server-identifier value. so the client will automatically broadcast inside the subnet to get active PXE server.


Please advice how can I  set server-identifiew value to null? or how can I  let dhcp server give no value to this option?



Any comments will be appreciated


Thanks in advance


Julie

related original email:

==================
Message: 2
Date: Thu, 21 Nov 2013 15:42:33 +0000
From: "Simon Hobson"  <dhcp1 at thehobsons.co.uk>
To: Users of ISC DHCP  <dhcp-users at lists.isc.org>
Subject: RE: how to config class
Message-ID: <0B47B1D65F2EB20968520E6EB2D77A53E at thehobsons.co.uk>
Content-Type: text/plain; charset=us-ascii

"Stier, Matthew" wrote:
> Order?
> As written, both classes are true, so the later one overwrites the settings of the prior one.


No, order is not significant within the config file - at least, not in that way for class definitions. Some things are evaluated in a specific order, but that is implementation dependent and may change at any time without warning.


>  I need most subnets PXE server ip address as 10.1.1.10, and only subnet 10.2.2.0/24 need PXE server address as 10.2.2.10
> How can I write the class statement using two classes. I have tried netboot from my laptop on ip 10.2.2.100, but, I still get server-identifier 10.1.1.10.

> could anyone advice what I did wrong?

It's messy (especially if you start to extend it), but re-write the main class so as to exclude the other devices :

class ...
 match if A and B

class ...
 match if A and not B


> class "vlan418RIS" {
> # This is only for subnet 10.2.2.0/24 subnet
> # this dhcp server is on different subnet, the address 10.2.2.1 is relay agent - router
> match if ( binary-to-ascii(10,8, ".", packet(24,4)) = "10.2.2.1" and
> substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" );
> option vendor-class-identifier "PXEClient";
> server-identifier 10.2.2.10;
> }
>
> class "MicrosoftRIS" {
> # This is default, all my subnets using this class, except 10.2.2.0/24
> match if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient";
> option vendor-class-identifier "PXEClient";
> server-identifier 10.1.1.10;
> }
>
>
> subnet 10.2.2.0 netmask 255.255.255.0 {
> option routers 10.2.2.1;
> option broadcast-address 10.2.2.255;
> }
>
> Any comments will be appreciated
>
> Thanks in advance
>
> julie
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20131130/a68f6c9e/attachment.html>


More information about the dhcp-users mailing list