SunQuest
           DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old July 12th, 2003, 10:27 PM
cwilli cwilli is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 cwilli User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DNS Listerd Order

I have 2 webservers on 2 different networks. Each is runing a webserver on the same box. I am trying to setup one a primary and one as a secondary. I want to use the name servers to do this. I have a domain name that has both of the nameservers listed in this order.

ns1.serverone.com
ns1.servertwo.com

I have a zone file for the domain name on each nameserver. The first name server zone file has a TTL of 30 min and the second nameserver zone file has a TTL of 15 min. This way the primary will only be down for 30 min before the entry expires and the clients machine does another lookup. If the primary is down (nameserverone) then it will go to nameservertwo and be running on the backup.

This is working fine except that the domain name wants to default on the ns1.servertwo.com instead of ns1.serverone.com when they are both up. If servertwo is down it will choose serverone fine.

I am wondering if I just need to change the order on the domain name or if there may be another reason why it defaults to servertwo.

thanks in advance
cwilli

Reply With Quote
  #2  
Old July 13th, 2003, 03:27 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,442 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 26 m 13 sec
Reputation Power: 797
One point to clarify here, there is NO priority when doing DNS lookups. The name resolver will pick a nameserver at random and query it first. This means, it could pick either primary or secondary NS and query it first. If it doesn't respond, then will it try another one and so on. In your case, since you only have two nameservers, this means it'll try the other one, only if the first one that it picked at random fails.

>> I am wondering if I just need to change the order on the domain name or if there may be another reason why it defaults to servertwo.
You can't do a thing about it, because of the above explanation. That's how DNS works.

Last edited by Scorpions4ever : July 13th, 2003 at 03:35 AM.

Reply With Quote
  #3  
Old July 13th, 2003, 10:22 AM
cwilli cwilli is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 cwilli User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have it figured out. The ns1.nameserverone.com was not setup correctly and sometimes would not give out info when queried. I found this out when I shut off nameserver2 for a long period of time.

I have done 3-4 failover tests by shutting off the 1st server and allowing the query to fail to the 1st server then gets picked up by the second. After it has failed over I only had to restart the 1st server again and after the TTL expires it chooses the first name server again.

Every network I have tested this on queried them in the listed order I have setup on the domain name. Even with other domain names that I have setup normally I have never seen choose the nameserver in 'random'. It always go for the first listed and then the second. Has anyone else known this to not be true?

Reply With Quote
  #4  
Old July 15th, 2003, 03:49 PM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
Quote:
Even with other domain names that I have setup normally I have never seen choose the nameserver in 'random'. It always go for the first listed and then the second. Has anyone else known this to not be true?

When resolving DNS queries, clients will pick one of the authorative servers for a domain at random and send it their query. The notion of "primary" and "secondary" DNS servers is misleading - the sense of priority that exists, for example, with MX records, does not exist with regards to authorative servers.

An example - my two nameservers (running djbdns) have logfiles roughly the same sizes. This is one machine with two IP addresses. If the primary/secondary priority notion were true, then the secondary would not have any log entries at all, since the machine always has those two IP addresses assigned to it - i.e. the "primary" has never been unavailable.
__________________
Alex
(http://www.alex-greg.com)

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > DNS Listerd Order


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway