Operating System - HP-UX
1833268 Members
2568 Online
110051 Solutions
New Discussion

Re: how to add route entry

 
blu.karthi
Advisor

how to add route entry

hi expert,

i want to add route entry...
i need syntax....

destination = 10.1.1.42
gatway =10.87.133.254
3 REPLIES 3
Hakki Aydin Ucar
Honored Contributor

Re: how to add route entry

route add net 10.1.1.42 netmask 255.0.0.0 10.87.133.254 1

Steven Schweda
Honored Contributor

Re: how to add route entry

man route
Laurent Menase
Honored Contributor

Re: how to add route entry

route add net 10.1.1.42 netmask 255.255.0.0 10.87.133.254 1

you must adapt your netmask to your subnet.
if you want it to stay after reboot, then you need to add it in
/etc/rc.config.d/netconf

ROUTE_DESTINATION[1]="10.1.1.42"
ROUTE_MASK[1]="255.255.0.0"
ROUTE_GATEWAY[1]="10.87.133.254"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

if index 1 is not already used.