Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to know if there's any reliable tools I could use (integrate with my network config) to monitor the status of the gateway and switch the default gw when it detects that the main gateway is dead?

How reliable is ping based checking, anything else to achieve the same result? What method do you use, if any?

This is basically for "high-availability" internet sharing - office gateway is connected to two ISPs at the time and auto switches the active when the other one is down.


I'm looking for a reliable, possibly non ping based solution, software.

share|improve this question

closed as off-topic by masegaloeh, Grant, 84104, Katherine Villyard, Scott Pack Apr 16 '15 at 3:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

The good way would be to do this on network side, with two routeur using HSRP to share the same IP. With this if one router or one link fail, the second router would take the IP of the first one (this is a basic explanation). With this you are sure that the default gateway of your computers will work. Now if you really want a solution on server side, I guess that I would ping something on Internet (like IPS dns server as Dave Cheney says but also well know website like google and yahoo may be) and also check with tcpdump/ethereal if I receive packet from Internet. Because for any reason ICMP can not reply but the link can be in a good state so that you will probably see incomming data (from internet) on the server ethernet card.

Edit: as you added "I'm looking for a reliable, possibly non ping based solution, software.". I could suggest to monitor both router with SNMP if this is possible. It would help if you tell us what kind of routers are used, if you can access them and so on.

share|improve this answer
HSRP is a cisco-only protocol. VRRP is the similar standards-based protocol. HP switches implement yet another similar protocol called XRRP. – David Pashley Jun 15 '09 at 12:28
You're right, there is also CARP developed by OpenBSD – radius Jun 15 '09 at 13:08

As far as I understand, HSRP is not an option since this would have to be configured between the two ISPs. Since they won't do this, I think you have to do the "automatic failover" with a script which detects a faulty route. e.g. freebsddiary success story

Why does ping not fulfill you requirements? In my opinion it's the lowest possible IP based tool to test connectivity.

share|improve this answer
It depends if he has access to both router or not. He may just by 2 links from 2 ISP and use his own routers. He could also add a new router. – radius Jun 15 '09 at 17:24

You could try pinging the upstream route, or the ISP's name servers.

This isn't rock solid, high contention on the link can trigger a failover. The best way to do this is combine it with link level failover if you router can support the ADSL interface directly.

share|improve this answer
Could you be more specific about this link level failover? Also, the ISPs are not ADSL based. – Karolis T. Jun 15 '09 at 10:25
If the router is directly connected to the media that your ISp provides (fiber, or ethernet, for example) it has the ability to detect the link level of the link directly (which is a very reliable method of failover). If the link goes via a media converter, or similar, then it will be harder for your router to detect link level changes – Dave Cheney Jun 15 '09 at 10:57

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