<html><head><META content="text/html; charset=us-ascii" http-equiv="Content-Type">

<STYLE><!-- /* Style Definitions */ p.a1015750-3aa8-4b0e-8e0e-4acb576ae34a, li.a1015750-3aa8-4b0e-8e0e-4acb576ae34a, div.a1015750-3aa8-4b0e-8e0e-4acb576ae34a, table.a1015750-3aa8-4b0e-8e0e-4acb576ae34aTable {margin:0cm; margin-bottom:.0001pt;}div.Section1 {page:Section1;}--></STYLE>
</head><BODY>
<P CLASS="a1015750-3aa8-4b0e-8e0e-4acb576ae34a"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>Hi 
all,</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>Apologies if this 
has been asked & answered but I've spent the last few hours searching 
through the archives to no avail...</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>Scenario: I have 2 
branches each with its own default gateway, DNS servers etc... (lets call then 
"br1" & "br2")</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>The Windows machine 
names are all prefixed with the branch name (e.g. br1-john or br2-peter). The 
users regularly travel between the branches.</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>The dhcpd.conf will 
specify a "fixed-address" for each client of their specific branch based on MAC 
(this is all up and running already).</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>What I'm trying to 
achieve is a class match based on the first 4 characters of the users Windows 
machine name</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>something like the 
following</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2># branch 2 DHCP 
server</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2>      class "br1-clients" 
{<BR>                
match if 
(<BR>                  
(substring(option host-name,0,4) = "br1-") 
or<BR>                  
(substring(option host-name,0,4) = 
"BR1-"));<BR>        }</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2># branch 1 DHCP 
server</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><SPAN class=178530313-15052008><FONT 
face=Tahoma size=2>      class "br2-clients" 
{<BR>                
match if 
(<BR>                  
(substring(option host-name,0,4) = "br2-") 
or<BR>                  
(substring(option host-name,0,4) = 
"BR2-"));<BR>        
}</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma 
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Tahoma size=2><SPAN class=178530313-15052008>Then I need a pool 
on each to assign from based on the class</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma size=2><SPAN class=178530313-15052008>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2>something like the 
following</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2># branch 2 DHCP 
server (plus all the other usual options like "option routers" etc local to each 
site)</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN><SPAN 
class=178530313-15052008>     pool 
{<BR>                        
allow members of 
"br1-clients";<BR>                        
allow 
known-clients;<BR>                        
max-lease-time 
86400;<BR>                        
default-lease-time 
43200;<BR>                        
range 10.10.10.1 10.10.10.61;<BR>     }</SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008>
<DIV><SPAN class=178530313-15052008><FONT face=Tahoma size=2># branch 1 
DHCP server (plus all the other usual options like "option routers" etc local to 
each site)</FONT></SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN><SPAN 
class=178530313-15052008>     pool 
{<BR>                        
allow members of 
"br2-clients";<BR>                        
allow 
known-clients;<BR>                        
max-lease-time 
86400;<BR>                        
default-lease-time 
43200;<BR>                        
range 10.10.11.1 10.10.11.61;<BR>     }</SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008>So what should happen then is that if a user 
from br1 visits br2 - the machine name starts with "br1-" and is therefore 
assigned an IP out of the 10.10.10 pool.</SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008>There seems to be a problem with this 
attempted config as my test machines are not getting assigned IP's from the pool 
- it doesn't even show anything in the log file while one of the machines is 
trying for an IP. I'm guessing that my problem lies with the "(substring(option 
host-name,0,4) = "br1-")". I'm using that because I found such an example on the 
net (it didn't stat whether it work though...) and I can't find any other 
option...</SPAN></DIV>
<DIV><SPAN class=178530313-15052008></SPAN> </DIV>
<DIV><SPAN class=178530313-15052008>This is not critical but certainly would 
make life a whole lot easier if it is possible as I'd also like to assign such 
pools for machines in the workshop being 
repaired/setup...</SPAN></DIV></SPAN></DIV></SPAN></FONT></DIV>
<P align=left><FONT 
size=2>Regards<BR>---------------------------------------------<BR></FONT><FONT 
size=2>Rhys McWilliams</FONT></P></BODY></HTML>
</P>
<P CLASS="a1015750-3aa8-4b0e-8e0e-4acb576ae34a"><FONT SIZE="2">*********************************************************************</FONT></P>
<P>Disclaimer</P>
<P>This message and any attachments are intended only for the use of the addressee(s) and may contain information that is privileged and/or confidential. If the reader of the message is not the intended recipient(s) or an authorized representative of the intended recipient(s), please do not use, copy, distribute this email or its attachments or take action based on them. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.</P>
<P>ADP Dealer Services South Africa, incorporated in the UK. Registration No. 1990/005462/10;</P>
<P>********************************************************************* </P><FONT></FONT></BODY></html>