<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 HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 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;}
span.E-postmall17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@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=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>