SV: remote-id

Glenn Satchell Glenn.Satchell at uniq.com.au
Mon Oct 20 12:00:13 UTC 2008


no need to convert to an ascii string first, just do a binary compare:

match if(binary-to-ascii(16, 8, ":", option agent.remote-id) = 
"0:30:4b:db:65:50");

match if(option agent.remote-id = 00:30:4b:db:65:50);

but sub-classes are a better way to achieve this. There's an example in the 
dhcpd.conf man page.

class "POOLA" {
  match option agent.remote-id;
}
# repeat these lines for every remote-id that you want to match this class
subclass "POOLA" 0:30:4b:db:65:50;

regards,
-glenn


>Subject: SV: remote-id
>Date: Sun, 19 Oct 2008 06:55:08 +0200
>From: "Anders Rosendal" <anders at rosendal.nu>
>To: <dhcp-users at isc.org>
>
>I interpret this as a question of remote-id in option 82.
>
> 
>
>0:30:4b:db:65:50 is mgmt-mac of switch A
>
>0:30:45:55:bb:80 is mgmt-mac of switch B
>
> 
>
>class "POOLA" {
>
>        match if(binary-to-ascii(16, 8, ":", option agent.remote-id) = 
"0:30:4b:db:65:50");
>
>}
>
> 
>
>class "POOLB" {
>
>        match if(binary-to-ascii(16, 8, ":", option agent.remote-id) = 
"0:30:45:55:bb:80");
>
>}
>
> 
>
>pool {
>
>        range 10.0.0.10 10.0.0.254;
>
>        allow members of "POOLA";
>
>}
>
> 
>
>pool {
>
>        range 172.31.0.10 172.31.0.254;
>
>        allow members of "POOLB";
>
>}
>
> 
>
>Regards Anders R
>
> 
>
> 
>
>Från: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] För abhijit 
khadatare
>Skickat: den 17 oktober 2008 12:54
>Till: dhcp-users at isc.org
>Ämne: remote-id
>
> 
>
>hello everyone,
> i want to configure dhcp server on the basis of remote-id
>it something like that
>if remote-id is xx:yy:xx:yy:xx:yy
>then give ip from pool---A
>if remote-id is yy:xx:yy:xx:yy:xx
>then give ip from pool--B
>
>
>-- 
>This message has been scanned for viruses and 
>dangerous content by MailScanner <http://www.mailscanner.info/>  at 
>mars.rosendal.nu, and is believed to be clean. 
>
>
>-- 
>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