Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Add route with 'source' persistent?

twalter
Occasional Contributor

Add route with 'source' persistent?

Hi!

I wanted to add a route reboot persistent to netconf but its a route with the parameter 'source'. The command line looks like:

route add net 10.8.4.224 195.36.80.129 195.36.80.183

Does anyone knows a way how to implement the 'source' parameter into the netconf? We just added a short script to rc3.d which adds the route 'manually' at a startup but within netconf it would be smarter...
9 REPLIES
Keith Bryson
Honored Contributor

Re: Add route with 'source' persistent?


netconf and the /sbin/init.d/net script don't expect to see this additional parameter so no you can't use netconf.

Hope that helps
Keith
Arse-cover at all costs
TTr
Honored Contributor

Re: Add route with 'source' persistent?

Have you tried puting your gateway in netconf as follows? (adjust i for your index)
ROUTE_GATEWAY[i]="195.36.80.129 195.36.80.183"
Keith Bryson
Honored Contributor

Re: Add route with 'source' persistent?

Sorry for misleading you here, according to the net script, you can specify the following in the netconf file:

ROUTE_SOURCE[x]="xxx.xxx.xxx.xxx"

Keith
Arse-cover at all costs
Keith Bryson
Honored Contributor

Re: Add route with 'source' persistent?

This is on v3 BTW. v1 didn't have this functionality!

So, to summarise you'd have in netconf:

ROUTE_DESTINATION[x]="net 10.8.4.224"
ROUTE_GATEWAY[x]="195.36.80.129"
ROUTE_COUNT[x]="1"
ROUTE_SOURCE[x]="195.36.80.183"

Just keep [x] unique

Keith
Arse-cover at all costs
sujit kumar singh
Honored Contributor

Re: Add route with 'source' persistent?

Hi

it is better and suggested that for addding the route to the system permanently do add the entries as suggested in the earlier threads.


regards
sujit
twalter
Occasional Contributor

Re: Add route with 'source' persistent?

And on v2? Because we have this version ;)
Keith Bryson
Honored Contributor

Re: Add route with 'source' persistent?

cat the top of the /sbin/init.d/net file. It will tell you which ROUTE parameters are valid. I can't tell as we don't use v2 anymore ( 8 (
Arse-cover at all costs
Keith Bryson
Honored Contributor

Re: Add route with 'source' persistent?

If you don't find ROUTE_SOURCE in the net script, TTr has your solution and gets the points!!!

All the best - Keith
Arse-cover at all costs
twalter
Occasional Contributor

Re: Add route with 'source' persistent?

No, there is no ROUTE_SOURCE in v2. And the tricky thing with adding the SOURCE after the GW brings up an error 'Failed to add route ...' When i delete the SOURCE after the GW in netconf all is fine. So no chance it seems :( Perhaps we will implement the part from v3 soon in our v2 script, shouldnt be that much of a problem.

Thx anyway! Right now its running fine with a startup script.