Junpier SRX OSPF: preferring one WAN router over another

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

myjuniper> show route
0.0.0.0/0          *[OSPF/150] 1w6d 16:05:01, metric 26, tag 0
                      to 13.79.23.62 via reth0.0
                    > to 13.79.23.63 via reth0.0
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
If you do not want to load balance traffic, on upstream device that is advertising default route change default route cost (e.g 13.79.23.63 - 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 Engineer

Author

Commented:
The upstream is a Cisco router. How do I make the the cost of 13.79.23.63 = 20?
Distinguished Expert 2018
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
amigan_99Network Engineer

Author

Commented:
Thanks much.
Distinguished Expert 2018

Commented:
You're welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial