Operating System - HP-UX
1834461 Members
2996 Online
110067 Solutions
New Discussion

Re: How to add network gateway?

 
SOLVED
Go to solution
Kevin.Wang
Frequent Advisor

How to add network gateway?

i dont want to use SAM.
how to add gateway?
my ip address: 192.168.0.100/255.255.255.0

Thank you in advance.
2 REPLIES 2
twang
Honored Contributor
Solution

Re: How to add network gateway?

add default gateway:
route add default 192.168.0.100 1

to permanently change the gateway:
edit /etc/rc.config.d/netconf
...
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="192.168.0.100"
ROUTE_COUNT[0]=""
ROUTE_ARGS[0]=""
...
Con O'Kelly
Honored Contributor

Re: How to add network gateway?

Hi

Check that the new gateway has been picked by running:
# netstat -rn

Cheers
Con