Hi, and welcome to this CertificationKits CCNA training video on distance vector concepts.  We’re going to be talking about distance vector protocols such as RIP and IGRP. Just basic guidelines these protocols follow such as how they populate the routing table, routing loops, and how RIP and IGRP avoid routing loops and when to use RIP and IGRP as routing protocols verses something like OSPF. 

Now, let's go over a routing table population with distance vector protocols.  Right now we’ve got three routers here, router A, router B, and router C, and the routing tables are going to start off with only the directly connected subnets, so router A would know our network 99.8 network 99.32 or B would know our 99.16, 99, that’s 96, 99.4 and 99.32 because it's directly connected to those subnets.  Router C would know where 99.24 and 99.40 are located.  I am going to fix that right there, so it all starts off with the routers having the directly connected subnets in the routing table and again they get that directly connected subnets when you can figure an IP address on an interface in the subnets mass.  They do the ending process which is comparing the IP to the subnets mass and come up with the subnet address or network address, they put that in the routing table, so 99.8, 99.32 are going to be an A. 

Now, when I enable RIP or IGRP, they function pretty much the same as for as populating routing table, so we'll use RIP as an example, I go and enable RIP.  Now, what happens is when I enable RIP, I enable RIP to route let's say on each router I have to do that router A, router B, and router C.  I have to enable it to route for the entire 99.0.0.0 network, so any interface on the router that is a part of the 99.00 network will participate in RIP routing protocol, meaning they’ll share information with other routers based on the set of rules, specified with routing information protocol, so what that means is this interface here as well as this interface are both part of the 99 network, meaning they have a 99 in the first octet, they’re both going to can participate in RIP.  What they’re going to is they're just going to start broadcasting every 30 seconds, they’re going to broadcast these routing tables out of all these interfaces, I mean there are things that I can do – I can turn off RIP on this interface and tell it not to send information out of this interface because they’re earning routers over here, but by default it's going to start sending stuff out.  Router B, when I enable RIP for network 99 000 it's going to start sending all its interfaces and see same thing.  So, what happens is router A sends 99.8, 99 32 subnets over to router B, router B looks at that information, and router B is the metric called a hot count.  So, what happens is router B goes okay I am getting some information and it's coming in through my serial zero interface here, and let me see what this information says, it's says 99.32.0.0 and that next top router has a cost of zero.  But, hey I already know where 99.32 is.  I have a connection to 99.32 out of my serial zero interface and I have a cost of zero, so that guy if I want to send the router to get to 99.32 would cost me one, so I am just going to disregard that information, so B just disregards that information.  And then it looks at 99.8 and it goes 99.8.0.0, I don’t have that in my routing table, the update came in through the serial 0 interface so if I need to get to 99.8 I better go out of my serial 0 interface and he adds that into his routing table and says hey, this guy has a cost of 0 so RIP simply adds 1 to the previous router’s cost so my cost is going to be 1 meaning to get to 99.8, it’s 1 router away. 

So, what has a hop 1, router B takes its routing table and sends the whole thing over to C and C goes – oh, 99.40 I have that, I don’t need that.  What I don’t have is 99.16, I don’t have 99.32 and I don’t have 99.8.  So, what’s going to happen based on RIP it says all three of these updates came in through the serial 0 interface so, I know if I need to get to these next — or these destinations so that's so I better send out of my serial 0 interface.  The previous router at a cost of 0 to get to 16 so my cost is going to be 1 at a cost of 0 to get to 32 so that’s so my cost will be 1 meaning 1 router away.  However, for 99.8 rather B’s cause is 1 so router C is two routers away.  So, he’s two hops away and he puts at 2 in his routing table, the pre-existing routes have all cost of 0.  Again, it’s just associates the interface with the cost.  Sent back down 99.8 or router B learns about the 99.24 subnet, his cost is 1 serial 0 and this guy eventually learn about every subnet in the network from router B.  So, he’ll learn about 99.16 and 99.40 and 99.24 subnets.  The only one these both have a cost of 1 and to get to 24 cost of two, they will all go out of a serial 0 interface. 

