To make the example as simple as possible. We have an OSPF area setup so that if one link fails or gets congested, traffic will reroute through the other. Is there a way to have traffic pass from one end of the OSPF area to it's destination without adding static routes on every router in-between?

I've tried the following but it doesn't seem to work:

policy-statement into-ospf {
    term connected {
        from protocol direct;
        then accept;
    term static {
        from protocol static;
        then accept;
export [ DEFAULT_ROUTE into-ospf ];
reference-bandwidth 10g;
area {
    interface lo0.0;
    interface ge-0/0/1.0 {
        metric 20;
    interface ge-0/0/2.0 {
        metric 80;

In the meantime, I'm just redefining every route on every router inside the OSPF area:

static {
    route next-hop x.x.0.53;
    route x.x.0.80/28 next-hop [ x.x.0.62 x.x.0.58 ];
    route x.x.0.72/29 next-hop [ x.x.0.62 x.x.0.58 ];
    route x.x.0.64/29 next-hop [ x.x.0.62 x.x.0.58 ];
    route x.x.0.160/30 next-hop [ x.x.0.62 x.x.0.58 ];
    route x.x.0.164/30 next-hop [ x.x.0.62 x.x.0.58 ];
    route x.x.1.128/28 next-hop [ x.x.0.62 x.x.0.58 ];
  • The entire point of a dynamic routing protocol, including OSPF, is that you do not need to configure static routes at all. Each router in an OSPF area shares everything it knows, including what it has learned from other routers, with every other router to which it is connected. A router in an area has complete knowledge of every route on every other router, and it makes decisions on how to populate the routing table based on the cost of possible paths to the destinations.
    – Ron Maupin
    Jul 15 '17 at 4:05
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Feb 19 '18 at 5:49

Are they all using OSPF? There shouldn't be any need to configure static routes since you need to advertise routes using OSPF and all routers within an area and every routers knows every routes.

If your primary router is using other than OSPF then that route will need to be redistributed to the ospf router. In this case, I believe you configure only one area which is area 0.

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.