Routing

last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Direction confusion advertising Static Routes into OSPF

    Posted 07-24-2014 11:26

    Hi All,

     

    I am having an issue comprehending something regarding advertising static routes into OSPF with regards to policy direction.

     

    R1-.1--------OSPF--------.2-R2

     

    On R1 I have static route 192.168.1.0/24, and OSPF routes 10.10.10.0/30.  Task is "Advertise static route 192.168.1.0/24 on R1 into OSPF."

     

    R1: (Base config for this example)

     

    set routing-options static route 192.168.1.0/24 next-hop 10.10.10.2

    set protocols ospf area 0.0.0.0 interface em2.0

    set policy-options policy-statement STATICROUTE term ADVERTISE from protocol static

    set policy-options policy-statement STATICROUTE term ADVERTISE from route-filter 192.168.1.0/24

    set policy-options policy-statement STATICROUTE term ADVERTISE then accept


    Now, logically, I would think that if I am being asked to advertise static route on R1 INTO OSPF on R1, then I should configure the policy in the IMPORT direction.  However, I am being told that this would be configured as an export policy.


    set protocols ospf export STATICROUTE

     


    Why is this the correct direction?  Aren't export policies supposed to affect what the local rotuer (R1) sends to the neighbor router (R2)?  I don't see where we are being asked to export the static route to R2. Only to advertise the static route into OSPF on R1.

     

    Any help is appreciated.



  • 2.  RE: Direction confusion advertising Static Routes into OSPF
    Best Answer

    Posted 07-25-2014 01:12

    Hello,

     


    @DeanR wrote:

     


    Why is this the correct direction?  



    Because You are exporting from one protocol (static) into another (OSPF)?

     


    @DeanR wrote:

     Aren't export policies supposed to affect what the local rotuer (R1) sends to the neighbor router (R2)?  


    Not for OSPF. You cannot have export policy per neighbor in OSPF except in corner cases (NSSA area with 1 neighbor) so OSPF export policy affects what's being sent to ALL neighbors

     


    @DeanR wrote:

      I don't see where we are being asked to export the static route to R2. Only to advertise the static route into OSPF on R1.

     

     


    What is the end goal here, may I ask? Advertise static from R1 via OSPF but R2 should not get this route? If yoes then You need to change Your OSPF design and make R2 to reside in stub area, and R2 will not get any Type-5 exported routes.

    HTH

    Thanks
    Alex



  • 3.  RE: Direction confusion advertising Static Routes into OSPF

    Posted 07-30-2014 07:13

    Thanks Alex.  I'm with you now.  I wasn't thinking in terms of "exporting static TO OSPF.  I was thinking import static into OSPF."  I got it now though. 

     

    There isn't really an end goal, I am basically just trying to understand redistribution in JUNOS, which I think I get now.

     

    Thanks for your help.