Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
IP Addresses:   Domain Name    IP Address
    example.si     193.39.153.24
    example.si     89.272.252.77
    www.example.si     193.39.153.24
    www.example.si     89.272.252.77

This is our round robin DNS. Same domain in two different IP. Everything ok, works fine but we have small problem. Now first (primary) server is in ip 193.39.153.24 so all domains start resolving with 193.39.153.24 but we want that primary dns server ip is 89.272.252.77

Is this possible?

share|improve this question
    
thx i changed to example.si –  senzacionale Aug 19 '10 at 8:51
    
With round-robin, both IP addresses will be returned, so there isn't really any primary server in that regard. Is your goal to have a single server, and have a second server only come into play if the first is down? –  Paul Kroon Aug 19 '10 at 10:42
    
i want backup server if first is down yes. Is round robin right decision for that? –  senzacionale Aug 19 '10 at 14:12
    
here's a writeup I did for a similar question: serverfault.com/questions/55780/… –  Greeblesnort Aug 20 '10 at 4:24

4 Answers 4

up vote 1 down vote accepted

if your looking to have a "fail-over" system set-up, so if your primary site crashes and is unavailable the secondary is then available Round Robin is not an answer for you, as I looked at doing this a while ago and it generated nothing but problems and headaches.

what you need to-do is use a Load Balancer, there's plenty of solutions out there for this job, hardware appliances, software etc. the solution I chose was to implement a Linux server running a load balancer called Crossroads (XR).

basically it monitors both our sites and the minute it detects our primary site is off-line it redirects clients to the alternative (secondary site).

the only downside really is a basic knowledge of Linux including its security and how to ensure your server stays safe.

hope this helps.

share|improve this answer

With round robin DNS there is no primary server. The used address will alternate between the two, giving vaguely even load with a large number of requests.

share|improve this answer
    
hmm why then i am 99% of time connected to 193 and just 1% to 89 –  senzacionale Aug 19 '10 at 11:10
1  
Browsers cache the dns result and treat it slightly differently. It will try the first ip and then if that is unavailable try the 2nd. This is by design to stick an individual browser to an ip, it will only switch server when the cache is refreshed and it gets the other ip at the top of it's list. So for individuals it will not tend to be balanced. –  JamesRyan Aug 19 '10 at 11:45

Why not give your DNS servers new names? Like:

ns1.yourdomain.si A 89.212.252.73
ns2.yourdomain.si A 193.37.152.24

PS .si is Slovenia

share|improve this answer
    
we don't have NS server just IP server. Yes .si is Slovenia :) But problem is that 193 is before 89 so 193 is alwys first. –  senzacionale Aug 19 '10 at 8:53

First thing to note is that life will be a lot more painless if you specify home-specific DNS entries for different physical nodes - it makes supporting the system much easier. Curerntly, if 193.39.153.24 fails, then any requests to www.example.si should still succeeed.

According to RFC1123, the order in which records are specified should reflect the order in which they are sent to the client - and the client should try them in that order - however this has been superceded by RFC 1794. Certainly, for as long as I am aware, bind (and possibly other DNS servers) return equivalent records in a random order (unless explicitly told not to in bind 9.2.3 or later). For anything other than MX records, there is not "primary".

If, using nslookup, your DNS server is consistently returning records in the same order, then its time to have a long hard look at your DNS server config.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.