1

To be more specific. If there are two equal cost paths between two nodes, does the SPF Algorithm give the next hop value for both paths?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 14 '17 at 22:23
2

OSPF and ISIS use the maximum-paths command to specify the maximum number of equal cost paths the SPF algorithm will take into account. By default this is set at 4, so by default up to 4 equal cost paths will be considered to each destination.

You can view the maximum paths for each protocol using the show ip protocols command:

Switch#sh ip protocols 
*** IP Routing is NSF aware ***

Routing Protocol is "application"
  Sending updates every 0 seconds
  Invalid after 0 seconds, hold down 0, flushed after 0
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Maximum path: 32
  Routing for Networks:
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 4)

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 1.1.1.1
  Number of areas in this router is 0. 0 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 110)

Routing Protocol is "isis"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Redistributing: isis
  Address Summarization:
    None
  Maximum path: 4
  Routing for Networks:
    GigabitEthernet0/1
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 115)
1

When the algorithm is running, it will see the two equal cost routes, but there is a tie-breaker (the router ID, see this question), so it will choose one as the final result. Since you can control the router IDs (or indeed the link costs as well), you can force this selection to go either way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.