From owner-freebsd-questions Fri Oct 30 11:24:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA15393 for freebsd-questions-outgoing; Fri, 30 Oct 1998 11:24:46 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pp3.shef.ac.uk (pp3.shef.ac.uk [143.167.2.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA15388 for ; Fri, 30 Oct 1998 11:24:44 -0800 (PST) (envelope-from nick@dcs.shef.ac.uk) Received: from [143.167.11.162] (helo=dcs.shef.ac.uk) by pp3.shef.ac.uk with esmtp (Exim 2.02 #2) id 0zZKA0-0007BV-00; Fri, 30 Oct 1998 19:24:36 +0000 Message-ID: <363A0FDD.D7091C03@dcs.shef.ac.uk> Date: Fri, 30 Oct 1998 19:13:33 +0000 From: "Nick A. Fikouras" X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: Afonso Miu CC: "freebsd-questions@FreeBSD.ORG" Subject: Re: Static Route References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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