locked
Stateful DHCPv6 Dynamic DNS registration - hostname changed RRS feed

  • Question

  • Hello, everyone

    I have a network where IPv4 and Stateful IPv6 should be running side by side. For the sake of simplicity I will omit non-important details and will focus only on what is relevant:

    Both DHCPv4 and DHCPv6 are running on the Windows Server. Both services are configured to register A (or AAAA) and PTR records regardless of whether client requested it or not. DHCPv6 is stateful: router in the network sends RA messages with 'M' flag = 1 and 'O' flag = 1. Clients obtain addresses and optional settings from DHCP correctly.

    DNS registration for existing machines - ones, which existed before IPv6 has been enabled in the network - works perfectly fine. Both IPv4 and IPv6.

    The strange behavior I am seeing only related to "fresh" machines. Windows. We are deploying new Virtual Machines from existing template. The template has standalone Windows Server 2019 with hostname being preconfigured to 'template'. The behavior I am seeing is this:

    1. I create new VM off that template and boot it. It receives both ipv4 and ipv6 addresses.

    2. I rename that machine to whatever is required and reboot it.

    3. At this stage A-records are created by DHCPv4 server correctly using current machine name. AAAA-records are not created.

    Upon further examination, I have noticed that DHCPv6 lease still has Hostname field set to 'template' instead of the current server name and therefore DHCPv6 server keeps attempting to register AAAA-record using 'template' hostname.

    If I remove the DHCPv6 lease and reboot the client machine, new lease is created and this time it has correct Hostname in it.

    My questions are:

    - Is this intended behavior?

    - How do I make DHCPv6 refresh Hostname of the lease without deleting the lease each time?


    • Edited by Vodalus Monday, September 30, 2019 1:41 PM spelling
    Monday, September 30, 2019 1:33 PM

All replies

  • Hi Vodalus,
     
    Thanks for your posting in this forum.
    Based on my experience, when DHCP client restarts, it will renew its DHCP lease. According to our description, your DHCP client had renewed its lease after you renamed and restarted the client.
    Please check if the DHCP IPv6 lease expiration update when you rename and restart the client.
    I want to confirm if DHCP client renew its IPv6 lease when there is a IPv6 lease already existing.
     
    Additionally, I will do a test in my lab, it will take some time. If there is any update, I will reply as soon as possible.
     

    Appreciate your patience.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, October 1, 2019 9:49 AM
  • Thank you for your reply.

    I haven't checked timestamps of the lease, but you are absolutely right, it is very important piece of information.

    Let's check. This is the lease details created when Virtual Machine boots for the first time with `template` hostname:

    IPAddress             : <masked>
    Prefix                : <masked>
    AddressType           : IANA
    ClientDuid            : 00-01-00-01-25-1b-40-09-00-15-5d-80-ad-d9
    Description           :
    HostName              : template
    Iaid                  : 117448152
    LeaseExpiryTime       : 10/13/2019 12:26:24 PM
    PSComputerName        :
    CimClass              : root/Microsoft/Windows/DHCP:DhcpServerv6Lease
    CimInstanceProperties : {AddressType, ClientDuid, Description, HostName...}
    CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties

    Now I rename the computer and send it to reboot (gracefully, using OS, no hard reset or other hard methods) and let's check lease details again:

    IPAddress             : <masked>
    Prefix                : <masked>
    AddressType           : IANA
    ClientDuid            : 00-01-00-01-25-1b-40-09-00-15-5d-80-ad-d9
    Description           :
    HostName              : template
    Iaid                  : 117448152
    LeaseExpiryTime       : 10/13/2019 12:33:05 PM
    PSComputerName        :
    CimClass              : root/Microsoft/Windows/DHCP:DhcpServerv6Lease
    CimInstanceProperties : {AddressType, ClientDuid, Description, HostName...}
    CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties
    As can be seen from the output, the LeaseExpiryTime has indeed been updated.
    Tuesday, October 1, 2019 10:34 AM