Windows: Only register primary IP Address in DNS


if you want to change the IP Address (new Address is in the same subnet) a of Windows Server by a minimal downtime for the users?

In pure Active Directory domains this is not a problem because the server itself updates its A Record at the DNS server and the Active Directory replicates the entry immediately.
In large environments with a heterogeneous DNS structure the TTL of the DNS entry respectively of the DNS zone becomes very important, because the entry is cached for this time by the requesting server, so the time when the new DNS A record reaches  each DNS Server can take some time.

My approach is to add the new IP Address as a secondary IP Address to the Network interface of the server. But when you add the additional IP Address with the GUI , both addresses where registered in DNS. This is not what we want 🙁

Solution is to add the IP Address by the netsh command. netsh supports the skipassource option, which prevents Windows to use this address for outgoing connections and from registering the IP Address in DNS.

Example: The old IP Address is, the new address is

In the first step add the new IP address as the secondary address of the interface and wait until the DNS knows both.

C:\>nslookup YourHostName
Server:  dns.domain.local

Name:    YourHostName.domain.local

For the next 2 steps the server is temporary not reachable from the network!

The 2nd step is to delete the secondary address and set it as the primary address.  This can by done by GUI.

And the 3rd step is to add the old IP Address as the secondary address without the ability to register its address in DNS:

c:\>Netsh int ipv4 add address Ethernet skipassource=true

c:\> netsh interface ipv4 show config

Configuration for interface "Ethernet"
    DHCP enabled:                         No
    IP Address:                 
    Subnet Prefix:               (mask
    IP Address:                 
    Subnet Prefix:               (mask
    Default Gateway:            
    Gateway Metric:                       1
    InterfaceMetric:                      10
    Statically Configured DNS Servers:
    Register with which suffix:           Primary only

Wait until the DNS only return the new IP Address and then remove the secondary address from the interface.


Leave a Reply Cancel reply