Saturday, November 1, 2008

ROUTING INFORMATION PROTOCOL

Prerequisites: To start this lab you need to have a connection to Router1, Router2, and Router4.
IP Addresses: Please set these IP addresses on the interfaces of your routers.
Router1 Router2 Router4

Interface Ethernet 0 10.1.1.1 255.255.255.0 10.1.1.2 255.255.255.0 Not Available

Interface Serial 0 172.16.10.1 255.255.0.0 Not Available 172.16.10.2 255.255.0.0


Goals:
1) Set our hostname and get our interfaces up.
2) Configure Rip routing protocol
3) Select the directly connected networks
4) View our routing table
5) View the Rip protocol information
6) Observe Rip debugging information
--------------------------------------------------------------------------------



Routing Information Protocol (RIP) is a standards-based, distance-vector, interior gateway protocol (IGP) used by routers to exchange routing information. RIP uses hop count to determine the best path between two locations. Hop count is the number of routers the packet must go through till it reaches the destination network. The maximum allowable number of hops a packet can traverse in an IP network implementing RIP is 15 hops. In a RIP network, each router broadcasts its entire RIP table to its neighboring routers every 30 seconds. When a router receives a neighbor's RIP table, it uses the information provided to update its own routing table and then sends the updated table to its neighbors. This procedure is repeated by each router and results in a state referred to as network convergence, in which all routers have an identical view of the internetwork topology.



Lets connect to Router1 and get it configured. We will be using the table above for our IP addresses.
Router>en

Router#conf tEnter configuration commands, one per line. End with CNTL/Z.

Router(config)#int e0Router(config-if)#ip address 10.1.1.1 255.255.255.0

Router(config-if)#no shut

Router(config-if)#exit00:35:15: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up

Router(config)#hostname Router1

Router1(config)#int s0

Router1(config-if)#ip address 172.16.10.1 255.255.0.0

Router1(config-if)#no shut0

0:35:16: %LINK-3-UPDOWN: Interface Serial0, changed state to up

Router1(config-if)#exit

00:35:16: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up


RIP version 1 is classful, meaning it does not include the subnet mask in its routing table updates. RIP version 2 is classless and includes the subnet information. Now lets go ahead and start the lab.
1. We first want to configure Router1 for RIP. To enable RIP as the routing protocol we only need to type: router rip We can see this below in the router output. Notice the new mode we have entered

Router1(config-router)# that tells us we are configuring the router.
Router1(config)#router rip

Router1(config-router)#
Now that we have RIP running on our Router we need to tell the router which networks it is connected to. We do this by using the network statement. What this means is every interface of our router that is directly connected to an active network needs a network number. We will have some networks using the same ip addressing schemes with different subnets, and some are using entirely different addressing schemes. Look at the diagram below. In this diagram we have three different kinds of addressing schemes. Lets look at these in more detail. On Router 1 we have an IP address of 10.1.1.1 with a /24 subnet mask. Since RIP is classful you are only required to enter the class part of the address for the network statement. For example on Router1 we have already issued the command router rip, we then need to specify the directly connected networks to Router1 so the router can advertise these routes in its routing table. To do this we would only need to type: network 10.0.0.0 now we have not told the router about the network on his serial interface, to do this we would type: network 172.16.0.0 Lets look at Router 2 what network statements do you would need to use on this router




The answers are network 10.0.0.0. The network statement for the serial link is the same for Router1 and Router2. For the network statement for the ethernet link you had to remember that a 192 address was a class C address, for this network statement you used the classful portion of the address 192.168.1.0.
Now that we understand the network command lets enter it on our Router1.
Router1(config-router)#network 172.16.0.0

Router1(config-router)#network 10.0.0.0

Router1(config-router)#



If you notice we only entered 10.0.0.0 for our network statement, this is because 10.0.0.0 is a Class B address and rip only uses the classful portion of the address. Now we have configured Router1 for RIP lets connect to Router2 and get it setup.
We need to connect to Router2 and follow the same instructions. Lets select Router2 from the Window pull down menu. When we connect we are going to set a hostname to Router2, then set the ip addresses to the table above and configure RIP.
Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname Router2

Router2(config)#int e0

Router2(config-if)#ip address 10.1.1.2 255.255.255.0

Router2(config-if)#no shut

Router2(config-if)#exit01:23:17: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up01:23:18: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up

Router2(config)#
Now add the RIP stuff!
Router2(config)#router rip

Router2(config-router)#network 10.0.0.0

Router2(config-router)#exit

Router2(config)#exit

Router2#


We should now have RIP running on our network between Router1 and Router2. Now we need to get Router4 setup.
We need to connect to Router4 and follow the same instructions. Lets select Router4 from the Window pull down menu. When we connect we are going to set a hostname to Router4, then set the ip addresses to the table above and configure RIP.
Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname Router4

Router4(config)#int s0

Router4(config-if)#ip address 172.16.10.2 255.255.0.0

Router4(config-if)#no shut

Router4(config-if)#exit01:23:17: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up01:23:18: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up

Router4(config)#
Now add the RIP stuff!
Router4(config)#router rip

Router4(config-router)#network 172.16.0.0

Router4(config-router)#exit

Router4(config)#exit

Router4#

Now that we have RIP running on our entire network lets verify that it is receiving routes. To do this we will be using some show commands. The most common one is show ip route. This displays all entries in the routing table. If we do this on our Router 4 we will see the route to our directly connected Router1, we will also see routes to the other routers we have setup on the network. Lets take a look at our routing table, to do this type: show ip route from the privilege mode.
Lets look at the first entry R 10.1.1.0/24 [120/1] via 172.16.10.2, 00:00:21, Serial0. It starts off with R this says it is a Rip route it then says the destination network with sunbet mask in this case it is 10.1.1.0 with a /24 (255.255.255.0) subnet mask. Next it gives 120/1 the 120 is the administrative distance, Rip's default administrative distance is 120. Administrative distance is considered the trustworthiness of the route. If you have two routing protocols with the same route the router will pick the route with the lower number. The 1 is the hops required to get to the destination network. The next piece of information is the via 172.16.10.1 that is the next hop address it must go to. The last item is that this information was learned via Serial0.
Another great command is show ip protocols. This displays information about the ip routing protocols you have enabled. Lets type the command : show ip protocols and see what we get.
Router4#show ip protocols

Routing Protocol is "rip"Sending updates every 30 seconds, next due in 12 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces isIncoming update filter list for all interfaces isRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Key-chain

Ethernet0 1 1 2

Serial0 1 1 2

Routing for Networks:172.16.0.0

Routing Information Sources:Gateway Distance Last Update172.16.10.2 120 00:00:09

Distance: (default is 120)
Router4#
Looking at the output in detail we see we are sending updates every 30 seconds. We know Rip is a distance vector routing protocol so it exchanges its entire routing table every 30 seconds. We also see our network statements are working by noticing the networks are both under the Routing for Networks area. The last area to notice is the Distance which we said was administrative distance. This tells us the default is 120 and that is what we are using.
Conclusion:
In this lab we have configured our routers for RIP so that we can exchange information with more than the directly connected neighbor. We have learned that RIP's metric is hop count and the routers send updates every 30 seconds be default. Now in the next lab we will go into IGRP (Interior Gateway Routing Protocol).

Copyright (c) 2001 Boson Software, Inc. All Rights Reserved.

No comments: