Overview

Because of its importance, the IP address of a domain controller is usually statically assigned to the server in question, or it is distributed via DHCP through a lease reservation to avoid any change.

Sometimes it is necessary to change the IP address assigned to a domain controller, especially if you want to change the network address of its information system. This may be frightening, but it should not pose a huge challenge if your domain controller does not host other, more capricious roles.

Here, we will take Windows Server 2012 R2, as a domain controller and also DNS, all for the domain name checkwhois.com.

IP address changing

We will start by changing the IP address, but before that, we will check that the domain controller is in good health with dcdiag. Open a command prompt as an Administrator and run this (replace SRV-AD01 with the name of your DC).

| Dcdiag / s: SRV-AD01

Verify that the tests are successful and then go on! You can change the IP address of the server, going into the settings of the network card, via netsh or via PowerShell.

New IP address saving

A domain relies on the use of a DNS server for name resolution, clients use records from that server to contact your domain controller. Therefore, it is imperative to update the DNS records corresponding to the DC.

On the DC, first, clear the local DNS cache and initiate the registration in the DNS:

| Ipconfig / flushdns & ipconfig / registerdns

Finally, a correction command is executed via dcdiag, in particular for correcting Service Principle Name (SPN) records. This corresponds to some kind of alias in the “Kerberos” world in the same way that CNAME is used to make an alias of DNS record.

| Dcdiag / fix

By the way, check that the various tests passed are OK. Do not hesitate to perform name resolution tests with nslookup.

To finish some additional information:

– Flush the DNS cache of client computers and member servers (ipconfig / flushdns)

– Change the DNS address in your DHCP server configuration

– Check DNS records replication between your different name servers, if you have more than one

– In Active Directory Sites and Services, check the support for the new IP address

– Don’t forget to make client computers/servers points to the new IP address of the DC and not the old one.

Note: Before any modification of this type, it is preferable to test the procedure in a pre-production environment.