1

Let's say, that I have a following network topology:

isp_router[t1-0/0/0.0] <-> [t1-0/0/0.0]ospf_asbr

I want to generate a default route for IGP in ospf_asbr router. One option would be a static route:

root@Dubbel> show configuration routing-options
rib inet.0 {
    static {
        /* 84.10.113.1 is configured on isp_router interface t1-0/0/0.0 */
        route 0.0.0.0/0 next-hop 84.10.113.1;
    }
}

root@Dubbel> 

Another option should be a generated route with policy filter which allows only the 84.10.113.0/31 as a contributing route. For example, like this:

[edit]
root@Dubbel# show routing-options generate 
route 0.0.0.0/0 policy gen_default;

[edit]
root@Dubbel# show policy-options policy-statement gen_default
term 1 {
    from {
        protocol direct;
        route-filter 84.10.113.0/31 exact;
    }
    then accept;
}
term 2 {
    then reject;
}

[edit]
root@Dubbel# 

Is one approach better than other? Both should withdraw the default route from the IGP if the link between the isp_router and ospf_asbr fails. Or in general, what are the differences between injecting the default route to IGP using a static route or using a generated route?

4

Static route

This route will be installed as long as its next-hop is reachable. The default route Preference is 5.

Static routes are simpler and are appropriate when there's no routing protocol running between you and your transit provider.

Aggregate route

Aggregate routes are only installed if at least one contributing route is active. The contributors, by default, are any route longer-than the configured aggregate, so 192.0.2.0/25 would be a valid contributor to 192.0.2.0/24. Aggregate routes have default Preference 130.

The next-hop of aggregate routes is discard or a next-table.

Contributing routes may be filtered through a policy, as you describe in your question.

Generate route

Generate routes are like Aggregates. The distinction is generate routes adopt the next-hop of their primary contributing route.

The primary contributing route is the one with the lowest Preference, and after that, the lowest subnet address.

Generate routes are useful for configuring a default route toward transit which will be withdrawn (or replaced by a generate route with a differing next-hop) if, for example, an associated transit provider BGP session announcing at least one contributing route stops announcing them, or goes down.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.