cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2366
Views
28
Helpful
13
Replies

Dynamic routing steps

lucad7846
Level 1
Level 1

Hi Guys

Having a hard time to figure out what is the correct order of dynamic routing. I was advised the order I chose is not correct. 

Since I can't find much info on this topic, I was just simply using some logic to determine the order of operations, which, as stated above, it turned out to be incorrect.

Can someone please advise the correct order and let me know where I can find some info in related to the topic? I would love to learn but I can't seem to be able to find anything on this particular topic. 

I have attached a photo for reference. I simply need to set the correct order of the various steps. 

If I type steps of dynamic routing I find stuff regarding protocols but nothing in relation to the steps that a router goes through to learn and advertise new routes. 

Many thanks in advance

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello Luca (I hope I guessed your name right),

I agree with you that this question is dubious at best. If nothing else, it asks about something that is proprietary and implementation-dependent. Various operating systems on routers may sort or parallelize the steps in different order and so there is no clear, unambiguous answer to this question.

Let's at least debate it, though, and let us assume an interior gateway protocol (IGP).

IGPs are enabled by running them on specific interfaces of a router - in Cisco, you either use the

network

command, or start them with a dedicated command right on the interface

(such as ip ospf 1 area 0 or ip router isis)

In both cases, you are telling the IGP what interface to run on, and from that interface, the IGP immediately learns the directly connected network. Knowing the directly connected network serves a number of purposes here:

  1. The IGP learns the network so that it can advertise it to its neighbors
  2. The IGP knows what source IP address to use when attempting to send its packets out the interface to the neighbors
  3. The IGP performs sanity checks to verify if the neighbors are on the same IP network on the interface

This together would be Step 1 in your screenshot.

Assuming that the IGP then acquires its neighbors. Now what? Every IGP would now try to synchronize with the new neighbor by sending it all the best routes (in case of RIP or EIGRP) or the link-state database contents (in the case of OSPF or IS-IS) it knows about so far. But if the IGP just came up, the only knowledge it has are the directly connected networks, but these need to be shared nonetheless. So the IGP would not wait to receive some remote networks in order to be allowed to send its own - rather, at this point, the IGP would decide that the best paths to the known directly connected networks are the directly connected networks themselves (and that is a part of the routing algorithm!), and advertise them to the neighbor.

Note that this would effectively merge Steps 3 and 5 in your screenshot, so far skipping Steps 2 and 4.

Let's assume now that the two neighbors are up and synchronized, and one of them advertises a new network (note - a new one for simplicity reasons). The other router learns about it, but whether it first runs the best path algorithm, installs the route into the routing table, and then advertises it to its own neighbors, or whether it does it in a different order very much depends on the protocol.

For example, EIGRP on a router would do this:

  1. Receive an update about a new remote network
  2. Store the network in its topology table
  3. Attempt to install it into the routing table
  4. If and only if EIGRP was successful to install the route into the routing table, then advertise it to other neighbors

The step iv here makes sure that EIGRP advertises a route only if the router is using it itself. This kind of sanity check is done by distance-vector routing protocols in general, so both RIP and EIGRP.

But OSPF and IS-IS would operate differently:

  1. Receive an update about a new remote network (which would be in the form of an OSPF Link State Advertisement or an IS-IS Link State Packet)
  2. Store the LSA/LSP into the link-state database
  3. Flood the updated LSA/LSP to its neighbors
  4. After a certain configurable delay, run the SPF and attempt to install the best route into the routing table

Note that unlike distance vector protocols that first do the computation to even arrive at the new resulting metric, then installing the route in the routing table, and only then sharing it with other neighbors, link-state routing protocols have different order of operations: They essentially first share the updated LSA/LSP so that the entire area (or more) has the updated information, and then each router independently runs the SPF over the (hopefully identical) link-state database contents. And if, after SPF, the route didn't make it into the routing table, well, too bad, because link-state protocols cannot un-advertise a route only because some router is not really using it even if it knows about it.

