<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I use fqdn.fqdn:<br>
<font color="#993300"><tt>subnet 192.168.4.0 netmask 255.255.255.0 {</tt><tt><br>
</tt><tt> ddns-updates on;</tt><tt><br>
</tt><tt> ddns-domainname "example.com";</tt><tt><br>
</tt><tt> option domain-name "example.com";</tt><tt><br>
</tt><tt> option fqdn.fqdn = concat(config-option
server.ddns-hostname, ".", config-option
server.ddns-domainname);</tt><tt><br>
</tt></font><br>
You didn't post hw_mac_short. You could use something like this:<br>
<font color="#993300"><tt>ddns-hostname = concat("mta-",
binary-to-ascii(16, 8, "", substring(hardware, 4, 3)));</tt><tt><br>
</tt></font>This uses the last three bytes of the MAC address.
Put this before the subnet definition.<br>
<br>
Bill<br>
<br>
<div class="moz-cite-prefix">On 8/30/2019 4:06 PM, Dave M wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACx_ihGMNesfAXhnLBjpegM88h-5A_qtdxQ1iqJQ+RApH1n_=Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I have clients (eMTA) who request a hostname parameter. It
is easy to create static entries and provide clients with an
hostname back but I can't manage to do it dynamically.</div>
<div><br>
</div>
<div>I have the rest of my configuration working fine except
that one line:</div>
<div><br>
</div>
<div> subnet 172.16.52.0 netmask 255.255.254.0<br>
{<br>
allow leasequery;<br>
option routers 172.16.53.254;<br>
option broadcast-address 172.16.53.255;<br>
option domain-name-servers 172.16.64.15 ;<br>
ddns-hostname = concat("mta-", hw_mac_short);<br>
ddns-domainname "<a href="http://emta.lab.com"
moz-do-not-send="true">emta.lab.com</a>.";<br>
host-name = concat("mta-", hw_mac_short);
-----> not working<br>
option domain-name "<a
href="http://emta.lab.com" moz-do-not-send="true">emta.lab.com</a>";<br>
filename = concat("config/mta-", hw_mac_short,
".cfg");<br>
pool<br>
{<br>
#pool: MTA 172.16.52.1 172.16.53.253<br>
range 172.16.52.1 172.16.53.253;<br>
<br>
allow members of "MTA";<br>
}<br>
}</div>
<div><br>
</div>
<div>If I hardcode the host-name, then the DDNS works fine and
gets created based on the mac (variable hw_mac_short) but I
can't figure out how to return option 12 dynamically to
clients requesting it.</div>
<div><br>
</div>
<div>I'm testing this on ISC DHCP 4.4.1</div>
<div><br>
</div>
<div>Is there a trick for that?</div>
<div><br>
</div>
<div>Dave M.<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
</blockquote>
</body>
</html>