So, now that all the routing tables are populated again you have a client machine here if you wants to get to this machine over here wants to ping him or whatever he’s trying to do when he addresses it at layer 3 with the IP the destination IP address is going to be maybe 99.24.0.10, he’ll put that in there as the destination IP and what will happen is router A will compare 99.24.0.10 to the subnet mask of 255.248.0.0 and then figure it out and go oh that is subnet 99.24.0.0.  Let me check my routing table.  There it is I can barely read it but there’s 99.24 and it says I have to go out of my serial 0 interface and that router is two hops away.  So, he’ll send it out his serial 0 interface.  Router B will do the same thing go – on 99.24 again, barely read it.  There it is I have to go out of my serial 1 interface I should say and that is one hop away so he’ll send the packet out of this interface C will do the same thing go 99.24 I can read that pretty well it’s on my Ethernet 0 interface and I am directly connected because my cost is 0 and he’ll send it out to this computer.  So, these protocols distance vector simply broadcast their routing table out of all interfaces associated with the published network.  What I mean published network when I turn RIP on, I type router RIP and then the only thing I have to type is the network that I'm publishing and I type network 99.0.0.0 and that publishes the network and I do that on each one of these routers and what happens is every interface that’s part of the 99 network which is all so these interfaces in this slide here will participate meaning the router will start broadcasting these routing tables out, everything they’ve got they send it if it’s RIP they send it every 30 seconds without fail.  Routers will use what information they can from the routing table, any information they cannot use, they dump.

I have cleaned up the CCNA slide so we can start talking about routing loops and loop avoidance.  I’m just going to use routers B and C for this so, let's take a look at router B's routing table, his routing table is going have 99.16, 99.40 just pretend that this does not exist over here.  He's also learned about 99.24 from router C and he knows to get to 99.24 subnets he’s going to out of serial one interface and the cost is 1 hop away.  Router C to get to 99.24 goes out of his Ethernet zero interface and his cost is zero because he is directly connected.  So, what happens is router B just keeps bombarding router C, every 30 seconds with this routing table.  Router C looks at it and goes okay, I know where 99.40 is because that’s all my serial zero interface and I am directly connected to it, I don’t know where 99.16 is so I’m going to put that at my routing table, I am going to get out the serial zero to get there and that’s can be 1 hop away and I see that you have got 99.24 in there with the cost of one, I have a cost of zero I'm directly connected to that so, I'm going to ignore that information.  Now it’s seems obvious that C would ignore then information but, what doesn’t know – he doesn’t know there might be another router D here with the connection to router B.  So, router B might have a path directly to the 99.24 subnet in a different ways, C doesn’t know that, all C knows is that router B does have a path to get to the 24 subnet but, it’s not better than hiss, he is directly connected so, he ignores that information. 

Now, the problem what happens, this link goes down for whatever reason as I said in another videos, I am going to trip over these things, unplug it, just to be mean rodents whatever, whatever the case this connection is down at the router.  So, no one can get to 99.24 except for the people that are already in the 99.24 networks so they’re pretty happy because they can talk to each other but, there’re still not going to able to get out, no one could gets to 99.24 right now so, C is like, all right I can’t get there, let me mark that as down and he’s can’t get to 99.24 anymore and all of a sudden router B save him, 30 seconds have gone by router B sends his table over before C was able to tell them that he can’t get there to 99.24 anymore but, C tells router B that it can’t get to 99.24 anymore B’s going to mark it is down but if he hasn’t have the chance to tell router B that it can’t get to 99.24 anymore then router B is going to update them and say hey I can get there, it only go oh, a new way to get to network 99.24.  Doesn’t realize that there is no new way and B has to go thought him to get there he just sees that B has a way to 99.24 so, he’s going to try to use it.  And since B’s cost is one, his cost is going to be two and he is going to go out of the serial 0 interface instead of this Ethernet 0 interface and what happens is when he sends his routing table back over to B, B’s going to go well you raised your prices, you have a cost of two, my cost three now, they will send it back over all of a sudden his cost is four, his cost is five, his cost is six and this is the redundancy of a routing loop, any traffic will just bounces back and forth in there until router B gets up the 15 or so this guy will look out and go 16 no way, not going to use it, can't get there.  It's called the infinite distance metric for RIP and it’s 60.  They will not put a path that 16 routers away in the routing table so, this is what’s call a routing loop. 

