You are on page 1of 15

RIP Tutorial

February 3rd, 2011Go to comments

In this tutorial we will learn about RIP routing protocol Routing Information Protocol RIP! is a distance"#ector routing protocol$ RIP sends the complete routing table out to all acti#e interfaces e#ery 30 seconds$ RIP only uses hop count the number of routers! to determine the best way to a remote networ%$ &ote' RIP #1 is a classful routing protocol but RIP #2 is a classless routing protocol$ (lassful routing protocols do not include the subnet mas% with the networ% address in routing updates, which can cause problems with discontiguous subnets or networ%s that use )ariable" *ength +ubnet ,as%ing )*+,!$ Fortunately, RIP#2 is a classless routing protocol so subnet mas%s are included in the routing updates, ma%ing RIP#2 more compatible with modern routing en#ironments$ -istance #ector protocols ad#ertise routing information by sending messages, called routing updates, out the interfaces on a router .ey points' / RIP uses hop counts to calculate optimal routes a hop is a router!$ / RIP routing is limited to 10 hops to any location 11 hops indicates the networ% is unreachable!$ / RIP uses the split hori2on with poison re#erse method to pre#ent the count"to"infinity problem$ / RIP uses only classful routing, so it uses full address classes, not subnets$ / RIP broadcasts updates to the entire networ%$ / RIP can maintain up to si3 multiple paths to each networ%, but only if the cost is the same$ / RIP supports load balancing o#er same"cost paths$ / 4he update inter#al default is 30, the in#alid timer default is 150, the holddown timer default is 150, and the flush timer default is 260$

7 big problem with distance #ector routing protocol is routing loop 7 common problem that could occur with routing protocol is that a routing loop$ *et8s ta%e a loo% at how a routing loop occurs$ 999999: ;ere we ha#e routers 7, < and ($ &otice that at the beginning when a routing protocol is not turned on! there are only directly connected networ%s in the routing tables of these routers$ For e3ample, in the routing table of router 7, network 1.0.0.0 has already been %nown because it is directly connected through interface E0 and the metric of a directly connected networ%! is 0 these 3 parameters are shown in the routing tables below!$

