Routing

 View Only
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.  How to export route to a specific OSPF area?

    Posted 07-07-2020 01:43

    Hi,

     

    I would like to export a direct route toward a specific area on OSPF. Let's just say that I have a direct network on 10.0.0.0/24 on router R1, R1 adjacent to R2 with area of 0.0.0.2, R1 adjacent to R3 with area 0.0.0.3. R1 is an ABR of area 0.0.0.2 and 0.0.0.3. But i just want to redistribute route of 10.0.0.0/24 only to area 0.0.0.2, not area 0.0.0.3. It should have placed an export policy as look like as following article. 

    https://www.juniper.net/documentation/en_US/junos/topics/topic-map/configuring-ospf-routing-policy.html#id-example-redistributing-static-routes-into-ospf

     

    Is there any specific match conditions on route policy-statement? Or is there any specific way to put the route export on the specific hierarchy? Or is there anything else?

     

                      area 0.0.0.2                            area 0.0.0.3
    
    [R2]--ge-0/0/0-------------------ge-0/0/0--[R1]--ge-0/0/1--------------------ge-0/0/0--[R3]
                                                 |
                                              ge-0/0/2
                                               __|__
                                            10.0.0.0/24


  • 2.  RE: How to export route to a specific OSPF area?
    Best Answer

    Posted 07-07-2020 03:34

    Hello,

     

    JUNOS OSPF export creates Type-5 LSA that have AS-wide flooding scope.

    Assuming You do NOT want to use stub/NSSA areas, or non-forwarding instances, the only way that fits Your requirement is:

    1/ on R1, include ge-0/0/2 under [protocols ospf area 2], passive if You wish

    2/ on R1, use "area-range" with restrict knob https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/area-range-edit-protocols-ospf.html

    OR

    network-summary-export https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/network-summary-export-edit-protocols-ospf.html

    OR

    network-summary-import https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/network-summary-import-edit-protocols-ospf.html

    HTH

    Thx

    Alex

     

     



  • 3.  RE: How to export route to a specific OSPF area?

    Posted 07-08-2020 15:28

    Hi aarseniev,

     

    Assigning as passive interface will have a good choice. But I think it is not convenient to use the method in general way to configure the route redistribution.

     

    I also tried using network-summary-export, which it is closer one. But I tried with the export policy, the outcome have nothing to be redistibuted.

     

    I'll get back to you after done having test using area-range. Can you get me clear the understanding, does this area-range is meant to ospf area, or it is route prefix with the range?



  • 4.  RE: How to export route to a specific OSPF area?

    Posted 07-08-2020 21:00

    Hello,

     


    @gedebook2009 wrote:

    Hi aarseniev,

     

    Assigning as passive interface will have a good choice. But I think it is not convenient to use the method in general way to configure the route redistribution.

     

     

     

    Correct and it is not scalable. General rule of thumb is that one keeps IGP "lean and clean" - ideally loopbacks only, not even links.

    Link subnets in IGP serve no real purpose apart from the fact the Ops/NMS needs to ping them to be certain the node interfaces are Up.

    The rest should be carried in iBGP.

     


    @gedebook2009 wrote:

     

     

    I also tried using network-summary-export, which it is closer one. But I tried with the export policy, the outcome have nothing to be redistibuted.

     



    if You used together [protocols ospf area X network-summary-export] _AND_ [protocols ospf export] then this is not a valid combination, and the expected result is NOOP.

     

     


    @gedebook2009 wrote:

    Can you get me clear the understanding, does this area-range is meant to ospf area, or it is route prefix with the range?


     

    The prefix.

     

    HTH

    Thx

    Alex



  • 5.  RE: How to export route to a specific OSPF area?

    Posted 07-09-2020 14:29

    Hi Alex,

     

    Thanks for your help. I have tried. I did correctly with assigning export policy only at network-summary-export hierarchy without export on protocols ospf hierarchy. And I also did using area-range. But none of these meet my needs. They are controlling the network summary that came from LSA type 3, which generally these route prefixes is came from the interface's subnet. On my doing is advertising an external route. Should I put the ge-0/0/2.0 interface in passive? That would be bad 😞 . Is there any options to do?



  • 6.  RE: How to export route to a specific OSPF area?

    Posted 07-09-2020 20:25

    Hello,

     


    @gedebook2009 wrote:

    Hi Alex,

     

    Thanks for your help. I have tried. I did correctly with assigning export policy only at network-summary-export hierarchy without export on protocols ospf hierarchy. And I also did using area-range. But none of these meet my needs. 


     

     

    I labbed up Your scenario and it works for me. Using the same topology, router names and interface names:

     

    1/ INITIAL STATE, without any "*export" policies

     

    R1:

     

    set protocols ospf area 0.0.0.2 interface ge-0/0/0.0
    set protocols ospf area 0.0.0.2 interface ge-0/0/2.0 passive
    set protocols ospf area 0.0.0.2 interface lo0.0 passive
    set protocols ospf area 0.0.0.3 interface ge-0/0/1.0
    regress@R1> show ospf neighbor 
    Address          Interface              State     ID               Pri  Dead
    169.254.15.0     ge-0/0/0.0             Full      198.51.100.1     128    36
    169.254.25.0     ge-0/0/1.0             Full      198.51.100.2     128    35
    

     

    R3 view:

     

    regress@R3> show route 10/24 exact 
    
    inet.0: 29 destinations, 31 routes (29 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    10.0.0.0/24        *[OSPF/10] 00:07:25, metric 2
                        >  to 169.254.25.1 via ge-0/0/0.0

     

    2/ Adding network-summary-export to R1:

     

    set policy-options policy-statement PL-BLK-10.0.0.0 term 1 from route-filter 10.0.0.0/24 exact
    set policy-options policy-statement PL-BLK-10.0.0.0 term 1 then reject
    set policy-options policy-statement PL-BLK-10.0.0.0 term else then accept
    set protocols ospf area 0.0.0.3 network-summary-export PL-BLK-10.0.0.0

    R3 view:

     

    regress@R3> show route 10/24 exact    
    
    regress@R3> 

     

    R2 view:

     

     

    regress@R2> show route 10/24 exact 
    
    inet.0: 29 destinations, 30 routes (29 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    10.0.0.0/24        *[OSPF/10] 00:22:46, metric 2
                        >  to 169.254.15.1 via ge-0/0/0.0

    3/ Using " area-range...restrict" on R1:

     

    set protocols ospf area 0.0.0.2 area-range 10.0.0.0/24 restrict
    delete protocols ospf area 0.0.0.3 network-summary-export

    R2 view:

     

    regress@R2> show route 10/24 exact    
    
    inet.0: 29 destinations, 30 routes (29 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    10.0.0.0/24        *[OSPF/10] 00:27:47, metric 2
                        >  to 169.254.15.1 via ge-0/0/0.0

     

    R3 view:

     

    regress@R3> show route 10/24 exact                             
    
    regress@R3> 

     

     


    @gedebook2009 wrote:

    On my doing is advertising an external route. Should I put the ge-0/0/2.0 interface in passive? That would be bad 😞 . Is there any options to do?


     

    External OSPF routes are not filtered by "network-summary-export" or "area-range" knobs, this is as per OSPF RFCs.

    If You want to use OSPF export policy and create external OSPF routes, then You have 2 options:

    a] area 2 shall be a normal area and 3 shall be stub or NSSA;

    b] more complex variant: area 2 is NSSA and area 3 is stub.

    And then You get Your filtering automatically at R1/area border, without "area-range" or "network-summary-export".

     

    However, in my view, using stub or NSSA areas is a bad OSPF design and should be avoided as much as possible because otherwise You are exposing self to known but unintended consequences when trying to expand Your network.

    HTH

    Thx

    Alex

     



  • 7.  RE: How to export route to a specific OSPF area?

    Posted 07-26-2020 22:06

    Thanks Alex. Sorry for taking longtime to response.

     

    I found as what I need is using network-summary-export and network-summary-import. Area-range knob also can do, but just getting complex to use. But the designated network interface should be included to the OSPF area with passive flag. That's too bad that it cannot filter the external route. 



  • 8.  RE: How to export route to a specific OSPF area?

    Posted 07-07-2020 03:35

    Hi gedebook2009,

     

    I have a few questions to understand the topology:

    1) Does ge-0/0/2 belong to any area?

    2) Are your considering 10.0.00/24 as an external route?

     

    Please check if the below link helps:

    https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ospf-stub-and-not-so-stubby-areas.html

     

    Please mark "Accepted Solution" if this helps you solve your query. Kudos are always appreciated!



  • 9.  RE: How to export route to a specific OSPF area?

    Posted 07-08-2020 15:19

    Hi, bmanvita.

     

    ge-0/0/2 is not belong of any ospf area. The route of 10.0.0.0/24 is an external route. I just want to advertise it to area 2. Any clue for it? So the external route only being redistributed on the area.



  • 10.  RE: How to export route to a specific OSPF area?

     
    Posted 07-07-2020 06:17

    Hi gedebook2009,

     

    Good day!!

     

    Below doucument has Simple senario, for better understanding please go the the below document and let me know if need any help.

     

    https://netwx.wordpress.com/2011/08/02/redistribution-of-static-connected-routes-to-ospf-in-junos/

     

    Please mark "Accepted Solution" if this helps.

    Kudos are always appreciated

     

    Thanks 

    Suraj