DNS

DNS Aliasing

How many times have you had to upgrade a server and run around making changes to login scripts and group policies. How about migrating users to a new terminal server or migrating applications to a new SQL server. DNS aliases can be used to simplify these tasks and with a little bit of thought prevent the need to ever make those changes again.

File Server example

In this example we have a existing file server  FS-1 and a new file server FS-2. We will create an alias called FILESERVER

Disable Strict Name checking on both file servers (needed to allow connection to SMB shares):

  • Edit HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
  • Add a REG_DWORD DisableStrictNameChecking = 1
  • Restart the server so the setting takes affect

In DNS create a CNAME record called FILESERVER and point the CNAME at the DNS A record for FS-1.

You can now change login scripts and GPO’s to connect to FS-1 in two ways. Note this works for file shares and shared printers too:

  • \\FS-1\share
  • \\FILESERVER\share

Now lets assume you want to replace FS-1 with a new server FS-2. Simply move the data and create shares on FS-2 and when your’re ready to swap servers change the FILESERVER CNAME to point to FS-2. No changes to login scripts or GPO’s.

Tips:

Before cutting over to FS-2 you can use a hosts file on a PC to connect to shares and test your shares.

The same concept can be used in many places including aliases for SQL databases, Sharepoint, mail servers, web servers and many applications that use TCP/IP to communicate.

This is a good way to present “friendly” server names to users while maintaining names that are meaningful to the IT team.

You can have multiple CNAME records pointing to the same server. Useful for application specific DNS aliases e.g. a SQL server running several databases could have CNAME for each databases so that if one is moved to another server in the future the CNAME can follow.

Advertisements