31/ 6c0 010 010 0Es PSa3n>S >19 2 .16 8 .14 7.6by4xt" >19 2 .16 8 .14 7 padding="0"><">" name="description"/>
Tải bản đầy đủ - 0 (trang)
Chapter 5.  Routing Information Protocol (RIP)

Chapter 5.  Routing Information Protocol (RIP)

Tải bản đầy đủ - 0trang

and,ofcourse,IPRIP.

[1]R.E.Bellman.DynamicProgramming.Princeton,NewJersey:PrincetonUniversityPress;1957.



[2]L.R.FordJr.andD.R.Fulkerson.FlowsinNetworks.Princeton,NewJersey:PrincetonUniversityPress;

1962.



[3]PaloAltoResearchCenter.



The4.2BerkeleySoftwareDistributionofUNIX,releasedin

1982,implementedRIPinadaemoncalledrouted;manymore

recentversionsofUNIXarebasedonthepopular4.2BSDand

implementRIPineitherroutedorgated.[4]Oddlyenough,a

standardforRIPwasnotreleaseduntil1988,aftertheprotocol

wasinextensivedeployment.ThatwasRFC1058,writtenby

CharlesHedrick,anditremainstheonlyformalstandardof

RIPv1.

[4]Pronounced"route-dee"and"gate-dee."



Dependingontheliteratureyoureads,RIPiseitherunjustly

malignedorundeservedlypopular.Althoughitlacksthe

capabilitiesofmanyofitssuccessors,itssimplicityand

widespreadusemeanthatcompatibilityproblemsbetween

implementationsarerare.RIPwasdesignedforsmaller

networksinwhichthedatalinksarefairlyhomogeneous.Within

theseconstraints,andespeciallywithinmanyUNIX

environments,RIPcontinuestobeapopularroutingprotocol.



OperationofRIP

TheRIPprocessoperatesfromUDPport520;allRIPmessages

areencapsulatedinaUDPerDatagramProtocol)segmentwith

boththeSourceandDestinationPortfieldssettothatvalue.

RIPdefinestwomessagetypes:Requestmessagesand

Responsemessages.ARequestmessageisusedtoask

neighboringrouterstosendanupdate.AResponsemessage

carriestheupdate.ThemetricusedbyRIPishopcount,with1

signifyingadirectlyconnectednetworkoftheadvertisingrouter

and16signifyinganunreachablenetwork.

Onstartup,RIPbroadcastsapacketcarryingaRequest

messageouteachRIP-enabledinterface.TheRIPprocessthen

entersaloop,listeningforRIPRequestorResponsemessages

fromotherrouters.NeighborsreceivingtheRequestsenda

Responsecontainingtheirroutetable.

WhentherequestingrouterreceivestheResponsemessages,it

processestheenclosedinformation.Ifaparticularrouteentry

includedintheupdateisnew,itisenteredintotheroutetable

alongwiththeaddressoftheadvertisingrouter,whichisread

fromthesourceaddressfieldoftheupdatepacket.Iftheroute

isforanetworkthatRIPhasalreadyenteredinthetable,the

existingentrywillbereplacedonlyifthenewroutehasalower

hopcount.Iftheadvertisedhopcountishigherthanthe

recordedhopcountandtheupdatewasoriginatedbythe

recordednext-hoprouter,theroutewillbemarkedas

unreachableforaspecifiedholddownperiod.Ifattheendof

thattimethesameneighborisstilladvertisingthehigherhop

count,thenewmetricwillbeaccepted.[5]

[5]HolddownsareusedbyCiscoIOS,butarenotpartofthestabilityfeaturesspecifiedinRFC1058.



RIPTimersandStabilityFeatures



Afterstartup,theroutergratuitouslysendsaResponse

messageouteveryRIP-enabledinterfaceevery30seconds,on

average.TheResponsemessage,orupdate,containsthe

router'sfullroutetablewiththeexceptionofentriessuppressed

bythesplithorizonrule.Theupdatetimerinitiatingthis

periodicupdateincludesarandomvariabletopreventtable

synchronization.[6]Asaresult,thetimebetweenindividual

updatesfromatypicalRIPprocessmightbefrom25to35

seconds.ThespecificrandomvariableusedbyCiscoIOS,

RIP_JITTER,subtractsupto15percent(4.5seconds)fromthe

updatetime.Therefore,updatesfromCiscoroutersvary

between25.5and30seconds(Figure5-1).Thedestination

addressoftheupdateistheall-hostsbroadcast

255.255.255.255.[7]

[6]SynchronizationofroutetablesisdiscussedinChapter4,"DynamicRoutingProtocols."



[7]SomeimplementationsofRIPmightbroadcastonlyonbroadcastmediaandsendupdatestothedirectly

connectedneighboronpoint-to-pointlinks.TheCiscoRIPwillbroadcastonanylinktypeunlessconfiguredto

dootherwise.



Figure5-1.RIPaddsasmallrandomvariableto

theupdatetimerateachresettohelpavoidroute

tablesynchronization.TheRIPupdatesfrom

