1836364 Members
2130 Online
110100 Solutions
New Discussion

point to a machine

 
SOLVED
Go to solution
Chang_6
Regular Advisor

point to a machine

Hi,

Can anyone tell how to point HP UX box to another machine. I want to point it to two gaateways. I have two ip addresses.
2 REPLIES 2
Sanjay_6
Honored Contributor
Solution

Re: point to a machine

Hi Chang,

you can have multiple entries for route in your /etc/rc.config.d/netconf file. Though there can be only one default route. you can add /delete route manually on the fly using the route add / delete command. Do "man route" for more options.

your current route entry in the netconfig file may look like this,

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

to add another route,

ROUTE_DESTINATION[1]="net 2nd_subnet"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]=your_2nd_gw_ip
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

Remember any changed to netconf will become effective after a reboot. To make the changes on the fly, use the route add command.

Hope this helps.

Regds
Chang_6
Regular Advisor

Re: point to a machine

Hi Sanjay,

Thanks for replies. If I have the gateway ip address and if I have to reach outside network, does it mean I have to specify likethis?

/usr/bin/sroute add 1

Or should I put the network address instead of outside_ip_address where the gateway is? If so, how can I know the network address of gateway