So this throws the order of Steps 2 through 5 in your screenshot around completely.

And with BGP, the variability would get even bigger - BGP, for example, does not have a concept of directly connected networks at all.

So bottom line is that this question item that you've shared in your screenshot is too simplified and too general to be answered unambiguously. What we can say about the order of operations in dynamic routing is only this:

  1. The routing protocol's knowledge about networks is populated by three primary sources: Directly connected networks, networks learned from neighbors, and local redistribution from another routing protocol. The learning of networks from these three sources is independent and may occur in any order depending on the implementation of the routing protocol, even in parallel.
  2. Upon receiving an update,
    1. Distance-vector routing protocols would first run the shortest path algorithm, install the route into the routing table, and only then advertise it to other neighbors. One of the reasons is a sanity check, the other reason is the crucial fact that before a router runs the shortest path algorithm locally, it does not even know what metric to advertise to its own neighbors. So distance-vector protocols absolutely must run the short path algorithm on the update before sharing anything with the neighbors because otherwise, they don't even know what to share.
    2. Link-state routing protocols would first share the update with all its neighbors because the update itself is "absolute" - it does not need to be "added to", "modified" or "improved" by any local router. Then, after a while, each router independently run the SPF over the link-state database contents that hopefully contain the updated information.

Please feel welcome to ask further!

Best regards,
Peter

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

The "correct order of dynamic routing", eh?

For the operations in your screenshot, order doesn't matter!

Routing (also not just for a dynamic routing protocol) is dynamic.  I.e. it's constantly being revised, as route information is first received and as that information is revised.

For example (using your screenshot list), likely a router will learn, early, about its connected networks and add them to its route table.  However, such connected networks need an "up" interface, which can, of course, change status.  I.e. The route table is subject to dynamic change moment by moment based on the current up/down status of an interface.

As an aside, your list doesn't mention static routes.  These might even be processed before connected interfaces, but even they, as you manually add or remove them from the config, will also, dynamically, may add or remove them from the route table.  Further, they might also be redistributed into a dynamic routing protocol(s).

Now, even before considering your other listed processes, which appear to be also tied to dynamic routing protocol, which should be processed first, connected interfaces or static routes?  Does it truly matter?  The reason it doesn't much matter, is because we understand there's a huge difference between a converged network, versus one that's in convergence.  I.e. the latter doesn't yet reflect the true state/topology of the network.

Dynamic protocols, only really differ from connected networks and static networks, in that often there's more "lag" for the network to reach a converged state.

It's possible, in your list, doing some of those operations before others might speed convergence, but by how much?  Beyond possible convergence speed, if the same final (converged) result is obtained, is there really a "correct order" for doing them?

Consider 1 plus 2 plus 3, which equals six.  Does it logically matter whether you do (1 + 2) + 3 vs. 1 + (2 + 3) vs. (1 + 3) + 2?  Further, consider one of the operands might arrive later than the others, but there's no way to know that before it happens.  I.e. if "2" usually, but not always, arrives after "1" and "3", do you go ahead and compute 1 + 3, as soon as you have them, or do you wait a bit, waiting to see if a third operand arrives before doing the sum?  (BTW, this is a real issue with dynamic routing protocols, i.e. they want to converge quickly, but do not want to do "needless" route calculations.  It's often a trade-off, and you can sometimes "tune" your dynamic routing protocol to converge quicker or slower.)

The forgoing, again, is based on your screen shot listing,  For parts of actual route processing, order very much matters, e.g. building the route table based on AD and/or prefix length, and/or etc.  Likewise, in math, it doesn't matter how we do 1 + 2 + 3, but it does matter how we do 1 + 2 * 3.

Yet at the high level, again while a network is converging, we might compute 1 * 3 because, again, "2" hasn't arrived yet.

Or to recap your screen shot list "correct order" you might also say there's no correct order, because all of those are event based.

PS:

Also realize, in the "functions" listed in your screen list, in the real world, each have their own timing/event considerations, across the topology, as a whole.

