[CentOS] ip route and nexthop: the "CentOS" way

Thu Feb 2 12:10:07 UTC 2012
Steve Clark <sclark at netwolves.com>

On 02/02/2012 05:41 AM, Ljubomir Ljubojevic wrote:
> On 02/02/2012 11:28 AM, Nick wrote:
>> And if it isn't, is there anything I should bear in mind when hacking a script
>> to do this sort of thing, in order to avoid breaking my system or generally
>> fighting against the system's assumptions?
> I would have ping the gateway of primary link (maybe both) and some
> outside IP on that path, and in case of timeouts I would activate
> changes or something. Like "heartbeat" tests.
Yes, we use a perl script that pings two different sites on the net using specific routes
to direct the pings out specific interfaces, if after a configurable number of pings get lost
out the primary interface the perl script changes the default route to the secondary interface
while still trying to ping out the primary interface, when a configurable number of pings out the
primary interface succeed the perl script changes the default route back to the primary.
> But I recommend you read:
> http://www.shorewall.net/Shorewall_and_Routing.html
> and then consider using shorewall in MultiISP environment. I do not
> think Basic routing is able to deal with changing circumstances, at
> least not fast enough. One solution would be running dynamic routing
> protocols, like OSPF or OLSR, which involves running then on several
> routers/systems, or using some active script like shorewall.

Stephen Clark
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark at netwolves.com