Operating System - HP-UX
1834149 Members
3579 Online
110064 Solutions
New Discussion

How to configure more one permanent route in netconf file?

 
Andres Valentin Lopez
Occasional Advisor

How to configure more one permanent route in netconf file?

Hi

I have HP-UX 11i v2 in itanium server, with two NICS, one goes to internet with IP address 200.36.35.3/255.255.255.248 with gw 200.36.35.1 and the other goes to intranet with ip address 192.168.1.10 / 255.255.255.0, this NIC needs to communicate with the rest of the subnests using the intranet gw 192.168.6.200, I added the routes manually but I need that these routes are permanent,

route add net 192.168.2.0 netmask 255.255.255.0 192.168.6.200 1
route add net 192.168.3.0 netmask 255.255.255.0 192.168.6.200 1
route add net 192.168.4.0 netmask 255.255.255.0 192.168.6.200 1
route add net 192.168.5.0 netmask 255.255.255.0 192.168.6.200 1

and so on until 192.168.9.0

How to configure in netconf file?

Thanks a lot
6 REPLIES 6
Doug Burton
Respected Contributor

Re: How to configure more one permanent route in netconf file?

I think this is what your looking for...

ROUTE_DESTINATION[1]=192.168.2.0
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]=192.168.6.200
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""


ROUTE_DESTINATION[2]=192.168.3.0
ROUTE_MASK[2]="255.255.255.0"
ROUTE_GATEWAY[2]=192.168.6.200
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""

etc., etc.
Doug Burton
Respected Contributor

Re: How to configure more one permanent route in netconf file?

Sorry, forgot to mention...

after doing the netconf change you can do the following to test:

/sbin/init.d/net start
Robert Bennett_3
Respected Contributor

Re: How to configure more one permanent route in netconf file?

I agree with Doug - it is how we do it here.
"All there is to thinking is seeing something noticeable which makes you see something you weren't noticing which makes you see something that isn't even visible." - Norman Maclean
Andres Valentin Lopez
Occasional Advisor

Re: How to configure more one permanent route in netconf file?

Thaks for your answer...

I applied that you suggested but in the rc.log appears

ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
netmask: bad value
"/sbin/rc2.d/S340net start" FAILED

Any idea...

Thanks again
Steven E. Protter
Exalted Contributor

Re: How to configure more one permanent route in netconf file?

lanscan

do an ifconfig lan#

replace the # sign with the number from lanscan.

lan0
lan1

every lan.

See what that tells you.

dmesg

Make sure all lan cards are working right.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tony Scully_2
Valued Contributor

Re: How to configure more one permanent route in netconf file?

Check the LAN cards that you need to be up are also configured in netconf, before the routing info and that the interface status is up.

Run

netstat -in

to see what's currently up.

And

netstat -rn

to examine the routing table.

Tony
You CAN do that on HP