Routing
Highlighted
Routing

Adding metrics to OSPF Routes?

‎02-16-2020 06:25 PM

I have three redundant routes being advertised in OSPF.  Two from one SRX and the thrid on another SRX.  How can I setup preference to the larger 10G circut, then to the 1G and then to the Flex100mb/1gb circut ? I tried adding the metric to the interface but that didn't seam to add the metric to the route.  The routes are being advertised as directly connected.  There are no static routes being advertised.  

9 REPLIES 9
Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-16-2020 07:31 PM

Hello,

 

Please post the "show route protocol ospf <blah/blah> extensive" for each of the redundant routes You are concerned about.

Secondly, You want to assign metric to links, not routes.

Generally, if You want to ALWAYS prefer 10G link over 1G link over 100/1000 link, then :

1/ make sure these routes are NOT LSA-5/Type-5 External with Type 2 metric. Either LSA-1/Type-1, LSA-3/Type-3 or LSA-5/Type-5 with External Type-1 metric will do. Your OSPF design (single area/multiarea/multiarea with stub/NSSA areas) would dictate what LSA/Type is appropriate.

2/ assign metric in ascending fashion to ALL Your 10G/1G/100 links, such as

10G - metric 1000

 1G  - metric 10000

100 - metric 100000

You could use bandwidth-based metric with "reference-bandwidth" statement but 

(a) it has limited applicability - 100G link can only have min metric 1 meaning 100GE LAG with 2 or more links also will get auto-assigned metric 1,

(b) it prevents load-balance across unequal-bandwidth links, such as if You have 2 parallel LAGs of 3x10GE and 4x10GE, You'd want to load-balance in order not to waste that expensive BW but if You used bandwidth-based link metrics, OSPF won't allow You to do that. There are ways to LB across unequal-BW unequal-cost links but it involves MPLS (RSVP-TE or SRTE) and is probably too much at this point.  

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-16-2020 08:05 PM

Hi Alex,

Here is the output from both SRX's with the complete output attached.  

 

supervisor@EQDA2-SRX-1> show route protocol ospf 0.0.0.0/0 extensive

inet.0: 40 destinations, 45 routes (40 active, 0 holddown, 0 hidden)
0.0.0.0/0 (2 entries, 1 announced)
TSI:
KRT in-kernel 0.0.0.0/0 -> {64.88.200.161}
OSPF area : 0.0.0.0, LSA ID : 0.0.0.0, LSA type : Extern
OSPF Preference: 150
Next hop type: Router, Next hop index: 586
Address: 0x9db4cf0
Next-hop reference count: 31
Next hop: 10.0.0.9 via xe-0/0/18.0, selected
Session Id: 0x0
State: <Int Ext>
Inactive reason: Route Preference
Local AS: 65412
Age: 1d 20:35:03 Metric: 0
Validation State: unverified
Tag: 0
Task: OSPF
AS path: I
AS path: Recorded

 

supervisor@6301-SRX-1> show route protocol ospf 0.0.0.0/0 extensive

inet.0: 36 destinations, 37 routes (36 active, 0 holddown, 0 hidden)
0.0.0.0/0 (2 entries, 1 announced)
TSI:
KRT in-kernel 0.0.0.0/0 -> {12.246.227.37}
OSPF area : 0.0.0.0, LSA ID : 0.0.0.0, LSA type : Extern
OSPF Preference: 150
Next hop type: Router, Next hop index: 1358
Address: 0x198cca4
Next-hop reference count: 35
Next hop: 10.0.0.2 via ge-0/0/11.0, selected
Session Id: 0x0
State: <Int Ext>
Inactive reason: Route Preference
Age: 1w1d 5:04:05 Metric: 0
Validation State: unverified
Tag: 0
Task: OSPF
AS path: I
AS path: Recorded

Attachments

Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-16-2020 08:16 PM

Hello,

Thanks for posting the route printouts.

Which ones are "three redundant routes" You are interested in?

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: Adding metrics to OSPF Routes?

[ Edited ]
‎02-16-2020 08:34 PM

When i look at the routes from the core router (non-srx), this is how they appear:

 

6301-CORESWX-1# show ip route ospf

IP Route Entries

6301-CORESWX-1# show ip route ospf

                                IP Route Entries

  Destination        Gateway         VLAN Type      Sub-Type   Metric     Dist.
  ------------------ --------------- ---- --------- ---------- ---------- -----
  0.0.0.0/0          10.0.0.1        1000 ospf      External2  0          110
  0.0.0.0/0          10.0.0.6        1011 ospf      External2  0          110
  0.0.0.0/0          10.0.0.10       1010 ospf      External2  0          110

 the first one comes from the router named 6301-SRX-1 and the last two come from the router named EQDA2-SRX-1 

Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-17-2020 12:11 AM

Hello,

Please also post the sanitized configs from both SRXes.

I would like to see how You are advertising those 0/0 routes as "directly connected", including two 0/0 routes from single SRX, as Your OP surmises.

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-17-2020 07:01 AM

Thanks Alex,

config's attached. 

Attachments

Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-17-2020 09:57 AM

Hello,

Thanks for sharing Your configs.

On EQDA-SRX-1, do You have OSPF adjacencies on interfaces xe-0/0/18.0, (LEVEL3-10gWAVE) and ge-0/0/12.0 (ATT-Ondemand)? 

It looks like You are receiving 2 default routes from there. 

Same question about 6301-SRX-1 - do You have OSPF adjacency there over ge-0/0/11.0, and receive a default route over it, perhaps?

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-17-2020 02:09 PM

I couldn't tell you with any certainty.  This is abotu the extent of my Juniper/OSPF knowledge.  

Highlighted
Routing

Re: Adding metrics to OSPF Routes?

‎02-17-2020 08:17 PM

Hello,

 

 wrote:

 This is abotu the extent of my Juniper/OSPF knowledge.  


 

 

OSPF is not proprietary to Juniper.

Right, then I suggest to get educated pronto using either this book https://www.amazon.com/Juniper-Cisco-Routing-Protocols-Multivendor/dp/0471215929 or Juniper Education Services course.

 

Anyway, back to topic - the route printouts You shared earlier indicate Your SRXes receive 0/0 LSA5 Type-2 routes from the interfaces I mentioned. If this is indeed the case and not a result of some left-behind config from previous t'shooting attempts, then You need to contact the admins for the boxes that are connected to aforementioned SRX interfaces and tell them to change the 0/0 route to be advertised to Your SRXes as LSA5 Type-1. Then You can add metric to Your links and live happily ever after.

HTH

Thx
Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !