cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
631
Views
5
Helpful
2
Replies

OSPF Cost - Explanation

ronald.ramzy
Level 1
Level 1

Hi,

I need to understand, if I have Two GRE Tunnels with SAME OSPF COST, which route will be preferred. Destination can be reached from both Tunnels

How does it work in the background, can someone explain.

2 Replies 2

Jerry Ye
Cisco Employee
Cisco Employee

Hi Ronald,

If a specification destination can be reach via these two GRE tunnels and the metrics are the same, the router will load balance traffic to this destination.

Cost value is between two adjacent routers. To calculate the metric to a specific destination from a source, you have to add all the link's costs together.

HTH,

jerry

xcz504d1114
Level 4
Level 4

To add a little bit more to Jerry's response, cost in OSPF is calculated based on 100 Mbits.

So a Fast Ethernet port that operates at 100 Mbits will have a cost value of 1, you can verify this by issuing a "show ip ospf interface fast 0/0".

To calculate cost acrossed an entire path you would divide the link speed (in bits) by 100,000,000 (100 Mbits).

So a T1 with 1.544 Mbits would be represented as such:

100,000,000 / 1,544,000 = 64.76

You would then round up to 65, a T1 would have a cost of 65.

You perform this for every link in the path then add up the values to get your cost.

HTH,

Craig

Review Cisco Networking for a $25 gift card