1

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.

Karolis T.
  • 2,719
  • 7
  • 33
  • 45

3 Answers3

1

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.

radius
  • 9,633
  • 25
  • 45
1

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.

zero_r
  • 2,405
  • 3
  • 16
  • 16
  • 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
0

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.

Dave Cheney
  • 18,567
  • 8
  • 49
  • 56
  • 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