CCNA Routing Labs Three Router RIP LabThe purpose of this lab is to explore the functionality of the RIP routing pro tocol. The main goal is to allow PC1 to reach P C2 and vice versa. Hardware Required for Lab A Cisco router with two Fa0/0 interfaces and one serial port. A Cisco router with two Fa0/0 interfaces and one serial port. A Cisco router with two Fa0/0 interfaces. Two straight through Cat 5 cable Two crossover Cat 5 cables One smart serial cable or two DCE/DTE serial cables depend ing on router. One Console Cable Two PCs to connect to the routers Commands Used in Lab e nabl e -Used to move from unprivileged mode to privileged mode . s how ip i nterface bri ef -Displays a brief summary of the interfaces on the router, w hat IPs they have configured, and their status. Initial ConfigsR1host R1 line con 0 logging synch exit int fa0/0 ip add 192.168.12.1 255.255.255.0 no shut int fa2/0 ip add 192.168.11.1 255.255.255.0 no shut
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Note: Even though the nature of serial links require a clock rate to be set
on the DCE, you can safely add the clock rate to each side of thelink. The router with the DTE end of the link will simply ignore the command.
RIP is one of the oldest and simplest routing protocols that is still in use and will be around for some time to come.
Enabling RIP on the router is done with the router rip command
Once RIP is enabled it is necessary to use network statements to tell the router which interfaces
are going to send and receive RIP updates.
The network statement uses the following syntax:
network <classful network>
Most people have trouble understanding the purpose of the network statements when they are
first learning routing protocols because they commonly assume that the command is used toadvertise networks into RIP. This is not correct, when you enter the network command under
RIP the router will check what interfaces match the classful network and adds the interface to
Automatic network summarization is in effect This shows that RIP is summarizinRouting for Networks:1.0.0.0192.168.11.0192.168.12.0
This is a quick summary of what n
Routing Information Sources:Gateway Distance Last Update192.168.12.2 120 00:00:00
This section is used to quickly see
Distance: (default is 120) This shows the administrative dist
Now that we have an idea about how RIP is configured, lets check the routing table to see whats
there.
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, FastEthernet0/0
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback1C 192.168.131.0/24 is directly connected, Serial1/0
R 2.0.0.0/8 [120/1] via 192.168.12.2, 00:00:04, FastEthernet0/0
C 192.168.11.0/24 is directly connected, FastEthernet2/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:04, FastEthernet0/0
You should already be somewhat familar with the basics of the routing table from earlier labs,
whats new is now we are now seeing seeing RIP routes which are denoted with an "R"
Notice that the 192.168.12.0/24 network is not seen as a RIP route because its directly connectedand the router will always believe its directly connected routes over anything.
You can also filter the routing table by protocol to help you focus on exactly what your
interested in
R1# show ip route ?
Hostname or A.B.C.D Network to display information about or hostname
vrf Display routes from a VPN Routing/Forwarding instance
| Output modifiers
<cr>
R1# show ip route rip
R 2.0.0.0/8 [120/1] via 192.168.12.2, 00:00:10, FastEthernet0/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:10, FastEthernet0/0
Lets take a minute to show explain the output of the routing table
R Denotes a RIP route2.0.0.0/8 This is the learned route and subnet mask 120 This is the administrative distance for RIP, by default it is 1201 This is how many hops away the route is, in RIP a hop is each routevia 192.168.12.2 This is the next hop neighbor that the route was learned from00:00:10 This is the age of the route since the last update, when everything isFastEthernet0/0 Lastly this is the interface the route was learned on.
Notice that even though R2's loopback is 2.2.2.2/32 RIP has striped the network back to its
classful boundary 2.0.0.0/8 This is because RIPv1 doesn't send any subnet mask information
with its routing updatesso the receiving router has no choice but to assume a classful boundary. This behavior can been
seen in the following debug.
R1#debug ip rip
RIP protocol debugging is on
R1#
*Mar 1 00:43:32.991: RIP: received v1 update from 192.168.12.2 on FastEth
*Mar 1 00:43:32.995: 2.0.0.0 in 1 hops
*Mar 1 00:43:32.999: 192.168.23.0 in 1 hops
R1#
*Mar 1 00:43:35.915: RIP: sending v1 update to 255.255.255.255 via FastEt
One of the many pitfalls of RIPv1 is that it simply broadcasts its update to everyone (the255.255.255.255 address) This means that every host on the network will receive the RIP
updates whether they want them or not!!!
Below is a packet capture of traffic going to PC1, even though the PC isn't runnng RIP it is stillreceiving all the RIP packets which can be both a waste of bandwidth and a security concern.
Note: You can ping multicast or broadcast addresses from a router to quicklysee what hosts will receive certain kinds of packets
R1# ping 255.255.255.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:
Reply to request 0 from 192.168.131.3, 20 ms
Reply to request 0 from 192.168.12.2, 36 ms
Since RIPv1 isn't on the CCNA (or any Cisco exam) anymore we won't spend anymore time onit. Before we switch to RIPv2 we'll first add the remaining interfaces into RIP
Sending 5, 100-byte ICMP Echos to 192.168.33.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/25/60 ms
R1#traceroute 192.168.33.1
Type escape sequence to abort.
Tracing the route to 192.168.33.1
1 192.168.131.3 44 msec 36 msec *
When using the serial link pings take 60 ms to get across the link. Now lets disable the serial
link on R1 and try this again.
R1(config)#int s1/0
R1(config-if)#shut
R1(config-if)#exit
R1(config)#
*Mar 1 02:13:58.235: %LINK-5-CHANGED: Interface Serial1/0, changed state to
*Mar 1 02:13:59.235: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1
Pinging again from R1 we can see that it is using the ethernet links this time and and the pings
only take 24msR1#ping 192.168.33.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.33.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/16/24 ms
R1#traceroute 192.168.33.1
Type escape sequence to abort.
Tracing the route to 192.168.33.1
1 192.168.12.2 40 msec 48 msec 24 msec
2 192.168.23.3 4 msec 40 msec *
RIP does provide a feature that can modify a routes metric called an Offset-List Offset-lists can be used to increase the hop count of a route but can't be used to decrease the hopcount. Its importent to keep track of how many hops a route will have when changing
the hop metric because RIP only allows any given route to have 15 hops this is help guard
against loops and in reality if your network has more then 15 hops you probably won't want touse RIP anyway.
The syntax for offset-lists are: offset-list <access-list> <in/out> <offset><interface>
R1(config-router)#offset-list ?
<0-99> Access list of networks to apply offset (0 selects all networ
<1300-1999> Access list of networks to apply offset (expanded range)
Note: Anytime you see <cr> in the ? output this means you can press enter, any other
options past that point are optional
Here's a break down of the various command options.
access-list Access-list that defines what routes will be affected by the offset-list,access-list 0 Special meaning access-list that means all routes will be affected by oin This means the offset will be applied to matching inbound RIP routes.
out This means the offset will be applied to matching outbound RIP route
offset # This is how many hops to ADD to the route's hop count. If a route ha
interface(Optional) Further filter what routes are matched by what interface wi
be offset
After you go through the Access-list labs you'll understand the various list options but for now
we'll stick with access-list 0 for our examples.At the moment we have R1 using the serial link to get to the 192.168.33.0 network because it isonly one hop and is 2 hops when using the ethernet links.
R1(config)#do show ip route rip
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:25, FastEthernet1/0
R 192.168.33.0/24 [120/1] via 192.168.131.3, 00:00:22, Serial0/0
R1(config)#
*Mar 1 04:40:16.686: RIP: received v2 update from 192.168.131.3 on Serial0/0
*Mar 1 04:40:16.686: 192.168.23.0/24 via 0.0.0.0 in 1 hops
*Mar 1 04:40:16.686: 192.168.33.0/24 via 0.0.0.0 in 1 hops
*Mar 1 04:40:30.974: RIP: received v2 update from 192.168.12.2 on FastEthern
*Mar 1 04:40:30.978: 192.168.23.0/24 via 0.0.0.0 in 1 hops*Mar 1 04:40:30.982: 192.168.33.0/24 via 0.0.0.0 in 2 hops
Lets add a couple hops to all routes coming in from R1's S0/0 interface
R1(config)#router rip
R1(config-router)#offset-list 0 in 2 s0/0
After R1 receives the next update (every 30 seconds for RIP) it will change the serial route's
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:17, FastEthernet1/0
R 192.168.33.0/24 [120/2] via 192.168.12.2, 00:00:17, FastEthernet1/0
Checking on a debug we can see that both R3 routes over the serial link are now shown as 3
hops.R1#*Mar 1 04:47:40.014: RIP: received v2 update from 192.168.131.3 on Serial0/0
*Mar 1 04:47:40.018: 192.168.23.0/24 via 0.0.0.0 in 3 hops
*Mar 1 04:47:40.022: 192.168.33.0/24 via 0.0.0.0 in 3 hops
Lets adjust the offset-list to make the metric the same for the serial and the Fa1/0 links, since the
serial link is 1 hop and the Ethernet link is 2, we'll just add 1 to theserial link.R1(config)#router rip
R1(config-router)# offset-list 0 in 1 s0/0
Now when we check the routing table we can see that we now have two paths to get to the
192.168.33.0 network, RIP by default will load share between 6 equal cost paths.This provides redundence so if one of the paths have an issue, RIP will eventually detect the
issue and remove the path from the routing table.
R1#sh ip route rip
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:00, FastEthernet1/0
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:15, Serial0/0
[120/2] via 192.168.12.2, 00:00:00, FastEthernet1/0
I say eventually detect the issue because RIP is a very slow moving, lazy protocol. It updates
every 30 seconds
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static rout
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, FastEthernet1/0
C 192.168.11.0/24 is directly connected, FastEthernet2/0
C 192.168.131.0/24 is directly connected, Serial0/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:07, FastEtherne
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:07, Serial0/0
[120/2] via 192.168.12.2, 00:00:07, FastEthernet1/0
To test this I'm going to "accidentally" apply an access-list that blocks all traffic onto R1's Fa1/0interface.
R1(config)#access-list 5 deny any
R1(config)#int fa1/0
R1(config-if)#ip access-group 5 in
We can tel something is wrong because the 2 routes haven't seen an update in over a minute
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:01:13, FastEthernet1/0
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:15, Serial0/0
[120/2] via 192.168.12.2, 00:01:13, FastEthernet1/0
Routes are still present in the table at the 2 minute mark...
R1#show ip route ripR 192.168.23.0/24 [120/1] via 192.168.12.2, 00:02:01, FastEthernet1/0
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:09, Serial0/0
[120/2] via 192.168.12.2, 00:02:01, FastEthernet1/0
R1#show ip route rip
Almost 3 minutes....R1#show ip route rip
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:02:50, FastEthernet1/0
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:03, Serial0/0
[120/2] via 192.168.12.2, 00:02:50, FastEthernet1/0
Once the routes hit the 3 minute mark they go into the hold down timer and are listed as possiblydown.R1#show ip route rip
R 192.168.23.0/24 is possibly down, routing via 192.168.12.2, FastEthernet
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:06, Serial0/0
After 240 seconds the routes are fully flushed from the routing table.R1#show ip route rip
R 192.168.23.0/24 [120/2] via 192.168.131.3, 00:00:05, Serial0/0
R 192.168.33.0/24 [120/2] via 192.168.131.3, 00:00:05, Serial0/0
As you can see it takes a few minutes for RIP to correct a problem and possible another coupleminutes for all the routers to agree there is an issue and remove the route if you have a larger
RIP domain.Compared with Static routes where it will never detect the problem this is an improvement,however compared to other protocols that can detect changes in a matter of seconds it clearly
can't compete.
Below is a Pros & Cons summary of RIP.
Pros Cons
Simplest Routing Protocol Slow problem detection
Most devices support RIP.15 hop maximum and slow detect
The purpose of this lab is to explore the functionality of the EIGRP routing protocol. .. .keep
reading
Three Router OSPF Lab
The purpose of this lab is to explore the functionality of OSPF using a single area.This lab focuses many on the basics and concepts of OSPF to get you used to it. ...keep reading
Default Routing Lab
The purpose of this lab is to explore a common default routing scenario ...keep reading
Distance routing protocols have a simple loop prevention rule called Split-horizon. The split-
horizon rule says that a routing protocol will not send out an update
on the same interface it received an update on. This is a particular problem on Frame-relay Huband Spoke networks because the hub will receive an update
from one spoke but due to split-horizon will not forward the update to the other spokes since its
the same interface.
First lets add a loopback interface on each router, we will use the 150.101.123.x/32 schemewhere X is the router number.