Identifying How RIP Handles Traffic
Let's take our functioning network and figure out how RIP is transporting traffic and why.
If we look at router 2, how many routes does it have to get to router 5? Well router 2 could go to router 1, then router 3, then reach router 5, or it could go to router 4, then router 5, which is how RIP will propagate the route. RIP does this because it considers the route through router 4 to be 1 hop, while the other route it considers to be 2 hops. If we do a traceroute to the LAN on router 5 we get -
We can see that router 2 does exactly what we discussed. It travels to 192.168.4.2 first, which is router 4's s0/0 interface. Router 4 then forwards it to 192.168.3.2 on router 5, and router 5 forwards it to the host. The next image is the routing table on router 2. It may look quite large and intimidating, but if you take it line by line and use what you have learned you can break it apart and decipher it.
The first entry in the routing table is for the 172.16.0.0/24 network. You should notice that this network is subnetted into 5 subnets, which are the 5 loopback interfaces on router 5. If we look at each of these 5 entries we see that they all have [120/2] next to their network addresses. We discussed already that the first number in brackets is the administrative distance and the second is the metric, which in RIPs case is the number of hops. So we know that in order for router 2 to reach router 5's LAN it takes 2 hops.
The next item we see is the 192.168.4.0/30 network. This is our point to point link to router 4, and as you can see the table lists this as a directly connected route.
The next entry is another RIP route, this one is for 192.168.5.0/26. This is the LAN connected to router 1, it has 3 entries for the 3 subnets we created on router 1. Notice that the exit interface is s0/0 and the next hop IP is pointed towards router 1's s0/0 interface, so any packet destined for that network will go straight to router 1.
The next entry are the loopback interfaces we created on router 2 and are listed as directly connected. After the loopbacks we have another RIP entry for the 192.168.1.0/30 network. This entry tells router 2 about the point to point link between router 1 and router 3. Then we have one more directly connected route, this one is the point to point link to router 1.
Our last entry is a RIP entry for the LAN segment between router 3, 4, and 5.
We can see that the routing table provides us with information about every route in the network. So what happens when a link goes down? Well let's go in and take an interface on router 2 down and see how RIP reacts.
The next item we see is the 192.168.4.0/30 network. This is our point to point link to router 4, and as you can see the table lists this as a directly connected route.
The next entry is another RIP route, this one is for 192.168.5.0/26. This is the LAN connected to router 1, it has 3 entries for the 3 subnets we created on router 1. Notice that the exit interface is s0/0 and the next hop IP is pointed towards router 1's s0/0 interface, so any packet destined for that network will go straight to router 1.
The next entry are the loopback interfaces we created on router 2 and are listed as directly connected. After the loopbacks we have another RIP entry for the 192.168.1.0/30 network. This entry tells router 2 about the point to point link between router 1 and router 3. Then we have one more directly connected route, this one is the point to point link to router 1.
Our last entry is a RIP entry for the LAN segment between router 3, 4, and 5.
We can see that the routing table provides us with information about every route in the network. So what happens when a link goes down? Well let's go in and take an interface on router 2 down and see how RIP reacts.
On router 2 we will go in and issue the shutdown command on the s0/1 interface. When this happens router 2 will have to recalculate its route to the 192.168.3.0 and the 172.16.0.0 networks. Let's take a look at the new routing table.
The new routing table shows a few changes. First, the metric for the 5 RIP entries to the 172.16.0.0/24 network changed to 3. This is because now instead of going from router 2 -> router 4 -> router 5 , it has to go router 2 -> router 1 -> router 3 -> router 5, so RIP adds an extra hop for these routes. Notice that next hop IP and exit interface also changed.
The 192.168.5.0/26 network stayed the same as nothing changed to affect the route. All of the directly connected routes are the same except the one we took down, which was the 192.168.4.0 network, and is no longer in the routing table.
The 192.168.1.0/30 connection also stayed the same, however the 192.168.3.0/24 network did have a metric change as well. So router 2 has to take an extra hop to get to the 192.168.3.0/24 network as well.
As you can see RIP has a very basic metric. It doesn't take the speed of the link, or any other information into consideration, it only cares about hops. Before we go any further, if you're following along, go back into router 2 and re-enter the 'no shutdown' command to bring the interface back up.
Now that we have our network set up and RIP fully configured lets take a look at RIPv2 and how we can use it to improve our network.
The 192.168.5.0/26 network stayed the same as nothing changed to affect the route. All of the directly connected routes are the same except the one we took down, which was the 192.168.4.0 network, and is no longer in the routing table.
The 192.168.1.0/30 connection also stayed the same, however the 192.168.3.0/24 network did have a metric change as well. So router 2 has to take an extra hop to get to the 192.168.3.0/24 network as well.
As you can see RIP has a very basic metric. It doesn't take the speed of the link, or any other information into consideration, it only cares about hops. Before we go any further, if you're following along, go back into router 2 and re-enter the 'no shutdown' command to bring the interface back up.
Now that we have our network set up and RIP fully configured lets take a look at RIPv2 and how we can use it to improve our network.