Operating System - HP-UX
1836561 Members
3376 Online
110102 Solutions
New Discussion

Re: Alternate/Secondary GW for default/static routes

 
SOLVED
Go to solution
Kenneth_18
Frequent Advisor

Alternate/Secondary GW for default/static routes

Hi,

Is it possible to configure alternate routes for the default gw and also for other configured static routes should the configured gateway or associated interface fails?

Case scenario:

LAN1 IP: A.B.C.1
LAN1 GW IP: A.B.C.254
Destination IP range: Q.W.E.R

LAN2 IP: W.X.Y.1
LAN2 GW IP: W.X.Y.254
Destination IP range: A.S.D.F

What I want to happen is using only static routing, if LAN2 I/F goes down, Destination IP range A.S.D.F will be routed via LAN1 I/F using LAN1 GW IP and vice versa.

Also, I would want to utilize this for the default GW such that if LAN0 I/F of the default GW goes down, all traffic will be routed to an alternate GW on a different LAN I/F.

Thanks in advance!
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Alternate/Secondary GW for default/static routes

Hi Kenneth,

As far as I know, you can't configure more than one default gateway on the system. So, I would write a script that will do the checking for me.

1. Ping to the gateway. If it is down, then ping the other gateway and if it is up, then do a 'route delete' for the gateway that is down and establish static routing through the other gateway. If the other gateway is also down, then get yourself paged|mailed.
2. Keep track of the the dead gateway and continue pinging it. If it comes up, then delete the route corresponding to it and establish the static route again.
3. I would put the above in a script that starts during the start-up and runs continously but with periodic sleeps. This way you can pass the status of the gateways from one run to other. If it is run through cron, then you will have to create files etc.,

A bit of scripting is involved though.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Alternate/Secondary GW for default/static routes

You get one default gateway with HP-UX.

For everything else you add a route, usualy with a script.

As far as I know thats how it works with Linux too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kenneth_18
Frequent Advisor

Re: Alternate/Secondary GW for default/static routes

Thanks guys,

Knew the answer all along. Just wanted to see the point of view of others to confirm my own limited understanding on HP-UX. Will just have to go on scripting to achieve what I want.

The reason I asked this is that at least in a Nokia router that I have handled will all dynamic routing protocols disabled, I can configure secondary or alternate default routes should the primary fail. This router uses IPSO OS which is a some form of hardened version of FreeBSD. I guess that feature on the router is most probably also a script.

Thanks again!