Add Route on HP-UX v10.x, help.

Hi,

My H-UX box has the GW pointing to 10.10.10.1 and I need add it a new route pointing to 192.168.80.x with the GW 10.10.10.13

I tried with:
#route add 192.168.80.2 255.255.255.255 10.10.10.13

but I get: add net 192.168.80.0: gateway 255.255.255.0: Network is unreachable

I tried with
#route add 192.168.80.2 10.10.10.13

netstar -rn:
192.168.80.2 10.10.10.13 UH 0 0 lan0 1500

but I can reach it, when I exec a traceroute 192.168.80.2, it uses the GW 10.10.10.1 instead of 10.10.10.13

What am I doing wrong? I've tried on WinXP and it works OK.

Thanks....

I'm not sure what it is you're trying to do, you seem to have two theories. To add a route to the 192.168.80.0 network that uses 10.10.10.13, I think it is:

route add net 192.168.80.0 255.255.255.0 10.10.10.13 1

But I don't have access to a 10.x box to test it.

I tried with:
#route add net 192.168.80.0 netmask 255.255.255.0 10.10.10.13 11

and it works OK.

My /etc/rc.config.d/netconf is:
------------------------------
HOSTNAME="mainsrv"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="10.10.10.7"
SUBNET_MASK[0]="0xffffff00"
BROADCAST_ADDRESS[0]="10.10.10.255"
LANCONFIG_ARGS[0]="ether"
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="10.10.10.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

To add the route statically. Would it be valid?

ROUTE_DESTINATION[1]="net 192.168.80.0"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.10.10.13"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

I think it's:
ROUTE_DESTINATION[1]="192.168.80.0"

The script figures out net or host based on the value of this field and netmask.

ok, thanks for your time...