1834146 Members
1975 Online
110064 Solutions
New Discussion

Route Add Help

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

Route Add Help

I am add a route other than default route, which is working. I would like to confirm with guru if the setting on netconf is complete:

----------------------
ROUTE_DESTINATION[0]="default"
ROUTE_DESTINATION[1]="10.0.0.0"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="172.16.16.1"
ROUTE_GATEWAY[1]="172.16.16.80"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
-----------------------
I add ROUTE_DESTINATION[1]="10.0.0.0" and ROUTE_GATEWAY[1]="172.16.16.80".

Is these completed? Any entries on route_count, route_args are needed?

Thank you very much,

Steven


Steve
6 REPLIES 6
Patrick Wallek
Honored Contributor
Solution

Re: Route Add Help

Yes, I believe you should have

ROUTE_COUNT[1]="1"

Other than that everything looks like it should work.
Steven E. Protter
Exalted Contributor

Re: Route Add Help

I am concerned about this:

ROUTE_DESTINATION[1]="10.0.0.0"

Its not compatible with the 172 network.

It may work, it just stands out.

For our 10.1 network the default gateway is 10.1.10.1

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
Sridhar Bhaskarla
Honored Contributor

Re: Route Add Help

Hi Steven,

A default gateway will take care of all the routes unless there is a static route for a particular destination. There will be only one default gateway per system.

I believe you are trying to configure a static gateway. It is better if you configure the routes in a modular way. For ex.,


ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="172.16.16.1"
ROUTE_COUNT[0]="1"

The above is the set for default gateway.

ROUTE_DESTINATION[1]="net 10.0.0.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="172.16.16.80"
ROUTE_COUNT[1]="1"

Add the word "net" to ROUTE_DESTINATION[1]

The above is the module for the static route to the destination 10.0.0.0. Are you sure you don't want to specify the ROUTE_MASK?. If so, then the default netmask will be taken.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: Route Add Help

Hi Steven,

First off net routes only need 3 or less octets - like 10.0.0

Second, I assume that 172.16.16.80 is a local IP on this system - correct?

If so then you need a ROUTE_COUNT[1]="0", to denote that the route goes out that NIC.

If NOT, then you need the ROUTE_COUNT[1]="1" - assuming the 172.16.16.80 is a router as well.

But IF your default router is on the same subnet, why do you need a static route? Can't the router handle the route?

Normally static routes are used to get traffic out a secondary NIC other than the NIC that would send to the default router.

Also, personally, I like to keep the route statements separately to make it easiser to see them. Although your way will work.

So I guess you need to tell us just what it is you're trying to do.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven Chen_1
Super Advisor

Re: Route Add Help

Thank you all for instant help!

The default route is 172.16.16.1, while 172.16.16.80 is my newly-addition. 172.16.16.80 is a Ethernet port IP of another FW connected to other company using IPSec. 10.0.0.0 is their lan that I route to.

Therefore, the original netconf portion is:

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

New netconf portion is:
******************
ROUTE_DESTINATION[0]="default"
ROUTE_DESTINATION[1]="10.0.0.0"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="172.16.16.1"
ROUTE_GATEWAY[1]="172.16.16.80"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
*******************

I would like to know if I have made any mistake. Some point out I should have "10.0.0", instead of 10.0.0.0. I would like to have someone confirm it also.

Please help further.
Steve
Sridhar Bhaskarla
Honored Contributor

Re: Route Add Help

Hi Steven,

Your configuration won't work because ROUTE_COUNT[0]="1" is not applicable to your second route. So you will have to have a seperate entry ROUTE_COUNT[1]="1".

Also it doesn't matter if you have the three octets or four octet as 0. Add 'net' to it as I mentioned.

You can also test it by running "/sbin/init.d/net start" command. Once it is run, use the command "netstat -rn" to find out if the route has been added.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try