cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
513
Views
3
Helpful
1
Replies

OSPF WAN link selection

chris.lau
Level 1
Level 1

Hi,

Can I know how does OSPF protocol select the routing link by, metric, cost and priority?

For example, does it mean that the higher WAN link metric value is the preferred link?

1 Reply 1

jstoecker
Level 1
Level 1

In the RFCs, OSPF selects a path based on a single value called "cost", which is not defined to be a particular parameter or data.

It is implementation dependent, so how IOS OSPF derives its cost may or may not be different from some other vendor's OSPF implementation.

The cisco IOS OSPF uses a value based on the bandwidth of the interface. This value is inversely proportional, so a higher bandwidth has a lower cost. The "ospf auto-cost reference-bandwidth [value]", where the value is in megabits per second, changes the calculation. The default for this setting is 100, so a 100mbit interface has a cost of 1, a T-1 has a cost of 64, etc.

In the routing table, the lower OSPF cost value is preferred. If you have two paths of the same cost, they will both show up in the results of "show ip route".

You should be careful to set your 'bandwidth' statements on your serial interfaces to ensure the calculation works as intended. Otherwise, all serial interfaces are treated as 1.544mbit in the OSPF cost calculation.

John

Review Cisco Networking for a $25 gift card