You are not logged in.

#1 2006-06-13 10:41:54

zaozao
Member
Registered: 2006-05-12
Posts: 36

syntax for routes in rc.conf?

What is the right syntax for rc.conf file (I think)

If I do not want default route and prefer to add some specific routes at system booting

like:

1.    route –add x.x.x.x mask x.x.x.x gw x.x.x.x.x
2.    route –add x.x.x.x mask x.x.x.x gw x.x.x.x.x

and so on … ?


Thank you!

Offline

#2 2006-06-13 11:00:49

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: syntax for routes in rc.conf?

Just put there anything that comes after "route add".

Offline

#3 2006-06-13 12:21:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: syntax for routes in rc.conf?

You do have to give each route a name. The only one there by default is gateway, but you could call yours e.g. route1, route2, etc. You then need to add those names to the ROUTES array.

Offline

#4 2006-06-13 12:34:48

zaozao
Member
Registered: 2006-05-12
Posts: 36

Re: syntax for routes in rc.conf?

Like this exactly:


ROUTE1="x.x.x.x mask x.x.x.x gw x.x.x.x"
ROUTE2="x.x.x.x mask x.x.x.x gw x.x.x.x"
ROUTES=(!ROUTE1,!ROUTE2)               


?


What is about place and times of "!". This is confusing me.


Thank you!

Offline

#5 2006-06-13 12:40:49

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: syntax for routes in rc.conf?

It should be:

ROUTE1="x.x.x.x mask x.x.x.x gw x.x.x.x" 
ROUTE2="x.x.x.x mask x.x.x.x gw x.x.x.x" 
ROUTES=(ROUTE1 ROUTE2)

"!" is just used to disable the route (analogically as in MODULES array).

Offline

Board footer

Powered by FluxBB