Consider the same area OSPF ring topology

R1(ASR)<gig>R2(ASR)<ISDN>R3(9xx ISR)<10Mbps>R1 

with other routers connected to R1 and R3.

R2 just comes on-line, any guess which R2 neighbor it might establish full adjacency with first?  Does sequence of your screen list "dynamic routing steps" make a difference, before there's full convergence?

View solution in original post

13 Replies 13

pman
Spotlight
Spotlight

Hi,

 

Building the Routing Table

The main considerations while building the routing table are:

  • Administrative distance - This is the measure of trustworthiness of the source of the route. If a router learns about a destination from more than one routing protocol, administrative distance is compared and the preference is given to the routes with lower administrative distance. In other words, it is the believability of the source of the route.

  • Metrics - This is a measure used by the routing protocol to calculate the best path to a given destination, if it learns multiple paths to the same destination. Each routing protocol uses a different metric.

  • Prefix length

Default Administrative Distances

Connected0
Static1
eBGP20
EIGRP (internal)90
IGRP100
OSPF110
IS-IS115
RIP120
EIGRP (external)170
iBGP200
EIGRP summary route5

 

Since the internal EIGRP route has the best administrative distance (the smaller the administrative distance, the higher the preference), it's installed in the routing table.

https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8651-21.html

Hi 

Thanks for the answer.

I understand the concept of AD metrics and all. 

My question is a bit different though. If you look at the photo I posted, it shows the process that the router goes through when learning and advertising routes. Based on the photos what is the correct order? 

The options are as follow:

Learn about remote networks from directly connected neighbours

Learn about directly connected networks

Run routing algorithm to determine best path to remote networks

Routing table installs best paths if appropriate 

Advertise networks according to routing protocol instructions 

I have to order these options in the correct order from 1 to 5, but I can't find any info in this respect. I am literally lost.  

Hi as stated above I have to order the various processes - it's not about learning dynamic routing. 

It's about ordering the processes a router goes through when learning and advertising routes. I have attached a photo in a previous post. If you check the photo you will see what I mean 

 

Just to add to Peter's posts. 

 

The main reason the question is so ambiguous is that step 5 is not carried out only once so when the router learns of it's directly connected routes it will indeed advertise them to neighbors but then once it has learnt updates from it's neighbors it may well then advertise them to other neighbors as well (see Peter's post for when it would do this). 

 

Jon

Jon,

My friend, it has been such a long while since I saw you post again - and I am beyond honored I see you again joining a thread to add a calm word of wisdom to my rant! : ) This feels so much like the early times when I only started here (around 2009 - time flies...).

Thank you!

Best regards,
Peter

 

Hi Peter 

 

Haven't seen you posting on here for a while either, nice to see you still do every now and then and as for a "calm word of wisdom" I only keep it short because I can't go into the level of detail you can : )

 

Time does indeed fly ! 

 

Jon

Peter Paluch
Cisco Employee
Cisco Employee

Hello Luca (I hope I guessed your name right),

I agree with you that this question is dubious at best. If nothing else, it asks about something that is proprietary and implementation-dependent. Various operating systems on routers may sort or parallelize the steps in different order and so there is no clear, unambiguous answer to this question.

Let's at least debate it, though, and let us assume an interior gateway protocol (IGP).

IGPs are enabled by running them on specific interfaces of a router - in Cisco, you either use the

network

command, or start them with a dedicated command right on the interface

(such as ip ospf 1 area 0 or ip router isis)

In both cases, you are telling the IGP what interface to run on, and from that interface, the IGP immediately learns the directly connected network. Knowing the directly connected network serves a number of purposes here:

  1. The IGP learns the network so that it can advertise it to its neighbors
  2. The IGP knows what source IP address to use when attempting to send its packets out the interface to the neighbors
  3. The IGP performs sanity checks to verify if the neighbors are on the same IP network on the interface

This together would be Step 1 in your screenshot.

