12-31-2011 07:47 PM
The routes advertised by a protocol are associated with route preference. This value helps in choosing the route from most reliable protocol. For instance say you have 188.8.131.52/32 route being received by OSPF (internal) as well as by RIP.
In this case, theoretical OSPF would be the obvious choice. In JUNOS, a route from OSPF(internal) would have preference of 10 while the same route from RIP would have 100. The lowest preference would be used as active route in routing table.
Refer below for preference values of all protocols:
Now, in case if you still have same routes coming from different neighbors but with same protocol, then you will select the route based on the route metric. The one with least metric would be active in routing table.
02-07-2012 06:41 AM
On route metric,
A) set routing-instances To_Z routing-options static route 0.0.0.0/0 qualified-next-hop 172.16.0.1 metric 6
B) set routing-instances To_Z routing-options static route 0.0.0.0/0 qualified-next-hop 172.16.0.2 metric 5
Which will take a higher priority? B) right?
02-07-2012 08:24 AM
The answer is "it depends"
if 172.16.0.1 and 172.16.0.2 are both reachable via direct routes, then routeB wins.
If one or both next-hop IPs are not reachable via direct routes and "resolve" knob is not configured (it isn't if the config below is the complete one), then it could be A or B or none.
02-08-2012 06:30 PM
02-09-2012 07:48 AM
The "resolve" knob is used when your specified next hop is not directly reachable (indirect next-hop) - by default that route would not be considered. If you append your route with that option (route xx.xx.xx.xx next-hop xx.xx.xx.xx resolve) AND if there is another route that will allow traffic to get to that next hop then it is an a valid route entry.
01-07-2014 06:32 PM
Please, help me, the documentation says:
Metric The metric is a preference number, with the lowest number having the
highest priority.All directly connected networks have a metric of zero. All static
routes have a default metric of one.There may be cases in which you need to add
the same route twice, the preferred route with the lower metric and the less preferred
route with the higher metric. If the first route is unavailable, the firewall will
use the next route.
"If the first route is unavailable...", how does Juniper know this? Just if the interface is down?
I want it to use the next route(metric 1 to metric 2) if the gateway is unavailable.
(In my case, when the gateway is unavailable, the interface is not down)
I already read about track IP, but it's for HW failover, and not route. So I can't use it to ping the gateway, and disable the route when it's not responding.
I don't believe that the only way to do this is configuring a tunnel interface.