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 {
        /* is configured on isp_router interface t1-0/0/0.0 */
        route next-hop;


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

root@Dubbel# show routing-options generate 
route policy gen_default;

root@Dubbel# show policy-options policy-statement gen_default
term 1 {
    from {
        protocol direct;
        route-filter exact;
    then accept;
term 2 {
    then reject;


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?


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 would be a valid contributor to 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.

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.