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?