DHCP server to handle hostname.
Rick Dicaire
kritek at gmail.com
Thu Sep 22 18:22:55 UTC 2016
Here's something I use when hosts don't send a hostname.
In global options:
ddns-hostname = pick (option fqdn.hostname, option host-name, concat
("ddns-", binary-to-ascii (10, 8, "-", leased-address)));
option host-name = config-option server.ddns-hostname;
Resulting ddns hostname is ddns-xxx-xxx-xxx-xxx.domain_name
Edit to suit.
On Thu, Sep 22, 2016 at 1:48 PM, <durwin at mgtsciences.com> wrote:
> I have some embedded devices with minimal OS. I am not sure the DHCP
> client has compiled ability to send hostname. I have seen this used while
> searching for help on this subject.
>
> host e2rb_004 {
> option host-name "e2rb_004";
> ddns-hostname "e2rb_004";
> hardware ethernet 00:10:60:31:b2:a0;
> fixed-address 172.23.93.38;
> }
>
>
> This does not add the hostname in DNS. My configuration does work as a
> normal DDNS. Any machine which sends it's hostname when requesting an IP
> *does* get added into DNS records. What I would like to do is to handle
> those embedded devices which do *not* send hostname.
>
> Here is the DHCPD options.
>
>
> === dhcpd.conf ===
> authoritative;
>
> ddns-update-style interim;
> ddns-updates on;
> ddns-domainname "mydomain.com";
> ddns-rev-domainname "in-addr.arpa.";
> update-static-leases on;
> ignore client-updates;
> one-lease-per-client true;
>
> # WPAD definition
> option wpad code 252 = text;
>
> key MSI_DHCPD_UPDATER {
> algorithm hmac-md5;
> secret "mysecret";
> };
>
> zone mydomain.com. {
> primary 127.0.0.1;
> key MSI_DHCPD_UPDATER;
> }
>
> zone 93.23.172.in-addr.arpa. {
> primary 127.0.0.1;
> key MSI_DHCPD_UPDATER;
> }
>
> subnet 172.23.93.0 netmask 255.255.255.0 {
> option routers 172.23.93.1;
> option wpad "\n\000";
> option subnet-mask 255.255.255.0;
> option domain-name "mydomain.com";
> option domain-name-servers 172.23.93.3,172.23.93.9,198.59.115.2;
> option time-offset -25200; # Mountain Standard Time
> range dynamic-bootp 172.23.93.95 172.23.93.249;
> default-lease-time 57600;
> max-lease-time 57600;
> min-lease-time 57600;
> ddns-domainname "mydomain.com";
> }
>
>
> Any advice is appreciated. Thank you.
>
>
>
> Durwin F. De La Rue
> Management Sciences, Inc.
> 6022 Constitution Ave. NE
> Albuquerque, NM 87110
> Phone (505) 255-8611
>
>
> This email message and any attachments are for the sole use of the
> intended recipient(s) and may contain proprietary and/or confidential
> information which may be privileged or otherwise protected from disclosure.
> Any unauthorized review, use, disclosure or distribution is prohibited. If
> you are not the intended recipient(s), please contact the sender by reply
> email and destroy the original message and any copies of the message as
> well as any attachments to the original message.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
--
aRDy Music and Rick Dicaire present:
http://www.ardynet.com
http://www.ardynet.com:9000/ardymusic.ogg.m3u
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20160922/d5cf236f/attachment-0001.html>
More information about the dhcp-users
mailing list