Routing
Highlighted
Routing

Why does OSPF allow Export Policy in JUNOS?

[ Edited ]
‎08-18-2014 09:16 AM

Hi All,

 

In reading up on one of the guides on the website, I came across the policy section regarding OSPF:

 

"In OSPF, you can't apply import policy to affect the LSDB, and you can't apply policy to prevent the software from installing interarea OSPF routing into the routing table.  This is because a LSP assumes that all devices have the same routing information for internal routes, which causes all devices to make consistent forwarding decisions.  If you could block internal routes, you could create routing loops."

 

Makes perfect sense to me.  However, if that is the case, why are export policies permitted?  Regardless of whether or not I configured an import policy on my receiving OSPF router that blocks certain OSPF routes or if I configure an export policy on the sending router that prevents those routes from being exported to my neighbor (the receiving router), isn't the end result the same (not having a consistent interarea routing table), introducing the potential for routing loops and dest unreachables?

 

My thought is that because JUNOS sees received routes in their original form before applying import policies, it knows what they look like in their original form and thus won't manipulate OSPF routes with import policies, whereas a router receiving OSPF routes that were already manipulated on the sending end via an export policy are received in their manipulated form already and it doesn't know any better.  If that is the case, is it ill-advisable to configure OSPF export policies that block routes?

6 REPLIES 6
Highlighted
Routing

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-18-2014 02:00 PM

Export policies for OSPF in Junos are used to introduce external routes into OSPF, i.e. type 5 LSAs, making the router an ASBR.  I don't think OSPF export polices that block routes are going to have any effect, as by default no external routes are introduced into OSPF unless explicitly configured.

Highlighted
Routing
Solution
Accepted by topic author DeanR
‎08-26-2015 01:27 AM

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-19-2014 12:28 AM

Hi.

 

In OSPF we have import, export, network-sumary-import, and network-summary-export. 

Import: Control what routes will be added into routing table. Please note that import only affect LSA5 (external route).

Export: Control what routes (from other routing protocol) will be advertised to OSPF neighbor.

 

Highlighted
Routing

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-20-2014 08:39 AM

Hi Guys,

 

OK so what I am getting from this is that import and export OSPF policies can only be used when you are dealing with external routers (type 5 LSA's) right?

Highlighted
Routing

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-21-2014 08:27 AM

For example, if you have LSA5 in OSPF Database, but you don't want routing table installs this route, you can use import to prevents this.

If you have a static route, and you want to share with another OSPF neighbor, you can use export to advertise this static route

 

 

Routing

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-25-2014 12:03 PM

Gotcha.  Thank you guys.

Highlighted
Routing

Re: Why does OSPF allow Export Policy in JUNOS?

‎08-25-2014 06:35 PM

You're welcome. Please note that, Junos has network-summary-import and network-summary-export. They are used to control LSA 3.

Feedback