<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Oformaterad text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.E-postmall17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-postmall18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.OformateradtextChar
        {mso-style-name:"Oformaterad text Char";
        mso-style-priority:99;
        mso-style-link:"Oformaterad text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=SV link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText><span lang=EN-US>Okeay..thanks. I'm bit of a newbie,
mostly a layer 2 guy :) So how should I do? </span>An configure example would
be nice.<o:p></o:p></p>

<p class=MsoPlainText><o:p> </o:p></p>

<p class=MsoPlainText>//ME<o:p></o:p></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Från:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> dhcp-users-bounce@isc.org
[mailto:dhcp-users-bounce@isc.org] <b>För </b>Frank Bulk<br>
<b>Skickat:</b> den 19 januari 2008 05:59<br>
<b>Till:</b> dhcp-users@isc.org<br>
<b>Ämne:</b> RE: Extracting agent.circuit-id and compare to dhcp leases!<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>I think most people would recommend generating an include file from
your database once an hour or so.  Then it should be possible to do what
you describe.</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>Frank</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US
style='font-size:12.0pt;font-family:"Times New Roman","serif"'>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
dhcp-users-bounce@isc.org [mailto:dhcp-users-bounce@isc.org] <b>On Behalf Of </b>Mattias
Ellerot<br>
<b>Sent:</b> Friday, January 18, 2008 8:13 AM<br>
<b>To:</b> 'dhcp-users@isc.org'<br>
<b>Subject:</b> Extracting agent.circuit-id and compare to dhcp leases!</span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Hi!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Now when I managed to extract
agent.circuit-id I wan’t it to compare the agent.circuit-id with a list that
defines what IP the customer should have. To begin with it would be enough with
a text file but preferable would be a connection to a mysql database.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>For instance have we a provisioning system
that defines the agent.circuit-id on the customer port and we are able to set a
specific IP for it also. I’m waiting for the table indexes so I know what I
need to pick out from the db, but for now I need to see that the DHCP server is
able to set a static ip through DHCP. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Here’s the test config from dhcpd.conf<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>log-facility local7;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>ddns-update-style none;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>authoritative;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>option domain-name "bbtnet.se";<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>option domain-name-servers 77.110.38.205,
85.11.1.11;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>default-lease-time 28800;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>max-lease-time 28800;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US># Privat kunder - Tranemo<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>subnet 77.110.36.0 netmask 255.255.255.0 {<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
option domain-name "pp.tran.bbtnet.se";<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
option subnet-mask 255.255.255.0;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
option routers 77.110.36.1;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>       
log ( info, concat( "Lease for ", binary-to-ascii (10, 8,
".",  leased-address), " is allocated to customer: ",
option agent.circuit-id));           
allow client-updates;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
ddns-updates off;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
default-lease-time 28800;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
range 77.110.36.2 77.110.36.254;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                            
}<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Another thing, if the customer number is
not in the list it shouldn’t get an IP.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.5pt'>With my best regards<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.5pt'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.5pt'>Mattias Ellerot<o:p></o:p></span></p>

</div>

</body>

</html>