cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2579
Views
20
Helpful
7
Replies

Link-State Best Loop-free Path Calculation

UncleJP
Level 1
Level 1

Studying for ENCOR, I ran across this question, which through me for a loop:

 

A link-state routing protocol finds the best loop free path by using ______.
a. hop count
b. bandwidth
c. delay
d. interface cost
e. path attributes

 

Answer: E

 

I was under the impression that OSPF, a link-state protocol, uses path cost to find the best path. This path cost is based off of bandwidth. This is explained below:

 

https://www.omnisecu.com/cisco-certified-network-associate-ccna/what-is-ospf-metric-value-cost-and-ospf-default-cost-reference-bandwidth.php

 

Am I missing something? Is the question just worded weirdly? Any input is appreciated.

1 Accepted Solution

Accepted Solutions

Ah, but the quote is about using Dijkstra algorithm (which OSPF does) to calculate shortest paths using a link cost which (really should have the word "may") using available bandwidth among other things. This quote shouldn't be taken to assume OSPF actually always uses available bandwidth computing link cost.

 

If you're considering OSPF (v2) you should really look at RFC 2328 which has things like:

 

The cost of a route is described by a single dimensionless metric.

 

Which means the cost isn't really tied to any attribute.  It's whatever you want it to be.  However, in your topology, if you want cost to some how to represent bandwidth, sure you can, but that's not part of the OSPF standard.  Cisco does use bandwidth to auto calculate OSPF cost but again not all vendors do (and those that do often use a larger default base bandwidth [Cisco uses 100 Mbps, other vendors might use gig]; also don't overlook you can assign a cost manually to an interface to be whatever you want. NB: on some vendor's devices, if you don't want a cost of one, you must do this.

 

    Interface output cost(s)
        The cost of sending a data packet on the interface, expressed in
        the link state metric.  This is advertised as the link cost for
        this interface in the router-LSA. The cost of an interface must
        be greater than zero.

The only mention of "bandwidth" in this RFC is:

 

        The OSPF Working Group of the IETF has extended this work in
        developing the OSPF protocol.  The Designated Router concept has
        been greatly enhanced to further reduce the amount of routing
        traffic required.  Multicast capabilities are utilized for
        additional routing bandwidth reduction.  An area routing scheme
        has been developed enabling information
        hiding/protection/reduction.  Finally, the algorithms have been
        tailored for efficient operation in TCP/IP internets.

 

Dijkstra's algorithm is mentioned multiple times when the RFC describes computing shortest path tree.

 

BTW, I also quickly looked at RFC 2328's updated RFCs, but I didn't notice any that change the above.

 

Also BTW, there can be an issue with auto calculating OSPF cost using some bandwidth base.  This happen when you have a large range of bandwidths, say from 10g to fractional T1, and a "deep" topology.  Basically, the OSPF counter fills and you get the same path costs even when they are not equal.  (Or the converse, if the default is less bandwidths being use, all links of that cost, or better, appear equal.).

 

Then there are situations where you have other reasons for "engineering" one path vs. another, where using just available bandwidths would not be suitable.  So, it's really "good" that OSPF standard doesn't actually tie any attribute to link cost.

View solution in original post

7 Replies 7

Joseph W. Doherty
Hall of Fame
Hall of Fame
Using bandwidth to compute the OSPF link cost is a Cisco (and some other vendors) "feature". It's not part of the OSPF standard.

Martin L
VIP
VIP

my concern with this question is wording "path attributes". what are path attributes? it is just value of so called "metric" which in Cisco OSPF means "cost based on bandwidth" What about types of routes such intra-area, inter-area, external E or N ? are those can be considered as path attributes? After all, an intra-area route is always preferred to an external route regardless of metric.
True, When they standardized OSPF, they left "metric" as open variable to be implemented by vendor. The path cost is based on bandwidth.

UncleJP
Level 1
Level 1

https://en.wikipedia.org/wiki/Link-state_routing_protocol

 

"Each node independently runs an algorithm over the map to determine the shortest path from itself to every other node in the network; generally some variant of Dijkstra's algorithm is used. This is based around a link cost across each path which includes available bandwidth among other things."

 

I tend to shy away from Wikipedia, but it was helpful for this situation. The key phrase is "among other things" which indicates that there are multiple path attributes that can be used for finding the best path for general OSPF.

 

Thank you to all who gave their input! @Martin L @Joseph W. Doherty 

Ah, but the quote is about using Dijkstra algorithm (which OSPF does) to calculate shortest paths using a link cost which (really should have the word "may") using available bandwidth among other things. This quote shouldn't be taken to assume OSPF actually always uses available bandwidth computing link cost.

 

If you're considering OSPF (v2) you should really look at RFC 2328 which has things like:

 

The cost of a route is described by a single dimensionless metric.

 

Which means the cost isn't really tied to any attribute.  It's whatever you want it to be.  However, in your topology, if you want cost to some how to represent bandwidth, sure you can, but that's not part of the OSPF standard.  Cisco does use bandwidth to auto calculate OSPF cost but again not all vendors do (and those that do often use a larger default base bandwidth [Cisco uses 100 Mbps, other vendors might use gig]; also don't overlook you can assign a cost manually to an interface to be whatever you want. NB: on some vendor's devices, if you don't want a cost of one, you must do this.

 

    Interface output cost(s)
        The cost of sending a data packet on the interface, expressed in
        the link state metric.  This is advertised as the link cost for
        this interface in the router-LSA. The cost of an interface must
        be greater than zero.

The only mention of "bandwidth" in this RFC is:

 

        The OSPF Working Group of the IETF has extended this work in
        developing the OSPF protocol.  The Designated Router concept has
        been greatly enhanced to further reduce the amount of routing
        traffic required.  Multicast capabilities are utilized for
        additional routing bandwidth reduction.  An area routing scheme
        has been developed enabling information
        hiding/protection/reduction.  Finally, the algorithms have been
        tailored for efficient operation in TCP/IP internets.

 

Dijkstra's algorithm is mentioned multiple times when the RFC describes computing shortest path tree.

 

BTW, I also quickly looked at RFC 2328's updated RFCs, but I didn't notice any that change the above.

 

Also BTW, there can be an issue with auto calculating OSPF cost using some bandwidth base.  This happen when you have a large range of bandwidths, say from 10g to fractional T1, and a "deep" topology.  Basically, the OSPF counter fills and you get the same path costs even when they are not equal.  (Or the converse, if the default is less bandwidths being use, all links of that cost, or better, appear equal.).

 

Then there are situations where you have other reasons for "engineering" one path vs. another, where using just available bandwidths would not be suitable.  So, it's really "good" that OSPF standard doesn't actually tie any attribute to link cost.

This really helped! Thank you, Joseph!

Martin L
VIP
VIP

I think i figure what is that question about:
RIP uses hop count; EIGRP will bandwidth and delay; BGP will use path attributes;
what is left is interface cost.
OSPF uses cost based on interface bandwidth. So, I guess the answer is interface cost.

I think the answer would be "path attributes" based on the solution above. Not all vendors use bandwidth for their path cost calculation for OSPF, for example.
Review Cisco Networking for a $25 gift card