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.
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.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
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, <[hidden email]> 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.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
On the server, did you implement?: set my_given_hostname = option
fqdn.hostname;
It should be in the lease file even if it is blank.
Run tcpdump on the dhcp server to see exactly what is
sent/received: tcpdump -vv -e -n -i eth0 portrange
67-68 For IPv6. tcpdump -X -l -vv -e -n -i eth0
portrange 546-547
Bill
On 7/28/2020 4:27 AM, Anjali Krishna
wrote:
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, <[hidden email]>
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.
_______________________________________________
ISC funds the development of this software with paid support
subscriptions. Contact us at https://www.isc.org/contact/ for
more information.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
The dot after the com was missing after this change it did work.
On Tue, 28 Jul 2020, 4:28 pm Bill Shirley, <[hidden email]> wrote:
On the server, did you implement?: set my_given_hostname = option
fqdn.hostname;
It should be in the lease file even if it is blank.
Run tcpdump on the dhcp server to see exactly what is
sent/received: tcpdump -vv -e -n -i eth0 portrange
67-68 For IPv6. tcpdump -X -l -vv -e -n -i eth0
portrange 546-547
Bill
On 7/28/2020 4:27 AM, Anjali Krishna
wrote:
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, <[hidden email]>
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.
_______________________________________________
ISC funds the development of this software with paid support
subscriptions. Contact us at https://www.isc.org/contact/ for
more information.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
The dhclient has "dhcp6.name-servers" string under request in dhclient.conf
In dhclient-script under dhcpv6 section the name servers are being updated in /etc/resolv.conf. The default behaviour of the script is to write the new name-servers to the resolv.conf file overwriting the old contents. The overwriting of this file is not acceptable since it is having nameserver IP updated or used by LTE, ethernet in my testing environment.
So I tried to tweak the script a bit by removing the mv command and appending the dhcp6 name servers using echo command directly to resolv.conf than writing to a temp file.
Within the make_resolv_conf function as the last statement I displayed the content of resolv.conf. I executed the dhclient with - 6 and - v enabled. The client fetched the the new ip and print shows the nameserver is appended(cat /etc/resolv.conf)
By default the /etc/resolv.conf content was
nameserver 8.8.8.8
nameserver 8.8.4.4
The print (cat /etc/resolv.conf) showed the content as
namserver 2001:470:108:4::10
nameserver 8.8.8.8
nameserver 8.8.4.4
Once the dhclient stops successfully I opened the resolv.conf and the new servers were missing. It is having default IPs. What could be the reason for this behaviour.?
Who is refreshing the /etc/resolv.conf. I checked the dhclient-script but couldn't find any clue for this.
To confirm no other process updates the file, I killed the LTE process but the result was same. Other than dhclient-script how the resolv.conf is getting overwritten all the time? What am I missing?
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.