Now, obviously a routing loop is not good so, there are some things that have been implement that RIP and IGRP use to avoid these routing loops.  Let’s take a look at them.  There are few different ways that RIP and IGRP or few methods RIP and IRGP to — used to avoid routing loops.  Split horizon with what's called poison reverse, let’s take a look at what split horizon does.  I've simplified the slide again to demonstrate split horizon so router B is going to have 99.24.0.0 serial 1 to get there and there's going to be cost of 1.  C has 99.24.00.  He has to go out of the Ethernet 0 interface and his cost is 0, what split horizon does it says it never useful to send information about her out back in the direction and what's the original update came from.  So B found out about network 99.24 through the serial 1 interface so before he sends his routing table out of that interface it's going to remove this information so all C will see is 99.16 from router B 99.32 as well as 99.8 if that’s in there so he will be able to use that information but this information will be removed because the update about 99.24 came in through serial 1 so when B sends information out of serial 1, it's not got that 99.24 network in there.  So if this path goes down C will not think that B has a path to network 99.24. 

What the poison reverse does, the split horizon with poison reverse is C will mark us as down if this goes down, what's going to happen is he going to tell the other routers that this path is down , so he will tell B that it's down.  B will mark us entry as down on its table and the poison reverse is, okay since your making this as down, it's okay to send the information about 99.24 to C, so he will send information about network 99.24 out of this info — out of this interface only to let C know that he knows the path is down, that the poison reverse, it's kind of like a — I say okay I got it, I know the path is down don’t worry about it I won’t send it to anybody else so that's the poison reverse part and that has overcome to split horizon rule because split horizon says you can’t send the information about a network back out the interface in which the original update came.  99 24 update came in through serial 1, C marks it as down, poison reverse says okay since you’re going to mark it us down, you can let C know that you are marking this path as down and that you've gotten that update, that the poison reverse part of split horizon.

Let’s take a look at another one.  So that was split horizon with poison reverse, now let’s talk about route poisoning and that's basically what C is going to do when that particular path goes down he is going to say hey 99.24 is down, he is going to mark it with an infinite metric value in 16 to get there, you can't get there 16 as far as RIP is concerned is very far away, unreachable so if your 16 you’re unreachable.  So what C is going to do is marked out with an infinite metric value, pass that information along to be B, B is going to mark with an infinite metric value saying hey I can't get their pass the information along to A, conversions is the amount of time that takes for B and C to realize that 99.24 network is down from the time that goes down, conversions, it's the amount of time that takes for everybody to get updated with the appropriate information so that route poisoning.  Another thing that happens is a whole down timer gets put into effect on router C, so since C marked this as down, what's going to happen is he will not accept any changes to a his routing table concerning network 99.24 until he knows all of the other routers have been updated so as long as it takes for conversions to happen in this network, C will not take any new information about network 99.24 just in case because he doesn’t want to start a rating routing loop.  He would however take information if there was a better cost in his original cause but his original cost was 0 so he can't get better than that so what's going to happen is he's going to lock down this entry that 99.24 is down until he knows everybody else has been updated with the fact that rate is unreachable.

The last one is triggered updates to speed up conversions remember RIP sends out his routing table every 30 second by default so the route might go down just after this – he send his update so he is got to wait 30 second here then all of a sudden B gets that and he just send his, he's got another 30 second before he sends out, so it can take a 4 minute for a router — two routers away to get the information that network 99.24 is down and in the meantime router A might still be trying to send a bunch of information over.  So what happens as a triggered update said hey a route is poisoned or something like that happen, let’s send it send off immediately it triggers an update, what that does is as soon as this path goes down, bump, update goes, B get its mark down, boom update goes, so conversions take a lot place a more quickly so there is no confusing in the routing environments so that's triggered updates.  So again with this routing loops are RIP and IGRP protocols is used use split horizon with poison reverse, they poison routes and say hey these routes are down, tell the other routers about it, these whole down timers, say hey I am not going to listen to you for a little while until I know you've been update with the appropriate information and then if something does go down, a route goes bad, whatever it's trigger an update to happen immediately to speed up conversions.  So we've talked about these protocol, let's talk real quick about when to use these protocol.  RIP and IGRP are very easy to use so RIP or IGRP equal easy.  You do not want to use these in networks larger than 50 routers, that's the cut off, 50 routers and that's per Cisco.  Now the only other snag is IGRP is Cisco proprietary protocol, RIP is vendor neutral, so if you have non-Cisco device you are going to be want to be running RIP, if you all have Cisco, you can run IGRP.  We have talked about this instructor concept how the routing tables populate routing loops and how to avoid them and when to use these routing protocols.  I hope you have enjoyed this CertificationKits CCNA training video on the consent of this instructor protocols.