0

I have a CentOS server running Centreon (a monitoring solution similar to Nagios) to monitor devices in multiple networks. The server could access the internet via 4 different gateways/routers, each having its own physical internet connection (ADSL and/or LTE).

Right now I have set one of them as gateway and if this line fails, the server can no longer reach the internet. How can I automatically switch to another gateway if one fails?

This also raises the question: how can I detect that an internet connection has failed?

  • pinging the router would only detect failures between the server and the router
  • Checking via SNMP if DSL is considered up leads to many false positives. Because somehow the DSL is up/synced but the problem seems to be on the provider side.
  • pinging a host in the internet might lead to false negatives if this host fails. Also: which host should I ping?
    • Google DNS (8.8.8.8 and 8.8.4.4) might fail sometimes
    • DNS server of provider changes from time to time
    • first hop after router: also changes sometimes
  • pinging one of the other gateways also leads to false negatives

The next question would be: How can I check which of the other three connections are still working?

masgo
  • 2,324

1 Answers1

2

Actually, your question contains two parts.

First, how to make sure the HA between your server and router. Second, how to make sure the HA between your router and internet.

For the first question, you need two physical enterprise routers. There are dedicated protocols for this purpose, such as HSRP,VRRP,GLBP.

For the second question, I would suggest you to track the www.google.com. Normally this site should be always available.