[j-nsp] generate a default route question

William Jackson wjackson at sapphire.gi
Mon Dec 1 11:52:08 EST 2008


I have a test lab where I have an edge router that I want to use to
generate a default route into my OSPF process depending on whether an
interface is up or not.

 

Code snippets:

 

Show routing-options:

generate {

    route 0.0.0.0/0 {

        policy generate_default_route;

        tag 1000;

    }

}

 

Show policy-statement

policy-statement generate_default_route {

    term match_routes {

        from {

            protocol direct;

            route-filter 1.1.1.0/24 exact;

        }

        then accept;

    }

    term reject_all_other_candidate_direct_routes {

        then reject;

    }

}

 

Then to distribute it into OSPF once it is in the routing table:

 

policy-statement inject_default_into_ospf {

    term match_default {

        from {

            route-filter 0.0.0.0/0 exact;

        }

        then accept;

    }

    then reject;

}

 

Set Protocol ospf export inject_default_into_ospf;

 

So if the interface is up then the route 1.1.1.0/24 is in the routing
table as a direct route.

 

Problem is that even when it is up I don't see my default in the routing
table:

 

run show route hidden 

 

inet.0: 271174 destinations, 271234 routes (271174 active, 0 holddown, 1
hidden)

+ = Active Route, - = Last Active, * = Both

 

0.0.0.0/0           [Aggregate] 1w4d 07:44:01, tag 1000

                      Reject

 

It is there but hidden, why and how do I get it into the active routing
table?

 

 

 



More information about the juniper-nsp mailing list