Junos OS

Expand all | Collapse all

OSPF export policy - why is it called an export ?

  • 1.  OSPF export policy - why is it called an export ?

    Posted 11-16-2017 03:43

    I am new to Juniper with a strong Cisco (CCIP) background and trying to develop the mindset required to understand some logic used by JunOS.

     

    For instance, let's consider OSPF export policy.  According to Juniper : "In the export statement, you list the name of the routing policy to be evaluated when routes are being exported from the routing table into OSPF."

     

    Now, we do use the export statement under protocol OSPF, so I assume every statment here should be viewed from OSPF standpoint.

     

    Can someone please explain the logic of calling this "export" when it is essentially an "import" from OSPF process perspective ? Don't we define the prefixes that is imported to OSPF from the routing table.

     

    I am asking this, because I have the same confusion with BGP import/export definitions and would like to memorize somehow their's function.

     

    Thank you.

     



  • 2.  RE: OSPF export policy - why is it called an export ?

    Posted 11-16-2017 04:13

    Hello,

    It may be an "import" from OSPF protocol perspective but it is an "export" from JUNOS' Routing Protocol Daemon (RPD) perspective.

    The RPD is the JUNOS "brain" that does all shuffling, slicing & dicing of routing information. There are no separate brains for OSPF, ISIS, BGP, PIM etc, it's all done by main brain called RPD.

    Therefore there are two main types of operations RPD does:

    1/ import 

    - it is executed when RPD collates raw info from routing protocol packet exchanges

    2/ export

    - when RPD puts "cooked"/processed info into routing protocol packets

    Default export/import JUNOS routing policies are explained here

    https://www.juniper.net/documentation/en_US/junos/topics/concept/policy-routing-policies-actions-defaults.html

    Then JUNOS also does an export/import to/from routing instances and routing information bases (RIBs) but let's not go into there just yet 🙂

    HTH

    Thx
    Alex



  • 3.  RE: OSPF export policy - why is it called an export ?

    Posted 11-17-2017 10:46

    In Junos, Import policy is used to influence new routes entering into the primary routing table or rib-local table. Export policy on the other hand is used to export or advertise route existing in the rib-local table. 

    Dynamic routing protocols such as OSPF, RIP, BGP etc. have a default import and export policy. These default routing policies however can be altered using customized import and export policy. 

    For example, the default export policy for OSPF is to not advertise any routes learned from other routing information sources such as (statically learned routes or dynamically learned routes through RIP, BGP etc.) to its neighbor. Therefore, for example if you had to advertise a statically learned route to an OSPF neighbor, then an explicit export policy has to be written which would have to match the static route and advertise to the neighbor. The same thing would have to be done for routes learned through a BGP or a RIP neighor.



  • 4.  RE: OSPF export policy - why is it called an export ?

    Posted 11-18-2017 16:47

    OSPF Export policy filter External routes to ospf (redistributed from other protocols . LSA5 only) it does not affect LSA3 or LSA4.

    The same is ture for Import policy. Do not mix it with LSA summarization on ABRs.

     

    BGP import and export policy affects to all the routes accpeted or advertised.

     

    Hope it helps,

    Thanks,