Routing

last person joined: yesterday 

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.  OSPF import policy to change the external routes metric

    Posted 03-11-2011 12:05

    Hi

     

    My scenario is I have two ABR in the one OSPF area and both ABR connected to one router (say Router A) in the same area through point to point link. I want that router A should use the ABR1 to reach the internal or external OSPF routes (type 2).

     

    On router A, If I make the OSPF metric of link connected to ABR2 then all the OSPF internal routes have next hop ABR1 (which is my requirement) BUT external OSPF routes are of type 2 so again some external OSPF routes have next hope ABR2 as well.

     

    Now I made one OSPF import policy on Router A so that increase the metric of external OSPF rotuers learned through ABR2 and make them less preferred.

     

    policy-statement ospf-import {
        term 1 {
            from neighbor ABR2 IP;
            then {
                metric add 20;
                accept;
            }
        }
    }

     

    But this policy is not increasing the metric of OSPF routes learned through ABR2. Can any body advise me what I am missing or is it a good approach to accomplish this?

     

    Thanks

     

     



  • 2.  RE: OSPF import policy to change the external routes metric

    Posted 03-12-2011 05:39

    I'm not surprised that the metric is not changing from the policy-statement, since the OSPF process on the ABR is not importing any OSPF routes - they are being flooded via LSA's.

     

    Without changing the OSPF external routes to type-1, I'm not sure of the best way to accomplish what you are trying to do.  Still thinking on it...



  • 3.  RE: OSPF import policy to change the external routes metric

    Posted 03-12-2011 22:09

    Hi

     

    Actually I am not applying this OSPF import policy on the ABR. I am applying this policy only on the normal router of the area. I know I can change the metric type 1 when redistrubuting routes in to OSPF. But I just want to test OSPF import policy. OSPF import policy does not have any impact on the LSA flooding and it works only on the external OSPF routes and just change the attributes when putting the routes in the routing table with no effect on LSA flooding.

     

    I was just testing the import policy to change the external routes metric on just one router.

     

    Thanks



  • 4.  RE: OSPF import policy to change the external routes metric
    Best Answer

     
    Posted 03-17-2011 10:25

    Hi,

     

    I believe OSPF import policy are more for preventing the routes to get into the routing table and can't be used to change the metric. You can refer below url for more details.

     

    http://www.juniper.net/techpubs/en_US/junos10.4/topics/usage-guidelines/routing-applying-policies-to-ospf-routes.html

     

    Also I am not sure why in your case, by increasing the metric for ABR2 interface didn't satistfy the requirement (if I had not missed something else)

    With OSPF TYPE-2 external route, it boils down to the metric value to reach ASBR. In your case, since ASBR summary would be adveritised by ABR1 as well as ABR2, the metric for this ASBR via ABR2 would go up with higher metric configs on interface connected to ABR2 and hence leaving ABR1 to be optimal path with lesser metric to reach the exteranl route.

     

    Hope this helps.

     

    Regards

    Surya Prakash

     



  • 5.  RE: OSPF import policy to change the external routes metric

    Posted 03-19-2011 06:46

    Hi Surya

     

    Thanks for the reply. So you mean for type 2 OSPF external routes, the link would be preferred on the router who has lower cost towards the ASBR?

     

    Thanks



  • 6.  RE: OSPF import policy to change the external routes metric

     
    Posted 03-20-2011 03:27

    Hi Kashif,

     

    Yes, that's correct.

     

    Regards

    Surya Prakash