Assuming that the IGP then acquires its neighbors. Now what? Every IGP would now try to synchronize with the new neighbor by sending it all the best routes (in case of RIP or EIGRP) or the link-state database contents (in the case of OSPF or IS-IS) it knows about so far. But if the IGP just came up, the only knowledge it has are the directly connected networks, but these need to be shared nonetheless. So the IGP would not wait to receive some remote networks in order to be allowed to send its own - rather, at this point, the IGP would decide that the best paths to the known directly connected networks are the directly connected networks themselves (and that is a part of the routing algorithm!), and advertise them to the neighbor.

Note that this would effectively merge Steps 3 and 5 in your screenshot, so far skipping Steps 2 and 4.

Let's assume now that the two neighbors are up and synchronized, and one of them advertises a new network (note - a new one for simplicity reasons). The other router learns about it, but whether it first runs the best path algorithm, installs the route into the routing table, and then advertises it to its own neighbors, or whether it does it in a different order very much depends on the protocol.

For example, EIGRP on a router would do this:

  1. Receive an update about a new remote network
  2. Store the network in its topology table
  3. Attempt to install it into the routing table
  4. If and only if EIGRP was successful to install the route into the routing table, then advertise it to other neighbors

The step iv here makes sure that EIGRP advertises a route only if the router is using it itself. This kind of sanity check is done by distance-vector routing protocols in general, so both RIP and EIGRP.

But OSPF and IS-IS would operate differently:

  1. Receive an update about a new remote network (which would be in the form of an OSPF Link State Advertisement or an IS-IS Link State Packet)
  2. Store the LSA/LSP into the link-state database
  3. Flood the updated LSA/LSP to its neighbors
  4. After a certain configurable delay, run the SPF and attempt to install the best route into the routing table

Note that unlike distance vector protocols that first do the computation to even arrive at the new resulting metric, then installing the route in the routing table, and only then sharing it with other neighbors, link-state routing protocols have different order of operations: They essentially first share the updated LSA/LSP so that the entire area (or more) has the updated information, and then each router independently runs the SPF over the (hopefully identical) link-state database contents. And if, after SPF, the route didn't make it into the routing table, well, too bad, because link-state protocols cannot un-advertise a route only because some router is not really using it even if it knows about it.

So this throws the order of Steps 2 through 5 in your screenshot around completely.

And with BGP, the variability would get even bigger - BGP, for example, does not have a concept of directly connected networks at all.

So bottom line is that this question item that you've shared in your screenshot is too simplified and too general to be answered unambiguously. What we can say about the order of operations in dynamic routing is only this:

  1. The routing protocol's knowledge about networks is populated by three primary sources: Directly connected networks, networks learned from neighbors, and local redistribution from another routing protocol. The learning of networks from these three sources is independent and may occur in any order depending on the implementation of the routing protocol, even in parallel.
  2. Upon receiving an update,
    1. Distance-vector routing protocols would first run the shortest path algorithm, install the route into the routing table, and only then advertise it to other neighbors. One of the reasons is a sanity check, the other reason is the crucial fact that before a router runs the shortest path algorithm locally, it does not even know what metric to advertise to its own neighbors. So distance-vector protocols absolutely must run the short path algorithm on the update before sharing anything with the neighbors because otherwise, they don't even know what to share.
    2. Link-state routing protocols would first share the update with all its neighbors because the update itself is "absolute" - it does not need to be "added to", "modified" or "improved" by any local router. Then, after a while, each router independently run the SPF over the link-state database contents that hopefully contain the updated information.

Please feel welcome to ask further!

Best regards,
Peter

Hi Peter. Thanks so much for the detailed explanation. Yes my name is Luca you guessed it right

I thought the question was really "weird" and now I understand why I couldn't find much info with regards to it. 

I'll try and answer the question the way you did and explain the reason why I'm choosing a certain order. 

I hope that will be enough for my teacher. 

Once again thanks so much

Joseph W. Doherty
Hall of Fame
Hall of Fame

