/
ELEC EL Computer Networks S Chen Routing Overview Main issue is how the routers that constitute ELEC EL Computer Networks S Chen Routing Overview Main issue is how the routers that constitute

ELEC EL Computer Networks S Chen Routing Overview Main issue is how the routers that constitute - PDF document

tawny-fly
tawny-fly . @tawny-fly
Follow
517 views
Uploaded On 2014-12-20

ELEC EL Computer Networks S Chen Routing Overview Main issue is how the routers that constitute - PPT Presentation

e making routing decision It should process properties like correctness simplici ty robustness stability fairness and optimality Note optimality is always with re spect to chosen criterion Optimality principle if router is on optimal path from rout ID: 27113

making routing decision

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "ELEC EL Computer Networks S Chen Routing..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

ELEC3030(EL336)ComputerNetworks SChen RoutingOverviewMainissueishowthe routers thatconstitutethenetworklayerofanetworkcooperateto ndthebestroutesbetweenallpairsofstations Routingalgorithm atarouterdecideswhichoutputlineanincomingpacketshouldgo,i.e.makinga routingdecision .Itshouldprocessproperties,likecorrectness,simplicity,robustness,stability,fairness,andoptimality.NoteoptimalityisalwayswithrespecttochosencriterionOptimalityprinciple:ifrouterJisonoptimalpathfromrouterItorouterK,thenoptimalpathfromJtoKalsofallsalongsamerouteSinktree:setofoptimalroutesfromallsourcestogivendestinationformatreerootedatthedestination BAFDECJNOIHGLMK(a) BAFDECJNOIHGLMK(b) Therearetwoclassesofroutingalgorithms{Nonadaptive(static):routingdecisionsarecomputedinadvance,o line,downloadedtoroutersatbootingtimeand xed,e.g.shortestpath,\rooding,and\row-based{Adaptive:routingdecisionsareadaptedtore\rectchangesintopologyandtrac,e.g.distancevector,linkstate,hierarchical,broadcast,multicast 107 ELEC3030(EL336)ComputerNetworks SChen ShortestPathRoutingItisreallythe least-cost pathrouting,basedon dynamicprogramming foroptimisationBasicidea:ateachstep, selectanewlyreachablenodeatthelowestcost,andaddanedgetothatnode ,sotoconnectittothetreebuiltupsofarConsidernetworkcon guration,wherenodeslabeledasAtoarerouters,andeachlinkhasacostassociatedwithit GH Least-costpathforA!D:1.Bislowest-costnodereachablefromA,addsedgeAB;2.Eislowest-costnodereachablefromthetreewithAandB,addslowest-costedgeBE;3.Gislowest-costnodereachablefromthetreewithA,BandE,addslowest-costedgeEG;4.Fistheonewithlowest-costedgeEF;5.Histheonewithlowest-costedgeFH;6.Addinglowest-costedgeHDgives\shortest"pathfromAtoD:ABEFHD GH SinktreewithAatroot:Incidentally,wealso ndshortestpathfromAtoGand,accordingtotheoptimalityprinciple,thosetoB,E,FandH.ToconstructthesinktreewithAatitsroot,weonlyneedto ndshortestpathfromAtoC,whichiseitherABCorABEFC GH WhatisthesinktreewithDatroot? 108 ELEC3030(EL336)ComputerNetworks SChen FloodingBasicidea:routerforwardsanincomingpackettoalloutgoinglinksexcepttheonethatitcameinProblem:numberofpacketsincirculationjustforasinglesourcepacketquicklygrowswithoutbound,andsomemeasuremustbetakentopreventthisfromhappening,calleddamming\rood{ Hopcount :eachtimearouterpassesapacket,itdecrementsthehopcountinthepacketbyone.Whenthehopcountreacheszero,thepacketisdiscardedThismethodneedstoappropriatelysethopcounttoaninitialmaximumvalue{ Rememberidentity :eachrouterrememberstheidentityofthosepacketsithasalreadysentout.Whenduplicatecopiesofthepacketarrivesback,theyarediscardedThisisachievedbysourcerouterputtingasequencenumberinthepacket.Eachrouterneedsalistpersourceroutertellingwhichsequencenumbersoriginatingatthatsourcehavebeenseen{ Selective :routersonlysendanincomingpacketoutonthoselinesthatmakesenseForthistowork,routersmusthavesomeideasofnetworkcon gurationFloodingareimpracticalformostapplicationsbuthastworemarkableproperties{Robustness:allpossibleroutesbetweensourceanddestinationaretried.Apacketwillalwaysgetthroughaslongasatleastonepathbetweensourceanddestinationexists{Optimality:becauseallroutesaretried,atleastoncopyofthepackettoarriveatdestinationwillhaveusedaminimum-hoproute 109 ELEC3030(EL336)ComputerNetworks SChen DistanceVectorRoutingThebasicidea:lookatcoststhatyourneighboursareadvertisingtogetapackettoadestination;selecttheneighbourwhoseadvertisedcost,addedwiththecosttogettothatneighbour,islowestYoualsoneedtoadvertiseyourcoststoyourneighbourstoo.ThecostisusuallydelaytimeFormally,eachroutermaintainstwovectorscalleddelayandsuccessornode,sorouterihasDi=[di1diN]TandSi=[si1siN]Twheredijiscurrentestimateofminimumdelayfromrouteritoj(dii=0),Nisnumberofroutersinnetwork,andsijisnextnodeincurrentminimum-delayroutefromitojPeriodically,eachrouterexchangesitsdelayvectorwithallitsneighbours,andonthebasisofallincomingdelayvectors,routerkupdatesbothitsvectors:dkj=mini2Aflki+dijgandskj=iwithi=argmini2Aflki+dijgwhereAdenotessetofneighbourroutersfork,andlkiiscurrentestimateofdelayfromktoiThedistancevectorroutinghassomeproblems:respondsslowlytocongestionanddelayincreases,andhasbeenreplacedbylinkstaterouting 110 ELEC3030(EL336)ComputerNetworks SChen DistanceVectorRouting(continue)Considerthesimplenetworktopology,wherethenumberoneachlinkistheinitiallinkdelay 2159932125236514 DDD234220-14 Afterdelayvectorexchange,router1receivedthedelayvectorsD2,D3andD4fromitsthreeneighbours,andthisenablesittoupdateitsroutingtableD1andS1:Sincel12=2,l13=5andl14=1,d13=minfl12+d23;l13+d33;l14+d43g=minf2+3;5+0;1+2g=3=l14+d43andS13=4,etc. 111 ELEC3030(EL336)ComputerNetworks SChen LinkStateRoutingTheideabehindthelinkstateroutingissimple:eachroutermustdothefollowings{Findoutitsneighboursandgettheirnetworkaddresses{Measurethedelayorcosttoeachofitsneighbours{Constructalinkstatepackettotellallithasjustlearnt{Sendthispackettoalltheotherrouters{Findtheshortestpathtoeveryotherrouter,i.e.asinktree Whoaremyneighbours :Arouterknowsitsnetworkinterfaces!justsendsaHELLOpacketoneachpoint-to-pointlink,andtherouterattheotherendmustreplytellingwhoitiswithitsuniquenetworkaddressSituationiscomplicatedwitha\broadcast"LAN,i.e.twoormoreroutersareconnectedbyaLAN:solutionistoconsidersuchaLANasanodeitself DE DE HIFG GH NABLAN(a)(b)  Whatislinkcosttoneighbour :Simple,sendanECHOpackettotheneighbour,measuretheround-tripdelayanddivideitbytwo,andthiswillgiveareasonableestimateoftheactualdelayDowetakethelocalloadintoaccountinmeasuringthedelay?Argumentscanbemadebothways 112 ELEC3030(EL336)ComputerNetworks SChen LinkStateRouting(continue) Buildlinkstatepackets :Aftercollectinginformationneeded,eachrouterbuildslinkstatepacketwithitsidentity,sequencenumberandage(usedindistributing),followedbylistofneighbours(identityandlinkcost),e.g.Whentobuildlinkstatepackets:onceanhourisoftenenough BCEFAD A Seq. Age B C D E FB E5 Seq. AgeA C2 Seq. AgeB D3 Seq. AgeC F7 Seq. AgeA C1 Seq. AgeB D7 F6 E1 F8 E8StatePackets  Distributelinkstatepackets :\roodingbutkeepthe\roodincheckwithsequencenumberEachroutermaintainslistof(source,seq.number)pairstheysaw.WhenaLSParrives,itischeckedagainstthelist.Ifitisnew,itisforwardedonalllinesexcepttheoneitarrivedon;ifitisaduplicate,itisdiscarded.Tosafeguardagainstolddata,linkdownetc.,ageisdecrementedonceasecondandeverytimeitisforwardedbyarouter.Whentheagereacheszero,theLSPisdiscarded 2159100011 2060101010 2159010101 2160110001 2160011100SourceSeq.ACFACFDataSend flagsACK flags e.g.B:packetsource;itssequencenumberandage;sendandACK\ragsforeachB'sthreelinks,A,CandF Computesinktree :WhenarouterhasalltheLSPs,itconstructsshortestpathstoallpossibledestinations,i.e.asinktree,andthisisthenusedinroutingdecision 113 ELEC3030(EL336)ComputerNetworks SChen BroadcastRoutingSendingapackettoeverydestinationssimultaneouslyiscalledbroadcasting,andvariouswaysare:{Sendanindividualpacketaddressedtoeachdestination,notreallyagoodidea{Use \rooding ,providedthatthe\roodcane ectivelybekeptincheck{Use multidestinationrouting (seeTanenbaumbookfordetails){Builda sinktree rootedatsource,anduseitinrouting(Thissinktreeisalsoaspanningtree,aseverynodesareonit)!Ifthiscanbedone,itisgreatbutifnot,howtodoitapproximately?Reversepathforwarding:AssumenormallywhenrouterAforwardspackettorouterB,itusesoutgoinglinkthatliesonsinktreerootedatB.Thisalgorithmisremarkablysimple:Whenabroadcastpacketarrives,routercheckstoseeifthepacketarrivedonthelinethatisnormallyusedforsendingpacketstothesourceofbroadcast.Ifso,thereisanexcellentchancethatthebestroutewasusedandthisisthe rst F HJ N ADGEOMOCDN LB AEH BC I(a) (b)(c) E copytoarriveattherouter.Therouterthenforwardsthepacketontoalllinesexcepttheoneitarrivedon.If,however,thebroadcastpacketarrivedonalineotherthanthepreferredoneforreachingthesource,thepacketisdiscardedasalikelyduplicate 114 ELEC3030(EL336)ComputerNetworks SChen RoutingforMobileHowtoforwardpacketstomobilehostsinwide-areacontext{Mobilehosthasa xed home locationwithapermanenthomeaddress{Whenmobilehostentersanarea,itmustregisterwith foreign agentinchargeofthearea Foreign\ragentForeign LANWANMANHome LANHome\r Mobile hostWireless\r {Theforeignagentcantheninformthemobile'shomeagentatthemobile'shomelocationthatthemobileisunderitsjurisdictionWhenapacketissenttoamobilehost,itisroutedtothemobile'shomeaddress{Mobile'shomeagentisthen tunnelling ittoforeignagentwherethemobileiscurrentlyin{Homeagentalsoinformssourcewherethemobileis{Newaddresssentbackbyhomeagentenablessourcetoadaptitsroutingtable{Subsequentpacketscanbesentdirectlytotheforeignagentwherethemobileiswith 1. Packet is sent to the\r2. Packet is tunneled to the \r3. Sender is given foreign\r4. Subsequent packets are\r 115 ELEC3030(EL336)ComputerNetworks SChen RoutinginAdHocNetworksNow,likehosts,routerscancomeandgo.Wewilldiscussaroutingalgorithmforadhocnetworks,called adhocone-dimensionaldistancevector ,adistantrelativeofdistancevectorroutingEachnodemaintainsatable,keyedbydestination,givinginformationaboutthatdestination,includingwhichneighbourtosendpacketsinordertoreachthedestination C B A D E G I H F(a) C B A D E G I H F(b)Range of\r C B A D E G I H F(c) C B A D E G I H F(d)  Routediscovery :ConsidernodeAwantstosendapackettonodeIbutitdoesnotknowhow.AbroadcastsaROUTEREQUEST(RReq)packet{WhenRReqpacketarrivesanode(BandDinthiscaseastheycanreceivefromA),itischeckedtoseeifitisaduplicateornot.Ifaduplicate,itisdiscarded;otherwisedothenext Source\raddress Request\rID Destination\raddress Source\rsequence # Dest.\rsequence # ROUTEREQUEST Source\raddress Destination\raddress Destination\rsequence # Hop\rcount ROUTEREPLY{Ifthereceiverknowsafreshroutetothedestination,itsendsaROUTEREPLY(RRep)packetbacktosender,basicallytellingsourceto\useme"toreachdestination;otherwiseitrebroadcastsRReqpacket 116 ELEC3030(EL336)ComputerNetworks SChen RoutinginAdHocNetworks(continue)Routediscovery:Eventually,IreceivestheRReqpacket,anditreplieswithaRReppacket,whichissentbackusingtheroutethatRReqpacketcameinandthisprovidesAroutinginformationInroutediscovery,\roodingisused,somanymeasuresareemployedtokeep\roodincheck,andtomakesuretheroutediscoveredisafresh(live)one Routemaintenance :nodescanmoveorbeswitchedo !networktopologycanchange{Periodically,eachnodebroadcastsaHellomessage,andeachofitsneighboursisexpectedtorespondtoit{Ifnoresponseisforthcoming,broadcasterknowsthatthespeci cneighboureitherhasmovedoutofitsrangeornolongerexists{Similarly,ifanodesendsapackettoaneighbourthatdoesnotrespond,itlearnsthatthatneighbourisnolongeravailableThisinformationisusedtopurgeroutesthatnolongerwork,andalso{Whenanyofitsneighboursbecomesunreachable,thenodechecksitsroutingtabletoseewhichdestinationshaveroutesusingthisnow-goneneighbour{Foreachoftheseroutes,theactiveneighboursareinformedthattheymustdopurgingtoo{Theactiveneighboursthentelltheiractiveneighbours,andsoon 117 ELEC3030(EL336)ComputerNetworks SChen SummaryRoutingisakeyfunctionatnetworklayer,optimalityprinciple,sinktreeNon-adaptiveroutingalgorithms:shortestpathorleastcostrouting,and(dammed)\roodingroutingAdaptiveroutingalgorithms:distancevectorrouting,andlinkstateroutingbroadcastingrouting(reversepathforwarding)routingformobilesinWANs( xedhomeaddress,homeagent,foreignagent,tunnelling)routinginadhocnetworks(routediscoveryandmaintenance) 118