Operating System - HP-UX
1753797 Members
7051 Online
108799 Solutions
New Discussion юеВ

How to change default route?

 
Jesus Fdez.
Valued Contributor

How to change default route?

Hello,

I have an rx3600 server with hpux 11.31. In the two network interfaces, lan900 and lan901. When I run netstat-rn I see that the default route is on the lan901.
In the netconf file is established lan900.
How I can change it for the default route is in the lan900?

Thanks,
Jesus
7 REPLIES 7
Steven Schweda
Honored Contributor

Re: How to change default route?

> [...] I see that [...]

I can't see anything. Perhaps you could show
us what you're talking abut?

As usual showing actual commands with their
actual output can be more helpful than vague
descriptions and interpretations.

> In the netconf file [...]

I can't see what's there, either.
Benoy Daniel
Trusted Contributor

Re: How to change default route?

Your APA is failed over to 901. Try to create a LAN monitor failover group to switch between both groups.
Asif Sharif
Honored Contributor

Re: How to change default route?

Hi Jesus,

http://docs.hp.com/en/J4240-90041/ch03.html

Regards,
Asif Sharif
Regards,
Asif Sharif
Jesus Fdez.
Valued Contributor

Re: How to change default route?

Hi,

The APA is OK.

The output of netstat -rn
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
192.168.1.3 192.168.1.3 UH 0 lan0 32808
10.X.2.82 10.X.2.82 UH 0 lan900 32808
10.X.2.85 10.X.2.85 UH 0 lan901 32808
192.168.1.0 192.168.1.3 U 2 lan0 1500
10.X.2.0 10.X.2.85 U 2 lan901 1500
10.X.2.0 10.X.2.82 U 2 lan900 1500
10.X.2.0 10.X.2.1 UG 0 lan901 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 10.X.2.1 UG 0 lan901 1500


# nwmgr -g

Name/ Interface Station Sub- Interface Related
ClassInstance State Address system Type Interface
============== ========= ============== ======== ============== =========
lan0 UP 0x002481772DE0 iether 1000Base-T
lan2 DOWN 0x001A4BF3B435 iether 1000Base-T
lan3 UP 0x001A4BF3B434 iether 1000Base-T lan902
lan4 UP 0x001A4BF3B437 iether 1000Base-T lan901
lan5 UP 0x001A4BF3B436 iether 1000Base-T lan900
lan6 DOWN 0x001A4BF3B52D iether 1000Base-T
lan7 UP 0x001A4BF3B52C iether 1000Base-T lan902
lan8 UP 0x001A4BF3B52F iether 1000Base-T lan901
lan9 UP 0x001A4BF3B52E iether 1000Base-T lan900
lan1 DOWN 0x002481772DE1 iether 1000Base-T
lan900 UP 0x001A4BF3B436 hp_apa hp_apa
lan901 UP 0x001A4BF3B437 hp_apa hp_apa
lan902 UP 0x001A4BF3B434 hp_apa hp_apa
lan903 DOWN 0x000000000000 hp_apa hp_apa
lan904 DOWN 0x000000000000 hp_apa hp_apa


I want to change the default route, remove lan901 and put the lan900.

Thanks,
Jesus
nightwich
Valued Contributor

Re: How to change default route?

Hi Jesus

This is Judas writing :) ..


I will try to give you a help.


In the /etc/rc.config.d/netconf you configure the defaultroute for you lan.

Example of the configuration of two network cards in netconf:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=xxxx.xxxxx.xxxx.xxxx
SUBNET_MASK[0]=aaaa.aaaa.aaaa.aaaa
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""


DEFAULT_INTERFACE_MODULES=""
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=xxxx.xxxx.xxx.xxx
DHCP_ENABLE[1]=0
SUBNET_MASK[1]=aaaa.aaaa.aaaa.aaaa
ROUTE_MASK[0]=aaaa.aaaa.aaaaa.aaaa
ROUTE_GATEWAY[0]=xxx.xxxx.xxxx.xxx
ROUTE_COUNT[0]=1
ROUTE_DESTINATION[0]=default


This configure the default gateway for lan0,

To configure to lan1 I think this should work
ROUTE_MASK[1]=aaaa.aaaa.aaaaa.aaaa
ROUTE_GATEWAY[1]=xxx.xxxx.xxxx.xxx
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[1]=default

Hope this help.

Regards...
Tim Nelson
Honored Contributor

Re: How to change default route?

this happens if you have two or more interfaces on the same subnet..

who knows which interface will get the route

I know this works for windows and maybe linux but I do not think HPUX likes this...

10.X.2.82 10.X.2.82 UH 0 lan900 32808
10.X.2.85 10.X.2.85 UH 0 lan901 32808

not sure of the purpose of having two separate aggregates on same subnet.. I would think that the correct config if attempting to span two disparaging switches is to have 2 aggregates with the second one acting in a LAN_FAILOVER mode.

or cascade the switches and aggregate them all as one...

maybe I am miss interpriting something ..


Benoy Daniel
Trusted Contributor

Re: How to change default route?

Could you please provide the output of

1. lanadmin -x -v 900

2. lanadmin -x -v 901

3. lanscan -q