Operating System - HP-UX
1834608 Members
2627 Online
110069 Solutions
New Discussion

Routing for HP-UX box with two LAN cards

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

Routing for HP-UX box with two LAN cards

Hi,

I have a HP-UX 11.0 server with two LAN interfaces in different subnetworks.
IP1 = 1.1.1.1
IP2 = 2.2.2.2
Default Gateway = 1.1.1.254

Incoming packets can reach the system via any of the two interfaces, but outcoming packets are sent only via default gateway. Question: how to configure the second gateway with smaller priority (e.g. 2.2.2.254) to be used when the second LAN goes down?

I'd like to find a solution in terms of netconf statements, because the docs do not have example with two default gateways.

Thanks in advance!

BR,
Mihail
KISS - Keep It Simple Stupid
4 REPLIES 4
Helen French
Honored Contributor

Re: Routing for HP-UX box with two LAN cards

Solution

Re: Routing for HP-UX box with two LAN cards

You *can* define a second default gateway if your system is running HP-UX11.00 or above.

Just define another route with a larger metric:

route add default 2.2.2.254 2

or in your /etc/rc.config.d/netconf file :

ROUTE_DESTINATION[1]=default
ROUTE_GATEWAY[1]=2.2.2.254
ROUTE_COUNT[1]=2

No traffic will be sent to the second default gateway unless the first one fails.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Helen French
Honored Contributor

Re: Routing for HP-UX box with two LAN cards

Mihails Nikitins
Super Advisor

Re: Routing for HP-UX box with two LAN cards

Thanks a lot for the exact answer and the links!

BR,
Mihails
KISS - Keep It Simple Stupid