Web Development

Disable round robin DNS resolution in Windows Server 2003

You may be accustomed to striking a balance in your Windows Server 2003 using round robin, but sometimes you might want to concentrate all that load on one IP address. Here's how to disable round robin and free up the other server addresses at the same time.

If you're using Active Directory, you're probably also using Microsoft's DNS bundled with Windows Server 2003. By default, Windows Server 2003's DNS uses a mechanism known as "round robin" to achieve load balancing. While, on the surface, this is a good thing, there may come a time when you do not want to allow this load balancing to occur. Fortunately, it's not too hard to disable.

First, let me explain a little about round robin DNS resolution. Imagine you have three Web servers, all replicated with one another and all serving identical content. In your DNS, you have three entries with the same name, but each entry has a different IP address—one address for each Web server. Now, suppose you have three clients all loading up their browsers and pointing to your Web server's host name. If you’re using round robin DNS resolution, the first client will resolve your host name and the DNS server will return the first IP address. Upon receiving the second request, your DNS server will hand out the second entry’s IP address and the third client will get the third address. Voila! No one server gets all of the traffic.

There may come a time when you just want all traffic to go to the first resolved address. To make this happen, do the following:

  1. From the server on which you have DNS installed, go to Start | Administrative Tools | DNS.
  2. Right-click your DNS server’s name and, from the shortcut menu, choose Properties.
  3. Select the Advanced tab.
  4. Deselect the check box next to "Enable Round Robin."
  5. Click OK.

Each client will now receive the first entry found for each request.

Miss a column?

Check out the Windows Server 2003 archive, and catch up on the most recent tips from this newsletter.

Stay on top of the latest WS2K3 tips and tricks with our free Windows Server 2003 newsletter, delivered each Wednesday. Automatically sign up today!

9 comments
fireeight
fireeight

CAN YOU HELP ME,IM HAVING PROBLEM WITH MAY SERVER,IT HANGS UP INTERMITTENTLY DURING"PREPARING NETWORK CONNECTIONS..."BUT WE CAN STILL ACCESS THE FILES ON IT VIA NETWORK.

spuluka
spuluka

First, response to why round robin might need to be stopped. One of the machines in the rotation is being taken off-line for problems or maintenance. But there are two problems with the method outlined here: 1-This affects ALL pools of round robin hosts on the DNS server not the single pool that we need to work on. 2-This does not allow any control over WHICH DNS entry is not longer served. So if the first address is what you want to take out you are out of luck. A better approach is as follows: Each server in the round robin has it's own dedicated internal IP address that is just for the host and not used for the services in the round robin pool. This is the main host address that stays for each machine. Each machine is assigned a round robin pool IP address for use in the service supplied. This is the DNS entry for the service for that host in the pool. Use Microsoft netsh.exe tool to create export and import files of these IP address configurations on each server. This can be executed in a batch file to remove the service IP address from host A and then install the same address into host B. Now all requests are done by host B while host A is repaired off-line. How to Use the Netsh.exe Tool and Command-Line Switches http://support.microsoft.com/?kbid=242468 Export current settings: netsh -c interface dump > C:\scripts\IP\name.txt Import saved settings: netsh -f C:\scripts\IP\name.txt

huoml
huoml

would this method also not disable ANY/ALL other 'round robin' entries you may have for other sites on other servers that you may be serving/hosting ? e.g site1 is on srvr1, srvr2 and srvr3 and Site2 is on srvr5, srvr6, srvr88

Bob Oso
Bob Oso

Okay I'll step and ask the obvious. What specific situation or situations would I want this feature disabled? "it's not that I'm bored, I really, really want to know"

laman
laman

Anyone who has taken time to study 2003 should know. There are not too many settings you can play with MS DNS, and if you have serious about your network, you should have known this.

Matt_SF
Matt_SF

Ya beat me to it, Bob - I was wondering the same thing. Under what circumstances would I want to do this?

Matt_SF
Matt_SF

....for that useless bit of sarcasm. You are a real help to the discussion, laman.

mstry9
mstry9

Or more to the point, what problem could you run into using round robin. We have 2 DNS servers and randomly when we move a machine to a different VLAN, the DNS entry never registers the new IP. Could this be related?

ITEngineerGuy
ITEngineerGuy

Round Robin is easy to implement, and does have drawbacks, such as those inherited from the DNS hierarchy itself and TTL values, that allows for address caching and this can be hard to manage. Many larger networks use round robin DNS to distribute users across the servers on their networks. Most all large networks have separate round robin DNS setup for each location, or country in which they have servers.