Ciscoroutersvaryfrom25.5to30seconds,as

showninthedeltatimesoftheseupdates.



[Viewfullsizeimage]



SeveralothertimersareemployedbyRIP.RecallfromChapter

4theinvalidationtimer,whichdistancevectorprotocolsuseto

limittheamountoftimearoutecanstayinaroutetable

withoutbeingupdated.RIPcallsthistimertheexpirationtimer,

ortimeout.TheCiscoIOScallsittheinvalidtimer.The

expirationtimerisinitializedto180secondswheneveranew

routeisestablishedandisresettotheinitialvaluewheneveran

updateisheardforthatroute.Ifanupdateforarouteisnot

heardwithinthat180seconds(sixupdateperiods),thehop

countfortherouteischangedto16,markingtherouteas

unreachable.

Anothertimer,thegarbagecollectionorflushtimer,issetto



240seconds60secondslongerthantheexpirationtime.[8]The

routewillbeadvertisedwiththeunreachablemetricuntilthe

garbagecollectiontimerexpires,atwhichtimetheroutewillbe

removedfromtheroutetable.Example5-1showsaroutetable

inwhicharoutehasbeenmarkedasunreachablebuthasnot

yetbeenflushed.

[8]Ciscoroutersusea60-secondgarbagecollectiontimer,althoughRFC1058prescribes120seconds.



Example5-1.Thisrouterhasnotheardanupdate

forsubnet10.3.0.0formorethansixupdate

periods.Theroutehasbeenmarkedunreachable

buthasnotyetbeenflushedfromtheroutetable.



Mayberry#showiproute

Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinte

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-c

Gatewayoflastresortisnotset

10.0.0.0255.255.0.0issubnetted,4subnets

C10.2.0.0isdirectlyconnected,Serial0

R10.3.0.0255.255.0.0ispossiblydown,

routingvia10.1.1.1,Ethernet0

C10.1.0.0isdirectlyconnected,Ethernet0

R10.4.0.0[120/1]via10.2.2.2,00:00:00,Serial0

Mayberry#



Thethirdtimeristheholddowntimer,althoughRFC1058does

notcallfortheuseofholddowns.TheCiscoimplementationof

RIPdoesusethem.Anupdatewithahopcounthigherthanthe

metricrecordedintheroutetablewillcausetheroutetogointo

holddownfor180seconds(again,sixupdateperiods).



Thesefourtimerscanbemanipulatedwiththecommand:

timersbasicupdateinvalidholddownflush



ThiscommandappliestotheentireRIPprocess.Ifthetimingof

onerouterischanged,thetimingofalltheroutersintheRIP

domainmustbechanged.Therefore,thesetimersshouldnotbe

changedfromtheirdefaultvalueswithoutaspecific,carefully

consideredreason.

RIPemployssplithorizonwithpoisonreverseandtriggered

updates.Atriggeredupdateoccurswheneverthemetricfora

routeischangedand,unlikeregularlyscheduledupdates,might

includeonlytheentryorentriesthatchanged.Alsounlike

regularupdates,atriggeredupdatedoesnotcausethe

receivingroutertoresetitsupdatetimer;ifitdid,atopology

changecouldcausemanyrouterstoresetatthesametimeand

thuscausetheperiodicupdatestobecomesynchronized.To

avoida"storm"oftriggeredupdatesafteratopologychange,

anothertimerisemployed.Whenatriggeredupdateis

transmitted,thistimerisrandomlysetbetweenoneandfive

seconds;subsequenttriggeredupdatescannotbesentuntilthe

timerexpires.

SomehostsmightemployRIPina"silent"mode.ThesesocalledsilenthostsdonotgenerateRIPupdates,butlistenfor

themandupdatetheirinternalroutetablesaccordingly.Asan

example,usingroutedwiththe-qoptionenablesRIPinsilent

modeonaUNIXhost.



RIPMessageFormat

TheRIPmessageformatisshowninFigure5-2.Eachmessage

containsacommandandaversionnumberandcancontain



entriesforupto25routes.Eachrouteentryincludesan

addressfamilyidentifier,theIPaddressreachablebytheroute,

andthehopcountfortheroute.Ifaroutermustsendan

updatewithmorethan25entries,multipleRIPmessagesmust

beproduced.Notethattheinitialportionofthemessageis4

octets,andeachrouteentryis20octets.Therefore,the

maximummessagesizeis4+(25x20)=504octets.

Includinganeight-byteUDPheaderwillmakethemaximum

RIPdatagramsize(notincludingtheIPheader)512octets.



Figure5-2.TheRIPmessageformat.



Commandwillalwaysbesettoeitherone,signifyingaRequest

message,ortwo,signifyingaResponsemessage.Thereare

othercommands,buttheyarealleitherobsoleteorreserved

forprivateuse.

VersionwillbesettooneforRIPv1.



AddressFamilyIdentifierissettotwoforIP.Theonlyexception

tothisisarequestforarouter's(orhost's)fullroutetable,as

discussedinthefollowingsection.

IPAddressistheaddressofthedestinationoftheroute.This

