Re: [j-nsp] default route via BGP

From: Jeff Aitken (jaitken@aitken.com)
Date: Tue Apr 30 2002 - 13:51:52 EDT


On Tue, Apr 30, 2002 at 01:11:34PM -0400, Christian Malo wrote:
> I need to send 0/0 to a customer via BGP ...
>
> term send-default {
> from {
> route-filter 0.0.0.0/0 exact {
> next-hop self;
> }
> }
> then accept;
> }
> term reject {
> then reject;
> }
>
>
> I just tried that simple statement but it doesn't advertise 0/0 at all

You need to have a route for 0.0.0.0/0 before you can export it to
a peer. This is the difference between the Juniper and Cisco
configs; Cisco gives you a shortcut with the 'default-originate'
keyword which does it all in one step. If you don't have a route
for 0.0.0.0/0 defined somewhere that is at least part of the problem.
FWIW we do it like this on the Junipers:

routing-options {
    generate {
        route 0.0.0.0/0 discard;
    }
}

policy-options {
    policy-statement default-originate {
        from {
            route-filter 0.0.0.0/0 exact;
        }
        then accept;
    }
}

protocols {
    bgp {
        group GROUPNAME {
            type external;
            peer-as NNNNN;
            neighbor WWW.XXX.YYY.ZZZ {
                import [ import-policy-1 import-policy-2 ];
                export [ default-originate export-policy-2 ];
            }
        }
    }
}

There was a reason we did it as a "generate" route instead of a
static, but I can't recall what it was offhand. I think it had to
do with the route showing up other places where we didn't want it,
or something. I can dig up the reference if you can't figure it
out from Juniper's docs.

One other difference is that you've made your policy terminal.
That means it will send *only* the default route. If that's a
requirement for you just tack on a 'reject' clause to the
'default-originate' policy-statement. We allow the possibility
of sending more than just a default, so the policy statement is
not terminal by design.

--Jeff



This archive was generated by hypermail 2b29 : Mon Aug 05 2002 - 10:42:35 EDT