[j-nsp] Conditional advertising of default routes

Terje Krogdahl terje at krogdahl.net
Thu Jan 26 08:26:05 EST 2006


On Thu, Jan 26, 2006 at 10:46:49AM +0200, radu.pavaloiu at dynamicnetworks.ro wrote:
> I think you can use a generated default route with a contrib of uplink
> prefix. When the uplink disappears the contrib route do the same and the
> generated route disappears.

I like doing something like this, it makes sure I use the routes
from the correct upstream, is pretty generic in which routes it
requires, and makes show route extensive tolerable:

routing-options {
    generate {
        route 0.0.0.0/0 {
            policy gendefault;
        }
    }
}
policy-options {
    policy-statement gendefault {
        term upstreamroutes {
            from {
                as-path upstream;
                route-filter 0.0.0.0/0 upto /16;
            }
            then accept;
        }
        term end {
            then reject;
        }
    }
    as-path upstream "^65000 ";
}

-- 
Terje Krogdahl

  All roads lead to Rome
     - A clearly confused router (R. Perlman)


More information about the juniper-nsp mailing list