<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" 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"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE>@font-face {
font-family: Calibri;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 70.85pt 70.85pt 70.85pt 70.85pt; }
P.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
LI.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
DIV.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.E-postmall17 {
COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-compose
}
.MsoChpDefault {
mso-style-type: export-only
}
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 vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=562295804-19012008><FONT face=Tahoma
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562295804-19012008><FONT face=Tahoma
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=562295804-19012008><FONT face=Tahoma
color=#0000ff size=2>Frank</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 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!<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<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>