Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

OSPF Cost - Explanation

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
Cisco Employee

Re: OSPF Cost - Explanation

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

Bronze

Re: OSPF Cost - Explanation

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

212
Views
5
Helpful
2
Replies