I have a Debian Wheezy server running Xivo (let's call it A), this server has 2 interfaces:
There is no default gateway and only a few servers are statically reached from A.
eth0 has a public IP and connects directly to a remote server (let's call it B), the second interface of A,
eth1 is on a local network with another internet connection supposed to be used for different purpose.
In the routing table A, B is reachable through interface
What I want is to set up a failover route that tries to connect through
eth1 if the connection attempt fails on
I have no access to the routers, and no dynamic routing from outside A can be involved.
So far I see different stuff like
heartbeat HA and other technologies but with this question, what I want to achieve is to determine if what I want to do is possible and if possible with what kind of technologies.
I decided to rephrase my question because I feel like no one knows.
How can I monitor a link from one server to another and take action if the link is down? It can also be related to the arp resolution because I'm virtually connected to the remote host and I know its MAC address.
I'm pretty sure there are already possibilities out in the jungle of the Internet, and I don't want to reinvent the wheel for that task.
As the solution of the script is finally what I chose I'll accept it and reward it, but I added a sort of compilation of all I tried before using the script