LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-06-2003, 11:44 AM   #1
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
DNS Question on multiple ip's


I have a webserver that I am trying to make so it is never down, I setup a linux server that rsync's all the data from our main webserver hourly, I set that machine to do mysql replication.

The rsync server is in a whole different location/town and we want it so that if power goes out where the main server is or our T1's go down, etc. That it will automaticly roll over to my rsync server and serve the requests from there.

Is there any way to setup bind so if the main site is down it will automaticly roll over to the rsync server in the other town? We have 2 dns servers in the main location and 1 in the location with the rsync server.

I do not want to load balance between the two servers, I only want the rsync server to be accessed if the main site is down.

If you know how I can go about this could you also give me an example config for bind? Thank you very much.
 
Old 11-06-2003, 12:28 PM   #2
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Re: DNS Question on multiple ip's

Quote:
Originally posted by cli_man
I have a webserver that I am trying to make so it is never down, I setup a linux server that rsync's all the data from our main webserver hourly, I set that machine to do mysql replication.

The rsync server is in a whole different location/town and we want it so that if power goes out where the main server is or our T1's go down, etc. That it will automaticly roll over to my rsync server and serve the requests from there.

Is there any way to setup bind so if the main site is down it will automaticly roll over to the rsync server in the other town? We have 2 dns servers in the main location and 1 in the location with the rsync server.

I do not want to load balance between the two servers, I only want the rsync server to be accessed if the main site is down.

If you know how I can go about this could you also give me an example config for bind? Thank you very much.
As far is a know it's not possible. You might wanna try something (which is almost the same) a round-robin DNS (some load balancing). But actually you mean you don't wanna do that? It's the only way, to redirect users to different (primary or secondairy dns)

Hope this helps,
 
Old 11-06-2003, 12:34 PM   #3
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
I was looking on google and found the following example and wondered what it was.

www 60 IN A 208.201.239.36
www 60 IN A 208.201.239.37

I found that at: http://hacks.oreilly.com/pub/h/79 What is the 60 in those lines? They looked like priorities, if they are could I just make one of them 10 and the other 50, then it would always send to the one with 10 unless it was down. Is there a way to do a priority on a A record?
 
Old 11-06-2003, 12:44 PM   #4
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by cli_man
I was looking on google and found the following example and wondered what it was.

www 60 IN A 208.201.239.36
www 60 IN A 208.201.239.37

I found that at: http://hacks.oreilly.com/pub/h/79 What is the 60 in those lines? They looked like priorities, if they are could I just make one of them 10 and the other 50, then it would always send to the one with 10 unless it was down. Is there a way to do a priority on a A record?
No as far as I know. The 60 means the TTL to prevent any intervening caching DNS servers from hanging onto one sort order for too long, which will hopefully help keep the number of requests to each host more or less equal.

Read this article: http://hacks.oreilly.com/pub/h/63 which explains some cheapIP take over but I think it will not fit in your situation...

Hope this helps a bit,
 
Old 11-06-2003, 12:45 PM   #5
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
moved to the Linux - Networking forum
 
Old 11-06-2003, 01:27 PM   #6
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
No that wouldn't work as they are compleatly different classes of ip's so the routing wouldn't work.

I think what I may do is setup my 3rd dns to have a different config in it so that the first two would look at the main server and the 3rd dns would look at the rsync server. The idea being that all dns queries would always go to the first dns, if its not available then try the second, and if its not their go to the 3rd. If both dns1 and dns2 are not available that would mean the whole site was down anyway and then the 3rd would pick up from our other site and point to the rsync server
 
Old 11-06-2003, 01:45 PM   #7
stonux
Member
 
Registered: Oct 2003
Distribution: SuSE, RH
Posts: 54

Rep: Reputation: 15
You may consider the following:

Use a DDNS server (dynamic DNS). If the main site goes down,
the DDNS servers will receive an update to point to the backup site.

This is not a trivial task.

Several points to consider:
[list=1][*]When is the main site failed? You may to check whether MySQL is up too.[*]How do you test whether the system is up? Maybe a transaction on application level with url_get or the like... The entire system is checked like this. How frequently do you check?[*]You may want to put the primary (D)DNS on the backup site. If the main site goes down, it can be reached to accept address updates[/list=1]

This whole concept goes out of sync if the backup site (or only its link) fails.

I never used backhand. Could be interesting too.
I also saw web sites like www.hp.com returning two IP addresses.
I have no idea how browsers behave in this case.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS question, multiple records newlinuxnewbie Linux - General 2 10-28-2005 08:26 PM
IPTables - Multiple Public IP's to private IP's matneyc Linux - Security 8 05-27-2005 12:23 PM
Multiple Apache Sites, on Multiple IP's, on Same Box?? RickyJ Linux - General 1 06-19-2003 10:55 AM
Multiple Apache Sites, on Multiple IP's, on Same Box?? RickyJ Linux - Software 0 06-19-2003 09:50 AM
DNS multiple domain question jmcrtp Linux - Networking 0 02-09-2002 09:55 PM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration