Two cloud IOS XE routers are OSPF neighbors of the campus. Users prefer the distant router because its tunnel has the lower OSPF cost. Both tunnels are healthy. How do you make the nearer router win?
Select an answer to reveal the explanation.
Short Explanation
You’re right to focus on the metric: OSPF prefers the lower cost, so the distant tunnel currently wins. Raise the OSPF cost on the distant tunnel, and the nearer tunnel becomes preferred; IKE lifetime and BGP weight do not change OSPF cost, and healthy neighbors can be ordered by cost.
Full Explanation
OSPF prefers the route with the lowest cost. Because the distant tunnel currently has the lower OSPF cost, it wins while both neighbors are healthy; raising the OSPF cost on the distant tunnel makes the nearer tunnel the preferred path. Changing the IKE lifetime on the nearer tunnel does not affect OSPF’s route calculation: IKE manages tunnel security, not OSPF metrics. Setting BGP weight on the campus does not help either, because weight is a local BGP attribute and OSPF does not copy it into its cost. Shutting OSPF entirely is unnecessary and removes the dynamic routing choice; two healthy OSPF neighbors can be compared by cost, which is a normal use of the metric. Exam caveat: cost is not always the first comparison if the nearer router advertises the prefix as an external route while the distant router advertises it as an intra-area route, so check the route type before relying only on cost. Practical check: after changing the distant tunnel’s cost, use show ip route on the campus and confirm that the VPC prefix uses the nearer tunnel.