Junpier SRX OSPF: preferring one WAN router over another

In the example blow - Juniper firewall has heard from two WAN routers of a default route via OSPF.
It seems basically happenchance that is the preferred default route. What could I do on the juniper to make to always and purposely be chosen over the .62?

myjuniper> show route          *[OSPF/150] 1w6d 16:05:01, metric 26, tag 0
                      to via reth0.0
                    > to via reth0.0
amigan_99Network EngineerAsked:
Who is Participating?
JustInCaseConnect With a Mentor Commented:
Default metric is 20 (so you may need to lower it):

router ospf x
default-information originate metric 10

You could also change metric type  to E1 and leave cost as it is (default is E2 - option will work only if second router is advertising default route as type 2). Type 1 is preferred over type 2.

default-information originate metric-type 1
If you do not want to load balance traffic, on upstream device that is advertising default route change default route cost (e.g - cost 20). Default route will higher metric be removed from routing table, and in the case that primary default route is lost will be inserted back in routing table. As far as I know, if cost is the same Juniper will always randomly pick one path.
amigan_99Network EngineerAuthor Commented:
The upstream is a Cisco router. How do I make the the cost of = 20?
amigan_99Network EngineerAuthor Commented:
Thanks much.
You're welcome.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.