1833051 Members
2319 Online
110049 Solutions
New Discussion

route add

 
Bernd Dittmar
Advisor

route add

Every time after rebooting the HP-UX system the route add a.b.c.d_w.x.y.z is done.
Where can i add this, so it done automaticly by reboot.
BaaN IV on HP-UX
11 REPLIES 11
Rick Garland
Honored Contributor

Re: route add

Put in the /etc/rc.config.d/netconf file.
Stefan Farrelly
Honored Contributor

Re: route add


Add it into /etc/rc.config/netconf similar to;

ROUTE_DESTINATION[1]="add host 10.40.225.111"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=10.40.224.255
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
Im from Palmerston North, New Zealand, but somehow ended up in London...
Andreas Voss
Honored Contributor

Re: route add

Hi,

you have to edit the file /etc/rc.config.d/netconf

Example:
route add net 191.3.0.0 netmask 255.255.0.0 191.2.4.8 1

ROUTE_DESTINATION[#]="net 191.3.0.0"
ROUTE_MASK[#]="255.255.0.0"
ROUTE_GATEWAY[#]=191.2.4.8
ROUTE_COUNT[#]=1
ROUTE_ARGS[#]=""

You have to choose the right index # within the [] (just increment unique)

Regards

Andrew
CHRIS_ANORUO
Honored Contributor

Re: route add

If you have 2 routers seving as your gateways, add the in /etc/rc.config.d/netconf file and update First router[0] and second router[1]ROUTE_DESTINATION[0]="w.x.y.z"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="a.b.c.d"
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
허용제_1
New Member

Re: route add

Hi

# vi /etc/rc.config.d/netconf
------------------------------
# the next set of statements

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="xxx.xxx.xxx.xxx"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
박수정
Advisor

Re: route add

Hi

You have to edit Network config
file : /etc/rc.config.d/netconf

ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=192.168.145.1
ROUTE_COUNT[0]=1
ROUTE_MASK[0]=255.255.255.0

192.168.145.1 : Your gateway address
255.255.0.0 : Your Subnetwork Mask

and restart your network Daemon
then no rebooting

#/sbin/init.d/./net stop
#/sbin/init.d/./net start


Bernd Dittmar
Advisor

Re: route add

i?ve edited the /etc/rc.config.d/netconf as
followed.

ROUTE_DESTINATION[1]="add host 192.168.10.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=192.168.1.226
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

but after reboot it is not permanent, what?s wrong?
BaaN IV on HP-UX
Dan Hetzel
Honored Contributor

Re: route add

Bernd,

By defining ROUTE_DESTINATION[1], it adds
a second route (same for MASK, GATEWAY[1]...)

Do you have a ROUTE_DESTINATION[0] defined
somewhere ? (with all other [0] stuff)

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Bernd Dittmar
Advisor

Re: route add

The standard route [0] is:

=default
=""
=192.168.1.2
=1
=""

i have to assign 4 more routes !
BaaN IV on HP-UX
John Palmer
Honored Contributor

Re: route add

Hi,

I think that your problem is due to 'add' being included and isn't 192.168.10.0 a network rather than a host address? :-

ROUTE_DESTINATION[1]="add host 192.168.10.0"

should read

ROUTE_DESTINATION[1]="net 192.168.10.0"

Regards,
John
Berlene Herren
Honored Contributor

Re: route add

I agree, John.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm