1833757 Members
2039 Online
110063 Solutions
New Discussion

two default routes

 
SOLVED
Go to solution
U.SivaKumar_2
Honored Contributor

two default routes

hi,
I have put two default routes pointing to two different gateways on the same network. will this work as a router fallback setup ? ie if
first route is not available , the second will be tried .

regards,
U.SivaKumar
Innovations are made when conventions are broken
3 REPLIES 3
John Carr_2
Honored Contributor

Re: two default routes

cx2
Occasional Contributor
Solution

Re: two default routes

Hello,

I think this is possible, but it may not be the ndd tunable parameter referred to in the forum message above - If you have two default gateways, and have dead gateway detection turned on (Think it's 'ip_ire_gw_probe') under HP-UX 11.x, the default route will 'failover' to the second default route. Dead gateway detection tends to ping the default route at certain intervals to see if it's still alive, so some people turn it off if their gateway is a firewall. So, if your gateways aren't firewalls, this might work. However, I think the probing interval is something like 15 minutes by default. It can be adjusted by another ndd tunable (maybe 'ip_ire_gw_probe_interval').

Another possibility would be to use HSRP on your routers, but it's not something I know much about...

Hope this helps,

cxtwo
Steven Sim Kok Leong
Honored Contributor

Re: two default routes

Hi,

It should be better for you to rely on a routing protocol than static default routes for failover and fallback.

If you wish to use static default routes, then use it in a cron script so that you take care of fallback from the standby route to the primary route.

In my environment, I use RDPD (Router Discovery Protocol Daemon) clients on my HP-UX servers.

On both my firewall gateways, I run GATED which launches the routerdiscovery server. With that, I am able to implement failover and fallback.

If you use a cron script that runs every minute, it should go something like this:
=======================================
#!/sbin/sh

if ping primary -n 1 | grep '100%' >/dev/null 2>&1
then
if [ ! -e /tmp/FAILED-OVER]
then
route add default secondary
route delete default primary
touch /tmp/FAILED-OVER
fi
else
if [ -e /tmp/FAILED-OVER ]
then
route add default primary
route delete default secondary
rm -f /tmp/FAILED-OVER
fi
fi
=======================================

Hope this helps. Regards.

Steven Sim Kok Leong