Ipv6 hostname in dhclient.conf

Anjali Krishna krishnaanjali42 at gmail.com
Tue Jul 28 08:27:22 UTC 2020


Hi Bill Shirley,

   Thank you for the reply

    The code snippet which you have shared I tried under dhcpd.conf

The my_duid_hex  and my_duid variables are updating with the values

I tried with "send fqdn.hostname "test_dut"  " in dhclient.conf file.

But the hostname is not still updating in the lease file

What am I missing in client side?

On Tue, 28 Jul 2020, 1:49 am Bill Shirley, <bill at c3po.polymerindustries.biz>
wrote:

> You can save your own variables in the leases file for non-static leases:
> on commit {
>     if static {
> #        set is-static = " --> STATIC";
>     } else {
>         set is-static = "";
>         set my_duid = option dhcp6.client-id;
>         set my_duid_hex = pick-first-value(binary-to-ascii(16, 8, ":",
> option dhcp6.client-id), "");
>         set my_given_hostname = option fqdn.hostname;
>     }
> }
>
> Lease:
> ia-na "mbl\022\000\001\000\001\025Yy\267lbm\207\267\370" {
>   cltt 0 2020/07/12 12:45:07;
>   iaaddr 2001:xxxx:yyyy:40:50f7::ee {
>     binding state active;
>     preferred-life 9000;
>     max-life 14400;
>     ends 0 2020/07/12 16:45:07;
>     set ddns-rev-name = "<redacted>";
>     set ddns-dhcid =
> "\000\002\001\320F0\342\231\334\262\211\351u\023\260\207\200\240%\230\004ZD\035\370\221f\367E\225\245e\234\2154";
>     set ddns-fwd-name = "Karen-PC.example.com";
>     set my_MAC = "6c:62:6d:87:b7:f8";
>     set my_given_hostname = "Karen-PC";
>     set my_duid_hex = "0:1:0:1:15:59:79:b7:6c:62:6d:87:b7:f8";
>     set my_duid = "\000\001\000\001\025Yy\267lbm\207\267\370";
>     set member_of = "Microsoft";
>     set pool_type = "Microsoft";
>   }
> }
>
> Hope this helps,
> Bill
> On 7/27/2020 8:04 AM, Anjali Krishna wrote:
>
>
> Hi
>
>  I am using an embedded board with hostname "test_dut"[same under
> /etc/hostname]. I am testing ipv6 ans ipv4 using dhcpd on server side with
> - 6, - 4 options and client side I am using dhclient with - 6 and - 4
> option for ipv6 and ipv4 respectively.
>  Both the cases Ip assignment is happening without any trouble. But in
> order to extend our application feature we are providing the information of
> the connected devices to the user such as mac id, ip, hostname/client name
> etc. In ipv4 these information are provided under dhcpd.leases file. In
> case of ipv6 I am not able to find the hostname (test_dut) under the
> dhcpd6.leases files
>
> I tried with adding various options under dhclient.conf such as send
> host-name "test_dut" and edited the dhclient-script under /sbin and called
> set_hostname call under bound-renew-reboot section of ipv6. Still the
> server lease file is not updating the hostname for ipv6 . But hostname is
> updating for ipv4 connection.
>
> How can I resolve this issue?
>
> Regards,
> Anjali
>
> _______________________________________________
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> dhcp-users mailing listdhcp-users at lists.isc.orghttps://lists.isc.org/mailman/listinfo/dhcp-users
>
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20200728/ee9cc2ff/attachment-0001.htm>


More information about the dhcp-users mailing list