The "correct order of dynamic routing", eh?

For the operations in your screenshot, order doesn't matter!

Routing (also not just for a dynamic routing protocol) is dynamic.  I.e. it's constantly being revised, as route information is first received and as that information is revised.

For example (using your screenshot list), likely a router will learn, early, about its connected networks and add them to its route table.  However, such connected networks need an "up" interface, which can, of course, change status.  I.e. The route table is subject to dynamic change moment by moment based on the current up/down status of an interface.

As an aside, your list doesn't mention static routes.  These might even be processed before connected interfaces, but even they, as you manually add or remove them from the config, will also, dynamically, may add or remove them from the route table.  Further, they might also be redistributed into a dynamic routing protocol(s).

Now, even before considering your other listed processes, which appear to be also tied to dynamic routing protocol, which should be processed first, connected interfaces or static routes?  Does it truly matter?  The reason it doesn't much matter, is because we understand there's a huge difference between a converged network, versus one that's in convergence.  I.e. the latter doesn't yet reflect the true state/topology of the network.

Dynamic protocols, only really differ from connected networks and static networks, in that often there's more "lag" for the network to reach a converged state.

It's possible, in your list, doing some of those operations before others might speed convergence, but by how much?  Beyond possible convergence speed, if the same final (converged) result is obtained, is there really a "correct order" for doing them?

Consider 1 plus 2 plus 3, which equals six.  Does it logically matter whether you do (1 + 2) + 3 vs. 1 + (2 + 3) vs. (1 + 3) + 2?  Further, consider one of the operands might arrive later than the others, but there's no way to know that before it happens.  I.e. if "2" usually, but not always, arrives after "1" and "3", do you go ahead and compute 1 + 3, as soon as you have them, or do you wait a bit, waiting to see if a third operand arrives before doing the sum?  (BTW, this is a real issue with dynamic routing protocols, i.e. they want to converge quickly, but do not want to do "needless" route calculations.  It's often a trade-off, and you can sometimes "tune" your dynamic routing protocol to converge quicker or slower.)

The forgoing, again, is based on your screen shot listing,  For parts of actual route processing, order very much matters, e.g. building the route table based on AD and/or prefix length, and/or etc.  Likewise, in math, it doesn't matter how we do 1 + 2 + 3, but it does matter how we do 1 + 2 * 3.

Yet at the high level, again while a network is converging, we might compute 1 * 3 because, again, "2" hasn't arrived yet.

Or to recap your screen shot list "correct order" you might also say there's no correct order, because all of those are event based.

PS:

Also realize, in the "functions" listed in your screen list, in the real world, each have their own timing/event considerations, across the topology, as a whole.

Consider the same area OSPF ring topology

R1(ASR)<gig>R2(ASR)<ISDN>R3(9xx ISR)<10Mbps>R1 

with other routers connected to R1 and R3.

R2 just comes on-line, any guess which R2 neighbor it might establish full adjacency with first?  Does sequence of your screen list "dynamic routing steps" make a difference, before there's full convergence?

Hi Joseph 

Thanks so much for the info. 

That explains why I was having such a hard time to find anything about this topic. 

I'll try and give an answer and back up my choice the same way you did. Let's see what happen.

Once again thanks so much for your help 

Cheers

 

 

 

 

 

 

Hello Luca,

You are very welcome.

If your teacher has considerations or doubts about the answer you bring back based on the discussion in this forum, please invite him/her to join this thread. I was a university teacher for 12 years so I am sure we can find a common ground from which to start.

Best regards,
Peter

Hi Peter,

Thanks so much for the offer. I actually got a satisfactory mark for the assessment. Woohoo!  

Attached is the screenshot of how I ordered the processes and my teacher accepted this answer in the end. 

Everyone around here seems to be so very supportive. It's really great. And I am learning a ton of stuff!! 

Once again thanks so very much for your help!!!!

Cheers

Luca

Review Cisco Networking for a $25 gift card