[j-nsp] generate a default route question

Iftikhar Ahmed iftikhar.khan at gmail.com
Tue Dec 2 00:17:52 EST 2008


Hi,

Try change the policy like the one below. It will work for you

set policy-options policy-statement default-route term 1 from interface
interface_name



Regards,
iftikhar Ahmed

On Mon, Dec 1, 2008 at 9:52 PM, William Jackson <wjackson at sapphire.gi>wrote:

> 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?
>
>
>
>
>
>
>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>


More information about the juniper-nsp mailing list