Date: Fri, 30 Oct 1998 19:13:33 +0000 From: "Nick A. Fikouras" <nick@dcs.shef.ac.uk> To: Afonso Miu <amiu@engin.umich.edu> Cc: "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG> Subject: Re: Static Route Message-ID: <363A0FDD.D7091C03@dcs.shef.ac.uk> References: <Pine.SOL.4.02.9810301359160.3170-100000@ca.engin.umich.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Afonso Miu wrote: > How to add static routes in rc.conf so that it will automatically add > static routes everytime it reboot. > > I had read the man page. It said it could be done, but i tried and did > not work... > > The following was what i did: > > static_routes="10.0.1.26 10.0.0.18" > > can you tell me whats wrong..? > > thank you > As far as I know the syntax for static_routes is: static_routes="route_foo route_bar" where bar and foo are two route names but you can have as many as you want. The 'route_' part is mandatory. Then you need to specify what routes foo and bar are by giving right below static_routes: route_foo="-net xxx.xxx.xxx.xxx -netmask yyy.yyy.yyy.yyy" route_bar="-host zzz.zzz.zzz.zzz ff:ff:ff:ff:ff:ff -interface epx" The first entry is a static route to a network while the second one is a static route to a host. Basically you need to provide the required information to complete a 'route add' command. I think the ethernet address in the second entry (all ff's) is mandatory if you want to avoid some nasty situations. Enjoy! --nick 8) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?363A0FDD.D7091C03>