entrymightbeamajornetworkaddress,asubnet,orahost

route.Thesectiontitled"ClassfulRouting"examineshowRIP

distinguishesamongthesethreetypesofentries.

Metricis,aspreviouslymentioned,ahopcountbetween1and

16.

AnanalyzerdecodeofaRIPmessageisshowninFigure5-3.



Figure5-3.AnEtherealdecodeofaRIPv1

messageshowsthevaluesinthemessagefields

ofthisspecificResponsemessage.



[Viewfullsizeimage]



Severalhistoricalinfluencescontributedtotheinelegantformat

oftheRIPmessageinwhichfarmorebitspacesareunused

thanareused.TheseinfluencesrangefromRIP'soriginal

developmentasanXNSprotocol,andthedeveloper'sintentions

forittoadapttoalargesetofaddressfamilies,totheinfluence

ofBSD,anditsuseofsocketaddresses,totheneedforfieldsto

fallon32-bitwordboundaries.Whatevertheoriginal

motivations,youwillseeinChapter6thattheseunusedfields

havesincebeenputtogooduse.



RequestMessageTypes



ARIPRequestmessagemightrequesteitherafullroutetable

orinformationonspecificroutesonly.Intheformercase,the

Requestmessagewillhaveasinglerouteentryinwhichthe

addressfamilyidentifierissettozero,theaddressisallzeros

(0.0.0.0),andthemetricis16.Adevicereceivingsucha

requestrespondsbyunicastingitsfullroutetabletothe

requestingaddress,honoringsuchrulesassplithorizonand

boundarysummarization(discussedin"ClassfulRouting:

SummarizationatBoundaryRouters,"laterinthischapter).

Somediagnosticprocessesmightneedtoknowinformation

aboutaspecificrouteorroutes.Inthiscase,aRequest

messagemightbesentwithentriesspecifyingtheaddressesin

question.Adevicereceivingthisrequestwillprocesstheentries

onebyone,buildingaResponsemessagefromtheRequest

message.Ifthedevicehasanentryinitsroutetable

correspondingtoanaddressintherequest,itwillenterthe

metricofitsownrouteentryintothemetricfield.Ifnot,the

metricfieldwillbesetto16.Theresponsewilltellexactlywhat

therouter"knows,"withnoconsiderationgiventosplithorizon

orboundarysummarization.

Asnotedpreviously,hostsmightrunRIPinsilentmode.This

approachallowsthemtokeeptheirroutetablesuptodateby

listeningtoRIPupdatesfromrouterswithouthavingtosend

RIPResponsemessagesuselesslyonthenetwork.However,

diagnosticprocessesmightneedtoexaminetheroutetableof

thesesilenthosts.Therefore,RFC1058specifiesthatifasilent

hostreceivesarequestfromaUDPportotherthanthe

standardRIPportof520,thehostmustsendaresponse.



ClassfulRouting

TheroutetableinExample5-2containsRIP-derivedroutes,

whicharerecognizedfromthekeytotheleftofeachentry.Of

significanceintheseentriesarethebracketedtuples;as



discussedinChapter3,"StaticRouting,"thefirstnumberisthe

administrativedistance,andthesecondnumberisthemetric.It

isreadilyseenthatRIPhasanadministrativedistanceof120,

andasalreadystated,themetricforRIPishopcount.

Therefore,network10.8.0.0istwohopsaway,viaeitherE0or

S1.Ifmorethanonerouteexiststothesamedestinationwith

equalhopcounts,equal-costloadbalancingwillbeperformed.

TheroutetableofExample5-2containsseveralmultiple,equalcostroutes.



Example5-2.Thisroutetablecontainssubnetsof

networks10.0.0.0and172.25.0.0.Allnetworks

notdirectlyconnectedwerederivedbyRIP.



MtPilate#showiproute

Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinte

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-c

Gatewayoflastresortisnotset

10.0.0.0255.255.0.0issubnetted,9subnets

R10.10.0.0[120/3]via10.5.5.1,00:00:20,Serial1

[120/3]via10.1.1.1,00:00:21,Ethernet0

R10.11.0.0[120/3]via10.5.5.1,00:00:21,Serial1

[120/3]via10.1.1.1,00:00:21,Ethernet0

R10.8.0.0[120/2]via10.1.1.1,00:00:21,Ethernet0

[120/2]via10.5.5.1,00:00:21,Serial1

R10.9.0.0[120/2]via10.5.5.1,00:00:21,Serial1

[120/2]via10.1.1.1,00:00:21,Ethernet0

R10.3.0.0[120/1]via10.1.1.1,00:00:21,Ethernet0

[120/1]via10.5.5.1,00:00:21,Serial1

C10.1.0.0isdirectlyconnected,Ethernet0

R10.6.0.0[120/1]via10.1.1.1,00:00:21,Ethernet0

[120/1]via10.5.5.1,00:00:22,Serial1

R10.7.0.0[120/2]via10.1.1.1,00:00:22,Ethernet0



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 5.  Routing Information Protocol (RIP)

Tải bản đầy đủ ngay(0 tr)

×