Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

EDIT:

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

share|improve this question
add comment

3 Answers

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
1  
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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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