Dynamic Routing (RIP) : 1. Objective
Dynamic Routing (RIP) : 1. Objective
This lab exercise is designed to understand routing and procedure to setup RIP
on routers..
2. Resources Required
• Computer
• Packet Tracer (version 5 or higher)
3. Introduction
A routing protocol is a protocol that specifies how routers communicate with each other,
disseminating information that enables them to select routes between any two nodes on
a computer network, the choice of the route being done by routing algorithms. Eac h
router has a priori knowledge only of networks attached to it directly. A routing protocol
shares this information first among immediate neighbors, and then throughout the
network. This way, routers gain knowledge of the topology of the network.
a) Distance vector: The distance-vector protocols find the best path to a remote
network by judging distance. Each time a packet goes through a router, that’s called
1|Page
a hop. The route with the least number of hops to the network is determined to be
the best route. The vector indicates the direction to the remote network. Both RIP
and IGRP are distance-vector routing protocols. They send the entire routing table
to directly connected neighbors.
b) Link state: In link-state protocols, also called shortest-path-first protocols, the
routers each create three separate tables. One of these tables keeps track of directly
attached neighbors, one determines the topology of the entire internetwork, and one
is used as the routing table. Link state routers know more about the internetwork
than any distance-vector routing protocol. OSPF is an IP routing protocol that is
completely link state. Link state protocols send updates containing the state of their
own links to all other routers on the network.
c) Hybrid: Hybrid protocols use aspects of both distance vector and link state—for
example, EIGRP.
There’s no set way of configuring routing protocols for use with every business. This is
something you really have to do on a case-by-case basis. If you understand how the different
routing protocols work, you can make good, solid decisions that truly meet the individual
needs of any business.
Administrative distance is the measure used by Cisco routers to select the best path
when there are two or more different routes to the same destination from two different
routing protocols. Administrative distance defines the reliability of a routing protocol.
Each routing protocol is prioritized in order of most to least reliable (believable) using
an administrative distance value.
4. Procedure
2|Page
2. The different thing is the red link which is serial link (used for WAN). By
default, it is not available so we have to add the modules to the router.
Double click on any router. Turn it off by using power button on the router
figure in Physical tab. On left side modules bar is present. Drag two WIC-
2T to smaller blank space and one NM-8A/S to larger blank space. Now,
turn on the router using power switch. Do the same on second router. Then
use Serial DTE or Serial DCE link from Connections. The router
interface that is chosen first becomes that of that type while the second
one becomes the other e.g if you choose DTE and click first router, it
becomes DTE while the second one becomes DCE and vice versa. J ust
remember that by default all serial interfaces are DTE so we have to
provide clocking on the DCE one!
3|Page
3. Use the following values to setup IP addresses on respective interfaces.
Router>en
Router#config t
Router(config)#hostname Lab_A
Lab_A(config)#interface fa0/0
Lab_A(config-if)#ip address 192.168.10.1 255.255.255.0
Lab_A(config-if)#description Lab_A LAN Connection
Lab_A(config-if)#no shut
Lab_A(config-if)#interface serial 1/0
Lab_A(config-if)#ip address 192.168.20.1 255.255.255.0
Lab_A(config-if)#description WAN Connection to Lab_B
Lab_A(config-if)#no shut
4|Page
Lab_A(config-if)#interface serial 1/1
Lab_A(config-if)#ip address 192.168.50.1 255.255.255.0
Lab_A(config-if)#no shut
Lab_A(config-if)#exit
Lab_A(config)#banner motd #
Lab_A#
Before you jump in and configure a serial interface, there are a couple of things you
need to know. First, the interface will usually be attached to a CSU/DSU type of device
that provides clocking for the line to the router. But if you have a back -to-back
configuration (for example, one that’s used in a lab environment), one end—the data
communication equipment (DCE) end of the cable—must provide clocking. By default,
Cisco routers are all data terminal equipment (DTE) devices, so you must tell an
interface to provide clocking if you need it to act like a DCE device.
To check the DCE interface, just bring your mouse over serial link, the interface with
whose name
you see a (clock symbol) is the DCE one. You configure a DCE serial interface with
the clock rate command:
Configure the PCs and Switches too. Make sure all devices are communicating with
each other (use ping to verify).
5|Page
Now you must have noticed that routers can communicate with devices directly
connected to them. PC0-PC2 and Switch0 can communicate with Lab_A router & in
between themselves but can’t with Lab_B router and Switch1 & PC2-PC5 and vice
versa.
The network command tells the routing protocol which network to advertise. Look at
the next router configuration:
Lab_A(config)#router rip
Lab_A(config-router)#network 192.168.10.0
Lab_A(config-router)#network 192.168.20.0
Lab_A(config-router)#network 192.168.50.0
Lab_A(config-router)#^Z
Lab_A#
Note the fact that you need to type in every directly connected network that you want
RIP to advertise. But because they’re not directly connected we’re going to leave out
networks
192.168.30.0 and 192.168.40.0—it’s RIP’s job to find them and populate the routing
table.
That’s it. Dynamic routing makes your job a lot easier than when using static routes,
doesn’t it? However, keep in mind the extra router CPU process and b andwidth that
you’re consuming.
The Lab_B router has three directly connected networks and we want RIP to advertise
them all, so we will add three network statements. Here are steps to configure RIP on
the Lab_B:
Lab_B#config t
Enter configuration commands, one per line. End with CNTL/Z.
Lab_B(config)#router rip
Lab_B(config-router)#network 192.168.20.0
Lab_B(config-router)#network 192.168.30.0
Lab_B(config-router)#network 192.168.40.0
Lab_B(config-router)#^Z
6|Page
Lab_B#
Each routing table should now have the routers’ directly connected routes as well as
RIP injected routes received from neighboring routers.
This output shows us the contents of the Lab_A routing table (yo ur output may differ):
Lab_A#sh ip route
[output cut]
Lab_A#
Looking at this, you can see that the routing table has the same entries that they had
when we were using static routes, except for that R. The R means that the networks
were added dynamically using the RIP routing protocol. The [120/1] is the
administrative distance of the route (120) along with the number of hops to that remote
network (1).
Lab_B#sh ip route
[output cut]
7|Page
Lab_B#
So while yes, it’s true that RIP has worked really well in ou r little internetwork, it’s not
the solution for every enterprise. That’s because this technique has a maximum hop
count of only 15 (16 is deemed unreachable) and it performs full routing-table updates
every 30 seconds, both things that can wreak havoc in a larger internetwork.
You probably don’t want your RIP network advertised everywhere on your LAN and
WAN.
There’s not a whole lot to be gained by advertising your RIP network to the Internet.
There are a few different ways to stop unwanted RIP updates from propagating across
your LANs and WANs. The easiest one is through the passive-interface command. This
command prevents RIP update broadcasts from being sent out a defined interface, but
that same interface can still receive RIP updates.
Lab_A#config t
Lab_A(config)#router rip
Lab_A(config-router)#network 192.168.10.0
This command will stop RIP updates from being propagated out serial interface 1/0, but
serial interface 1/0 can still receive RIP updates.
RIP version 2 is mostly the same as RIP version 1. Both RIPv1 and RIPv2 are distance -
vector protocols, which means that each router running RIP sends its complete routing
tables out all active interfaces at periodic time intervals. Also, the timers and loo p-
avoidance schemes are the same in both RIP versions—i.e., holddown timers and split
horizon rule. Both RIPv1 and RIPv2 are configured as classful addressing, (but RIPv2 is
considered classless because subnet information is sent with each route update), a nd both
have the same administrative distance (120).
But there are some important differences that make RIPv2 more scalable than RIPv1.
Since RIP is an open standard, you can use RIP with any brand of router. You can also
8|Page
use OSPF, since OSPF is an open standard as well. RIP just requires too much
bandwidth, making it pretty intensive to use in your network.
By sending the subnet mask information with the updates, RIPv2 can support Variable
Length Subnet Masks (VLSMs) as well as the summarization of network boundaries. In
addition, RIPv2 can support discontiguous networking.
Lab_A(config)#router rip
Lab_A(config-router)#network 192.168.10.0
Lab_A(config-router)#network 192.168.50.0
Lab_A(config-router)#version 2
That’s it; just add the command version 2 under the (config-router)# prompt and you
are now running RIPv2.
The debug ip rip command sends routing updates as they are sent and received on the
router to the console session. If you are telnetted into the router, you’ll need to u se the
terminal monitor command to be able to receive the output from the debug commands.
Below is an example of how debug output looks, your output may differ according to
your configurations. We can see in this output that RIP is both sent and received o n
serial 0/0 and serial 0/1 interfaces (the metric is the hop count):
Lab_B#debug ip rip
9|Page
network 192.168.10.0
metric 2 network
192.168.20.0 metric 1
To turn off debugging, use the undebug all or the no debug all command. Here is an
example of using the undebug all command:
Lab_B#undebug all
Lab_B#
5. Home Task
Three router topology has been presented in the last lab. Change it into Eight with now
each LAN having atleast Four End Devices. Don’t use the IP addresses mentioned in
the lab and ensure that it has converged (meaning all devices in the network can
communicate with each other). Write a report detailing your topology along with
configuration files of any two routers. The *.pkt will also be checked in the next lab.
Remember this is an individual task!!
Note:
10 | P a g e
Q.1 What is the advantage of Dynamic routing?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
11 | P a g e