<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

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

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>I’m new to dhcpd servers, but I’d like to
know if it’s possible to filter devices on a vendor suboption, which
depends on the </span></font><span lang=EN-GB>vendor-class-identifier.<br>
I give an example of what I’d like in the following lines. <o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<div style='mso-element:para-border-div;border:inset 1.0pt;padding:5.0pt 5.0pt 5.0pt 5.0pt'><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>#codes device1<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>option space DEVICE1;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>option DEVICE1.suboption1 code 3 = text;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>option DEVICE1.suboption2 code 4 = unsigned integer 16;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>#codes device2 (la suboption1 est commune aux deux appareils, mais n'a pas le même numéro de code)<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>option space DEVICE2;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>option DEVICE2.suboption1 code 1 = text;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>option DEVICE2.suboption3 code 3 = ip-address;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>class "Device1" {<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    match  if  substring    (option  vendor-class-identifier, 0, 15) = "Name of Device1";<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    </span># Si l'appareil est de type DEVICE 1, le c'est le sous code 3 qui est testé<o:p></o:p></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>    </span></font><span lang=EN-GB>vendor-option-space DEVICE1;<o:p></o:p></span></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    match  if  substring    (option DEVICE1.suboption1, 0, 4) = "value1");<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>}<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>class "Device2" {<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    match  if  substring    (option  vendor-class-identifier, 0, 15) = "Name of Device2";<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    </span># Si l'appareil est de type DEVICE 2, le c'est le sous code 1 qui est testé<o:p></o:p></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>    </span></font><span lang=EN-GB>vendor-option-space DEVICE2;<o:p></o:p></span></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    match  if  substring    (option DEVICE2.suboption1, 0, 4) = "value1");<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>}<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>shared-network mynetwork{<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    option server.min-lease-time 600000;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    option server.default-lease-time 700000;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    option server.max-lease-time 800000;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    subnet 127.0.0.1 netmask 255.255.255.0 {<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>        option tftp-server-name "localhost";<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    }<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    pool {<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>        allow members of "Device1";<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>        allow members of "Device2";<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>        range 127.0.0.10 127.0.0.40;<o:p></o:p></span></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt'>    </span>}<o:p></o:p></font></pre><pre
style='border:none;padding:0cm'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>}<o:p></o:p></span></font></pre></div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<!-- END TEMPLATE: bbcode_code -->

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>The IPs and domain names are for the example only. In
each classes, I put 2 “match if”, and I know that this syntax is probably
not correct. I’m searching for the good one, I mean, a way to encapsulate
2 conditions of match, with “if …” if it exists, or
subclasses (but it seems to me that they are not done for that ?)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Thx for all<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Best regards<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Olivier</span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>