<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Sans";
        panose-1:2 11 6 2 4 5 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Here is a snip-it of my dhcpd.conf file  from the switch, the network admin sets the option agent.circuit-id to the hostname that the hardware should receive.  Everything else is handled by PXEBoot and DHCPd.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m posting this because I wasn’t able to find any really good examples, and I was looking for some possible comments on if it is the best way to handle this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#<o:p></o:p></p>
<p class="MsoNormal"># DHCP Server Configuration file.<o:p></o:p></p>
<p class="MsoNormal">#   see /usr/share/doc/dhcp*/dhcpd.conf.sample<o:p></o:p></p>
<p class="MsoNormal">#<o:p></o:p></p>
<p class="MsoNormal">ddns-update-style none;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">option space pxelinux;<o:p></o:p></p>
<p class="MsoNormal">option pxelinux.magic      code 208 = string;<o:p></o:p></p>
<p class="MsoNormal">option pxelinux.configfile code 209 = text;<o:p></o:p></p>
<p class="MsoNormal">option pxelinux.pathprefix code 210 = text;<o:p></o:p></p>
<p class="MsoNormal">option pxelinux.reboottime code 211 = unsigned integer 32;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># Needed for dhcp 3.0.5<o:p></o:p></p>
<p class="MsoNormal">next-server x.x.x.18; # TFTP Server<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># VLAN 1 is for VMs<o:p></o:p></p>
<p class="MsoNormal"># VLAN 2<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.36" { match if option agent.circuit-id="hostname1:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.37" { match if option agent.circuit-id="hostname2:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.38" { match if option agent.circuit-id="hostname3:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.39" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.40" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.41" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.42" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.43" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.44" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.45" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.46" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.47" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.48" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal">class "static-x.x.x.49" { match if option agent.circuit-id="HOSTNAME:switch2"; }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">shared-network eth0 {<o:p></o:p></p>
<p class="MsoNormal">        not authoritative;<o:p></o:p></p>
<p class="MsoNormal">        use-host-decl-names true;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        site-option-space "pxelinux";<o:p></o:p></p>
<p class="MsoNormal">        option pxelinux.magic f1:00:74:7e;<o:p></o:p></p>
<p class="MsoNormal">        option pxelinux.reboottime 10;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        if exists dhcp-parameter-request-list {<o:p></o:p></p>
<p class="MsoNormal">                option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);<o:p></o:p></p>
<p class="MsoNormal">        }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        option host-name = substring(option agent.circuit-id, 0, 9);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        log (info, "client requested");<o:p></o:p></p>
<p class="MsoNormal">        log (info, concat("raw circuit-id = ", option agent.circuit-id));<o:p></o:p></p>
<p class="MsoNormal">        log (info, concat("parsed circuit-id = ", substring(option agent.circuit-id, 0, 9)));<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        subnet x.x.x.0 netmask 255.255.255.224 {<o:p></o:p></p>
<p class="MsoNormal">                option domain-name "example.com";<o:p></o:p></p>
<p class="MsoNormal">                option subnet-mask      255.255.255.224;<o:p></o:p></p>
<p class="MsoNormal">                option routers    x.x.x.1;<o:p></o:p></p>
<p class="MsoNormal">                option domain-name-servers x.x.y.12, x.x.y.11;<o:p></o:p></p>
<p class="MsoNormal">                filename "images/base/boot/pxelinux.0";<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">                option root-path "x.x.x.18:/tftpboot/images/base";<o:p></o:p></p>
<p class="MsoNormal">                option pxelinux.configfile "pxelinux.cfg";<o:p></o:p></p>
<p class="MsoNormal">                option pxelinux.pathprefix "/images/base/boot/";<o:p></o:p></p>
<p class="MsoNormal">        }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">        pool { range x.x.x.36; allow members of "static-x.x.x.36"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.37; allow members of "static-x.x.x.37"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.38; allow members of "static-x.x.x.38"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.39; allow members of "static-x.x.x.39"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.40; allow members of "static-x.x.x.40"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.41; allow members of "static-x.x.x.41"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.42; allow members of "static-x.x.x.42"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.43; allow members of "static-x.x.x.43"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.44; allow members of "static-x.x.x.44"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.45; allow members of "static-x.x.x.45"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.46; allow members of "static-x.x.x.46"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.47; allow members of "static-x.x.x.47"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.48; allow members of "static-x.x.x.48"; }<o:p></o:p></p>
<p class="MsoNormal">        pool { range x.x.x.49; allow members of "static-x.x.x.49"; }<o:p></o:p></p>
<p class="MsoNormal">} #end eth0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">--<o:p></o:p></p>
<p class="MsoNormal"><b>Bill Warner<o:p></o:p></b></p>
<p class="MsoNormal">Linux/Unix/VMWare/Storage Systems Administrator<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Lucida Sans","sans-serif"">Early <span style="color:red">
Warning</span></span> Services, LLC<o:p></o:p></p>
<p class="MsoNormal">Tel:  480-656-6901<o:p></o:p></p>
<p class="MsoNormal">Mob: 602-908-0784<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:navy">Fax:  480-656-5001<o:p></o:p></span></p>
<p class="MsoNormal">Email: <span style="font-size:10.0pt;color:navy"><a href="mailto:bill.warner@early-warning.com" title="mailto:bill.warner@early-warning.com"><span style="color:blue">bill.warner@early-warning.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:navy"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:black">--------------------- This e-mail transmission may contain confidential and/or private information, which is the property of the sender. The information in this
 e-mail or attachments thereto is intended for the attention and use only of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, copying, or distribution of the contents of this e-mail transmission, or the taking
 of any action in reliance thereon or pursuant thereto, is strictly prohibited. Should you have received this e-mail in error, please contact the sender and delete and destroy all copies of the original message.--------------------</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>