1834639 Members
2517 Online
110069 Solutions
New Discussion

hpux routes

 
SOLVED
Go to solution
Shaun De Burgh
New Member

hpux routes

could someone please tell me the command lines to add route's to hpux's route table.

thanks heaps :)
"unix: a real os"
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: hpux routes

Hi Shaun:

See the man pages for 'route' (1M).

Regards!

...JRF...
Michael Tully
Honored Contributor
Solution

Re: hpux routes

Hi,

There are are a number of examples but here is
two of the more common.

Adding a default route:
default route to router ip and number of hops
# route add default 10.20.30.10 1

Adding a route from your second lan card to a
different router
# route add 10.20.30.40 10.30.30.10 1

HTH
~Michael~
Anyone for a Mutiny ?
Mohammad Iqbal_1
Occasional Advisor

Re: hpux routes

You can use the 'route' command. I'll give you an example about how to add and delete an entry in routing table.

# route add net 150.150.0.0 123.1.1.1 1
This example shows how to add a route way to destination netwrork 150.0.0 via a gateway 123.1.1.1 1 at the end of the line means the gateway is remote node.

# route del net 150.150.0.0 123.1.1.1
This example shows how to delete the existing entry in routing table.

See man route

cheers
Iqbal "the Captain"
Darrell Allen
Honored Contributor

Re: hpux routes

Hi,

Use /etc/rc.config.d/netconf to add routes at boot. There is documentation in the script but here's an example:

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

ROUTE_DESTINATION[1]="net 192.192.0.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=192.192.101.101
ROUTE_COUNT[1]=0
ROUTE_ARGS[1]=""

Note each "stanza" is identified by [n] where n is unique amoung the routing entries.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)