7lso < %nows networ%s 2.0.0.0 = 3.0.0.0 with a metric of 0$ 7lso ( %nows networ%s 3.0.0.0 = 4.0.0.0 with a metric of 0$

&ow we turn on RIP on these routers we will discuss the configuration later$ In the rest of this article, we will call networ% 1$0$0$0 networ% 1, 2$0$0$0 networ% 2 and so on!$ RIP sends update e#ery 30 seconds so after 30 sec goes by, 7 sends a copy of its routing table to <, < already %new about networ% 2 but now < learns about networ% 1 as well$ &otice the metric we ha#e here for directly connected networ%s, since we8re using RIP, we8re using a metric of hop count$ Remember a hop count or a hop! is how many routers that these pac%ets will ha#e to go through to reach the destination$ For e3ample, from router 7 to networ% 1 = 2 which are directly connected! it goes to 0 hop, router < has now learned about networ% 1 from 7 #ia >0 interface so the metric now will be 1 hop$

>ach router recei#es a routing table from its direct neighbor$ For e3ample, Router < recei#es information from Router 7 about networ% 1 and 2$ It then adds a distance #ector metric such as the number of hops!, increasing the distance #ector of these routes by 1$ < also e3changes its routing table with 7 about networ% 2 and 3$

< then passes the routing table to its other neighbor, Router ($

( also sends its update to < and < sends it to 7$

&ow the networ% is con#erged$ &ow let8s assume networ% 6 down suddenly$

?hen networ% 6 fails, Router ( detects the failure and stops routing pac%ets out its >1 interface$ ;owe#er, Routers 7 and < ha#e not yet recei#ed notification of the failure$ Router 7 still belie#es it can access 6$0$0$0 through Router <$ 4he routing table of Router 7 still refects a path to networ% 10$6$0$0 with a distance of 2 and router < has a path with a distance of 1$ 4here will be no problem if ( sends an update earlier than < and inform that networ% is currently down but if < sends its update first, ( will see < has a path to networ% 6 with a metric of 1 so it updates its routing table, thin%ing that @if < can go to networ% 6 by 1 hop than I can go to networ% 6 by 2 hopsA but of course this is totally wrong$

4he problem does not stop here$ In turn, ( sends an update to < and informs it can access networ% 6 by 2 hops$ < learns this and thin% @if ( can access networ% 6 by 2 hops than I can access by 3 hopsA$

4his same process occurs when < continually sends its update to ( and the metric will increase to infinity so this phenomenon is called @counting to infinityA$ <elow lists some methods to pre#ent this phenomenon' SPLIT HORIZON: 7 router ne#er sends information about a route bac% in same direction which is original information came, routers %eep trac% of where the information about a route came from$ ,eans when router 7 sends update to router < about any failure networ%, router < does not send any update for same networ% to router 7 in same direction$ RO TE POISONIN!: Router consider route ad#ertised with an infiniti#e metric to ha#e failed metricB11! instead of mar%ing it down$ For e3ample, when networ% 6 goes down, router ( starts route poisoning by ad#ertising the metric hop count! of this networ% as 11, which indicates an unreachable networ%$ POISON RE"ERSE:

4he poison re#erse rule o#erwrites split hori2on rule$ For e3ample, if router < recei#es a route poisoning of networ% 6 from router ( then router < will send an update bac% to router ( which brea%s the split hori2on rule! with the same poisoned hop count of 11$ 4his ensures all the routers in the domain recei#e the poisoned route update$ &otice that e#ery router performs poison re#erse when learning about a downed networ%$ In the abo#e e3ample, router 7 also performs poison re#erse when learning about the downed networ% from <$ HOL# #O$N TI%ERS: 7fter hearing a route poisoning, router starts a hold"down timer for that route$ If it gets an update with a better metric than the originally recorded metric within the hold"down timer period, the hold"down timer is remo#ed and data can be sent to that networ%$ 7lso within the hold"down timer, if an update is recei#ed from a different router than the one who performed route poisoning with an eCual or poorer metric, that update is ignored$ -uring the hold"down timer, the @downedA route appears as @possibly downA in the routing table$ For e3ample, in the abo#e e3ample, when < recei#es a route poisoning update from (, it mar%s networ% 6 as @possibly downA in its routing table and starts the hold"down timer for networ% 6$ In this period if it recei#es an update from ( informing that the networ% 6 is reco#ered then < will accept that information, remo#e the hold"down timer and allow data to go to that networ%$ <ut if < recei#es an update from 7 informing that it can reach networ% by 1 or more! hop, that update will be ignored and the hold"down timer %eeps counting$ &ote' 4he default hold"down timer #alue B 150 second$ TRI!!ERE# P#&TE : ?hen any route failed in networ% ,do not wait for the ne3t periodic update instead send an immediate update listing the poison route$ 'O NTIN! TO IN(INIT): ,a3imum count 10 hops after it will not be reachable$ 'onfi*+rin* RIP

Router(config)#router rip Router(configrouter)#network<address>

Enter router RIP configuration mode Identify networks that will participate in the router protocol. Notice that you identify networks and not interfaces.

&D4>' Eou need to ad#ertise only the classful networ% number, not a subnet' Router config"router!Fnetwor% 1G2$11$0$0 not Router config"router!Fnetwor% 1G2$11$10$0 If you ad#ertise a subnet, you will not recei#e an error message, because the router will automatically con#ert the subnet to the classful networ% address$ 4o learn more about configuring RIP, please read my (onfiguring RIP G&+3 *ab tutorial

Configuring RIP GNS3 Lab


-ecember 3rd, 2010Go to comments

In this tutorial we will use RIP #ersion 2 as the routing protocol so that the loopbac% interface of R0 can communicate with the loopbac% interface of R2$ 7 Cuic% summary of RIP#2' 1! Routing Information Protocol RIP! is a true distance"#ector routing protocol 2! RIP permits a hop count of up to 10, so anything that reCuires 11 hops is deemed unreachable$ 3! RIP sends the complete routing table out to all acti#e interfaces e#ery 30 seconds RIP updates occur e#ery 30 seconds! 6! RIP #ersion 2 does send subnet mas% information with the route updates$ 4his is called classless routing$ 0! RIP only uses hop count to determine the best way to a remote networ% a hop is a router! 1! 7dministrati#e -istance is 120 G! +upport )*+, = discontiguous networ%s &ote' If you are not sure about RIP, please read my RIP tutorial first <elow is the topology of this lab

'onfi*+rin* interface, for R0- R1 . R2: R0/confi*01interface ,020 R0/confi*3if01i4 a55re,, 162.178.1.2 299.299.299.0 R0/confi*3if01no ,:+t5own R0/confi*3if01interface ;o0 R0/confi*01i4 a55re,, 12.0.0.1 299.0.0.0 R1/confi*01interface ,020 R1/confi*3if01i4 a55re,, 162.178.1.1 299.299.299.0 R1/confi*3if01no ,:+t5own R1/confi*3if01interface f020 R1/confi*3if01i4 a55re,, 162.178.2.1 299.299.299.0 R1/confi*3if01no ,:+t5own R2/confi*01interface f020 R2/confi*3if01i4 a55re,, 162.178.2.2 299.299.299.0 R2/confi*3if01interface ;o0 R2/confi*3if01i4 a55re,, 200.200.200.1 299.299.299.0

<efore enable RIP we should chec% the routing table on these routers to understand what has been changed in these routers$ R0

R1

R2

&otice that these 3 routers only see the directly connected routers$ &ow if you ping from the loopbac% or any interface! of R0 to the loopbac% or any interface! of R2 then the it will not successful because R0 doesn8t %now which interface it should send the pac%ets out to reach networ% 200$200$200$0$ &ow enable RIP#2 on three routers

R0/confi*01ro+ter ri4 R0/confi*3ro+ter01<er,ion 2 R0/confi*3ro+ter01network 12.0.0.0 R0/confi*3ro+ter01network 162.178.1.0 R1/confi*01ro+ter ri4 R1/confi*3ro+ter01<er,ion 2 R1/confi*3ro+ter01network 162.178.1.0 R1/confi*3ro+ter01network 162.178.2.0 R2/confi*01ro+ter ri4 R2/confi*3ro+ter01<er,ion 2 R2/confi*3ro+ter01network 200.200.200.0 R2/confi*3ro+ter01network 162.178.2.0 &otice that with RIP protocol we Hust need to type the main networ% without subnet mas% or wildcard mas%$ If you type a subnetwor%, it will be auto summary into the main networ%$ (hec% the routing tables of these routers we will see the differences R0

R1

R2

&ow we can ping from the R0Is loopbac% interface to the R2Is loopbac% interface as the routing table of R0 has a path to R2Is loopbac% interface and #ice #ersa$ If you want to chec% what is inside the update pac%et, use the command 5e=+* i4 ri4$

4o turn off the debug ip, use the command +n5e=+* i4 ri4$ If you want to disable all the debug processes, use the command +n5e=+* a;;$
(omments 3J!'omment,

1.

R.&.
Kanuary 15th, 2011

#ery nice$ 2. >o=in


Kanuary 20th, 2011

4he article is #ery simple and understanding$ 7nd the screenshots help you to understand it better and wont feel boring '! 3. >o=in

Kanuary 20th, 2011

Dne Cuestion why the Routers R1 and R2 are interconnected using fast ethernet instead of serial interfaceL and why we are not configuring cloc% rate on serial interfaceL 4. tka?
February 1st, 2011

If I add the no"auto summary command in Rip )2 will this be incorrect on the ((&7 e3am if my &etwor% is in a classful networ%L It doesn8t seem li%e it would hurt anything$ If this was a RIP )2 networ% interface address' 1J2$115$30$15 200$200$200$260 would I still write the networ% as' 1J2$115$30 and the no auto"summaryL 4han%s 9. 6t+t
7pril 10th, 2011

MHobin' In the tutorial I used both serial and Fast>thernet because they don8t affect the configuration$ ?e don8t need to configure cloc% rate on serial interface because in most modern (isco routers, cloc% rate has already been set by default$ Mt%ay' Eou only need to use @no auto"summaryA command if your networ% has discontiguous networ%s$ In this tutorial if you add this command there will not ha#e any effect on the networ%$ If you use the @no auto"summaryA, RIP will send the subnet mas% as well$ <ut it gets the subnet mas% of the outgoing interface so you Hust need to type 1J2$115$30$15 7. #eeone
Kune 1th, 2011

4han%s Jtut for your helpN please can you e3plain when we need to use @no auto"summaryA and what @-iscontiguous networ%A is L because I notice no auto"sumarry command is always use in >IGRP$ @. r+4+;
Kune 26th, 2011

I ha#e been following this site since last year and I would really lo#e to meet the admins and all those people who ha#e a hand in creating such a wonderful site$ 4his site has been of immense help to many of usO 4han%s a lot$ 7s usual li%e the other articles, this one was also of a great help to meO 8. Aa;4it
Kuly 2nd, 2011

Perfectly wor%ing P 6. nc
+eptember 10th, 2011

can anyone comment on G&+3 and Pac%et 4racer, I am new to both G&+3 seems more powerful, if i load, say, a c1G00 ID+, does it allow me to use other series feature or it is #ery specific L

Pac%et 4racer seem no need to deal with ID+ but I am ha#ing hard time to ma%e it to wor%, using #ersion0$3! li%e the lab here$ I also not able to ma%e the Frame Relay cloud wor%$ although no problem for all commands! 7ny good tutorial on Pac%et tracer L than%s 10. ReBa
+eptember 21th, 2011

#ery nice '! 11. %o:amme5 $aBeer


+eptember 30th, 2011

Please let us %now some more lab in RIP$ )ery nice lin% $ 4han%s = Regards, ,ohammed ?a2eer 12. Sanc:o,
&o#ember 23rd, 2011

#ery helpful and clearP but still would li%e to hear the answer to or get a lin% with answer to -eeone8s CuestionO 13. Co:n?
-ecember 11th, 2011

good labO Cuestion' when conf router R0, why did you repeat the commandL +ee R0 R0 R0 R0 R0 Hs 14. config!Frouter rip config"router!F#ersion 2 config"router!Fnetwor% 12$0$0$0 config"router!Fnetwor% 1J2$115$1$0 config"router!Fnetwor% 12$0$0$0 to:ritB
Kanuary 0th, 2012

If my loopbac% address is' 10$0$5$1 Q26, what shall i type to ad#ertise the networ%L will it be' networ% 10$0$0$0 no auto"summary or networ% 10$0$5$0 no auto"summary please clarify if we8ll use the no auto"summary command, we8ll we still type the classful networ%L 19. "I>a?
February 16th, 2012

)ery useful this 4utorial O4han% Eou )ery ,uch 17. Ba:ir

February 22nd, 2012

#ery good 1@. miri=eni


,arch 22nd, 2012

#ery impotant tutorial 18. %+5it:a


,ay 10th, 2012

Mtohrity$$ I also agree with you $ RIP #ersion 2 is classless routing protocol$$after we enter the command no auto summary it displays the truth O$ 16. %+5it:a
,ay 10th, 2012

anyway than%s Jtut you are doing a great Hob for student li%e us$ cheers 20. &<5:e,: S:ak?a
,ay 21st, 2012

4han% you Jtut I ha#e no word for this website, really its #ery awesome website$ 21. ;earner
Kuly 21th, 2012

Mtohrit2 : since we are configuring loopbac% interface and not any main router networ% for routing $$ there is no need for using no auto summary command, as no auto summary is only used in case of discontiguous networ% , i$e$ when two maHor sub networ%s are connected using a another maHor sub networ% i$e, say 1J2$115$1$0Q26 is connected in between by 10$0$0$0Q26 networ%$ 22. ;earner
Kuly 2Gth, 2012

Mtohrit2$$ but if you are loo%ing for all pinging up the networ% throughout, i might suggest you to use no auto"summary, dude 23. ;earner
-ecember 20th, 2012

#ery helpfull tutorialOO 24. &n5rew


Kanuary 2Gth, 2013

;i J4ut, can you e3plain why you didn8t add @passi#e interfaceA on loopbac% interfacesL 4his will a#oid to propagate routing updates on no necessary interfaces *7& networ%s! and during debug to a#oid' RIP' ignored #2 pac%et from 12$0$0$1 sourced from one of our addresses!$ Is the split hori2on automatically appliedL 29. 6t+t
Kanuary 25th, 2013

M7ndrew' Ees, in large networ%s we should not let the loopbac% interfaces send routing updates$ I Hust don8t want to ma%e this tutorial comple3 with the @passi#e"interfaceA command$ 7nd yes, the split hori2on rule is automatically applied$ 27. &non?mo+,
7pril 26th, 2013

7ma2ing '! 2@. na<een


,ay 1th, 2013

#ery nice$ 28. na<een


,ay 1th, 2013

http'QQnetwor%ingtipstric%s$blogspot$inQ #ery nice$ 26. Bam


,ay 13th, 2013

MJtut I ha#e followed e#erything to a tee but r2 cannot ping anyone r1Qr0 e#en though it is recei#ing the rip updates and showing the connections e3actly the same as abo#e$ pls help 30. &a5?a
Kune 6th, 2013

J4R4' @loopbac% interfaceA : I couldn8t understand this concept$ 7ny tutorial on thisL 31. 6t+t
Kune 1th, 2013

M7adya' *oopbac% interface is a logical interface on that routerQswitch$ It opearates in the same way as a physical directly connected interface on that routerQswitch$ 32. Aon,tantin
Kuly 16th, 2013

MJtut ;i, i ha#e one Cuestion, it8s so important RIP#2 with *oopbac% interface configureL 33. Sac:in
Kuly 20th, 2013

#ery niceO$MJtutOe3cellent HobO 34. Sac:in


Kuly 20th, 2013

;i tut, how we can redistribute in rip L 39. Sac:in

Kuly 20th, 2013

with reditribute static route 37. ce;ine =a*


+eptember 11th, 2013

7 pest which is demonstrating up roughly e#erywhere you go, from film theaters to clothing stores as well as modes of transportation$ celine bag http'QQwww$meldrumhouse$comQ>mailsQceline bag sale$html 3@. Har,:a55:
+eptember 23rd, 2013

than%s to guide us Ouseful %nowledge O$ 38. imran k:an


Dctober 16th, 2013

than%s i h#e don my assgnmnt lo#e u 36. !o4a;


&o#ember 1Jth, 2013

)ery nice articles$ it was easy to understand

You might also like