> Hi everybody,
> I have 2 independent lines provided by 2 independent ISP's, running a
> "serwer" (DNS and HTTP) on both of them. Let's say the domain is
> "my-domain.com" so the servers would be like:
> SERVER1 (let's say 126.96.36.199)
> DNS dns1.my-domain.com
> HTTP www.my-domain.com
> SERVER2 (let's say 188.8.131.52)
> DNS dns2.my-domain.com
> HTTP ww2.my-domain.com
> dns1 is primary DNS server and dns2 is secondary.
What do you mean - I'm assuming that you're saying dns1 && dns2 are the nameservers for both www && ww2. Is that right?
> www and ww2 servers the same service (actually run by the third
> machine, hidden form the net), so no matter if somebody types
> "www.my-domain.com" or "ww2.my-domain.com" he/she gets the same.
Are you saying you're running your webserver on another machine i.e.
> Under normal circumstances, if somebody types "www.my-domain.com" in > his/her browser he/she is servered by SERVER1 - nothing strange.
> But, in case SERVER1 is down for some season, secondary DNS on the
> SERVER2 is still running and ... resolves it into 184.108.40.206
> which is DOWN.
> How should I set-up the secondary DNS so it resolves
> "www.my-domain.com" into "ww2.my-domain.com" or "220.127.116.11" in > case SERVER1 is not operating properly? Or, maybe should I have also > primary DNS on SERVER2?
Just change the zone record for www.my-domain.com
to 18.104.22.168 on the nameserver (i.e. dns2, if dns1 is down). If your domains are managed by your ISP/s they often provide a tool for doing this.
If your running BIND yourself it's in the manual.
One issue you may have with this is that lots of dns queries get cached, you want to make sure that the time they're cached for is as short as possible, though that will mean your nameservers getting more queries. Ask your ISP, or see the BIND manual.
Don't Stand on your head - you'll get footprints in your hair. http://charlieharvey.com