Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: Ipv6 namservers and dhclient-script (Anjali Krishna)
   2. Ipv6 dhclient-script and namservers (Anjali Krishna)


----------------------------------------------------------------------

Message: 1
Date: Tue, 4 Aug 2020 08:52:51 +0530
From: Anjali Krishna <krishnaanjal...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: Ipv6 namservers and dhclient-script
Message-ID:
        <CAP6u7k_mbkq-dgbn5G=oc_azcaybrnn59c8cjg0zmm_cblu...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

  I am behind the dhclient-script for past the two days which updates the
/etc/resolv.conf. Let me explain the scenario

The dhcp server is sending the ipv6 dhcp nams server to the client. The
dhcp server has the name server in the sever conf file as below

subnet6 2001:470:108:4::2/64 {

...........?......................................

option dhcp6.name-servers 2001:470:108:4::10;

..................................................

}

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?

Any help would be much appreciated

On Mon, 27 Jul 2020, 5:34 pm Anjali Krishna, <krishnaanjal...@gmail.com>
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20200804/62c746a3/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 4 Aug 2020 08:55:59 +0530
From: Anjali Krishna <krishnaanjal...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Ipv6 dhclient-script and namservers
Message-ID:
        <cap6u7k_vtjrfkw6hfqovkkmtkoj7bdx9p6peu2xp8-g9kf5...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

  I am behind the dhclient-script for past the two days which updates the
/etc/resolv.conf. Let me explain the scenario

The dhcp server is sending the ipv6 dhcp nams server to the client. The
dhcp server has the name server in the sever conf file as below

subnet6 2001:470:108:4::2/64 {

...........?......................................

option dhcp6.name-servers 2001:470:108:4::10;

..................................................

}

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?

Any help would be much appreciated

Regards,
Anjali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20200804/d1712a81/attachment-0001.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
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@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 142, Issue 3
******************************************

Reply via email to