Answer the question
In order to leave comments, you need to log in
How to automate IP switching?
Good afternoon everyone! Guys, tell me in which direction to dig.
Situation:
There is a local web server.
There is an Internet channel with a static IP, main and backup.
There is dns - hosting.
How it all works:
A 4th-level domain is published through dns-hosting, our IP is connected to it, through attribute A. Everything works well, there are no complaints.
Problem:
In case of failure of the main Internet channel, you need to change the IP address in the DNS hosting to republish our web resource, the process takes 10-15 minutes, generally acceptable, but you want it faster.
Task:
Automate this action.
How I see automation:
So that somehow when you go to the link, the first ip is pinged, if there is a ping, then we go, if there is no ping, then we go to the second ip /
Renting a hosting is not an option, because our web resource was made in 1s. Everything is local.
If someone tells me where to dig I will be very grateful. Thank you )
Answer the question
In order to leave comments, you need to log in
regarding the classic options 2:
1. Take out the layer server outside, to the provider. carry out routing already on it.
2.BGP.
I think that the same server should do this - determine the working channel, and through the API of your hosting dns, change the address to the address of the working channel.
But it's better to do hosting and not touch dns - because dns is cached and you can't force your clients to update the cache in any way. Let the hosting choose where to get the info from - if one channel is not available, then it's different.
Honestly, I have never done it, so this is just a thought. Maybe someone knows for sure:
And if you specify different ns for the domain, and in one register the A-record on the main IP, and in the second - on the "backup"?
Or, in fact, just put both IPs in the A-record at once and get a "roulette"? (see https://toster.ru/q/5834)
Maybe nonsense. Haven't tried it yet and don't really care :/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question