From owner-freebsd-net@FreeBSD.ORG Wed Oct 8 19:34:04 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A4CD16A4B3 for ; Wed, 8 Oct 2003 19:34:04 -0700 (PDT) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 309B543FD7 for ; Wed, 8 Oct 2003 19:34:02 -0700 (PDT) (envelope-from eugen@kuzbass.ru) Received: from kuzbass.ru (kost [213.184.65.82])h992Xrs6073926; Thu, 9 Oct 2003 10:33:54 +0800 (KRAST) (envelope-from eugen@kuzbass.ru) Message-ID: <3F84C90E.4F560082@kuzbass.ru> Date: Thu, 09 Oct 2003 10:33:50 +0800 From: Eugene Grosbein Organization: SVZServ X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: ru,en MIME-Version: 1.0 To: John Polstra References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit cc: net@freebsd.org Subject: Re: routed(8) and static routes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 02:34:04 -0000 John Polstra wrote: > I'm trying for the first time to get routed(8) to do something useful, > and it's got me stumped. The man page says: > > Static routes in the kernel table are preserved and included in RIP > responses if they have a valid RIP metric (see route(8)). > > >From reading the sources, "valid RIP metric" seems to mean a nonzero > hopcount. > > I have a static route for a VPN that I added like this: > > route -n add 192.168.0.0/16 192.168.198.51 -hopcount 1 > > But routed does not advertise the route. It advertises routes for all > of the network interfaces, but does not advertise my static route. > FWIW, I have the line "ripv2" in /etc/gateways to suppress the use of > RIPv1, since RIPv1 cannot handle netmasks. > > Can somebody give me a clue? It is interesting. I have FreeBSD 4.8 system A running routed(8). It has one static route also. I did not know about -hopcount, did not use it so routed(8) did not advertise it. A core router B has another static route to A and that net lives with this. Now I've added -hopcount to this static route on A and 'routed -s' started to announce this route. My /etc/gateway containg: ripv2 rdisc_interval=45 no_ag no_super_ag redirect_ok And mentioned route is /24. Eugene Grosbein