Subject: Re: Configuring routed(8) with a static default route
To: David Laight <david@l8s.co.uk>
From: Curt Sampson <cjs@cynic.net>
List: tech-net
Date: 09/04/2003 14:01:35
On Wed, 3 Sep 2003, Curt Sampson wrote:

> > routed on fw1/2 should declare itself to be the default gateway on the
> > internal network (gateways have [1] to be in the systems own subnet).
>
> Yes, indeed! But how can I make it do so?

Well, so it seems I did have the correct syntax for specifying a
static default route for routed to announce, but there's code in
routed specifically to prevent it from announcing a default route. In
src/sbin/routed/parms.c, function gwkludge(), around line 248, we have a
check on routes read in from /etc/gateways:

	if (dst == RIP_DEFAULT) {
		msglog("bad net \"%s\" in "_PATH_GATEWAYS
		       " entry \"%s\"--cannot be default",
		       dname, lptr);
		continue;
	}

This came in with the merge of Vern Schryver's 980602 RIPv2/Router
Discovery routed.

But in the end, it looks as if I'm not going to be able to do what I
need anyway, since routed appears neither to read kernel routing tables
for statically configured routes, nor advertise any routes statically
configured in /etc/gateways if they're passive. In other words, if
you're not getting all your routing information dynamically, routed just
won't do it for you. This seems an odd limitation, but I guess I'll just
have to use zebra or something similar on our gateways.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.NetBSD.org
    Don't you know, in this new Dark Age, we're all light.  --XTC