




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
2
Chapter3.PacketSwitchingNetworks
SwitchingandForwarding
VirtualCircuitandDatagramNetworks
ATMandCellSwitching
X.25andFrameRelay
Routing
What’sInsideaRouter/Switch?
InsideaSwitch:ArchitectureOverview
Twokeyswitchfunctions:
Runroutingalgorithms/protocol
Forwardingpacketsfromincomingtooutgoinglink
forwardingdataplane(hardware)
forwardingtablescomputed,pushedtoinputports
routing,management
controlplane(hardware&software)
4
InputPortFunctions
Physicallayer:
Bit-levelreception
Datalinklayer:
Errorhandling
Decentralizedswitching
Lookupoutputportusingforwardingtable
Completeinputportprocessingat“l(fā)inespeed”
Queuing:ifpacketsarrivefasterthanforwardingrateintoswitchfabric
ThreeTypesofSwitchingFabrics
Transferpacketfrominputbuffertoappropriateoutputbuffer
Switchingrate:rateatwhichpacketscanbetransferfrominputstooutputs
oftenmeasuredasmultipleofinput/outputlinerate
Ninputs:switchingrateNtimeslineratedesirable
crossbar
Threetypesofswitchingfabrics
memory
memory bus
SwitchingviaMemory
Firstgenerationrouters:
TraditionalcomputerswithswitchingunderdirectcontrolofCP
Packetcopiedtosystem’smemory
memory
Speedlimitedbymemorybandwidth(2buscrossingsperdatagram)
inputport(e.g.,Ethernet)
outputport(e.g.,Ethernet)
systembus
SwitchingviaaBus
Datagramfrominputportmemorytooutputportmemoryviaasharedbus
Buscontention:switchingspeedlimitedbybusbandwidth
32Gbpsbus,Cisco5600:sufficientspeedforaccessandenterpriserouters
bus
SwitchingviaaMesh
Overcomebusbandwidthlimitations
crossbar
Banyannetworks,crossbar,otherinterconnectionnetsinitiallydevelopedtoconnectprocessorsinmultiprocessor
Advanceddesign:fragmentingdatagramintofixedlengthcells,switchcellsthroughthefabric.
Cisco12000:switches60Gbpsthroughtheinterconnectionnetwork
OutputPortFunctions
Buffering
Datagram(packets)canbelostduetocongestion,lackofbuffers
Requiredwhenpacketsarrivefromfabricfasterthanthetransmissionrate
Choosesamongqueuedpacketsfortransmission
Selectpacketstodropwhenbuffersaturates
Priorityscheduling–whogetsbestperformance
Schedulingdiscipline
Routing
Routing
Objective
Buildroutingtablesonswitchesfordatagramnetworks
ChoosepathsandbuildforwardingtableswhensettingupconnectionsforVCnetworks
Characteristicsrequired
Efficiency:e.g.smallestpossiblelineorswitch
Resilience:peakload,switchorlinefailure
Stability:avoidoscillation
NetworkAbstraction
RoutingElements
Performancecriteria
Decisiontime
Decisionplace
Networkinfosource
Networkinfoupdatetiming
PerformanceCriteria
Minimumhop
e.g.1–3–6
Leastcost
e.g.1–4–5–6
Determinecost
Minimumdelay:queuelength
Largestthroughput:reverseoftransmissionrate
DecisionTimeandPlace
Time
Foreachpacket---datagramnetworks
Atthestartofeachvirtualcircuit---VCnetworks
Place
Centralized
Source---sourcerouting
Distributed---byeachswitchnode
NetworkInfoSourceandUpdateTiming
Infosource
Localinformation
Adjacentswitches
Allswitchesinthenetwork
Updatetiming
Updateperiodically
Uponmajorchangesinswitchesorlinks
Fixed(manualconfiguration)
DifferentRoutingStrategies
Central(static)
Fixedandconfigured
Distributed
Flooding
Random
Adaptive
CentralRouting
Singlefixedrouteforeachsourcetodestinationpair
Determineroutesusingaleastcostalgorithm
Routesre-configuponmajorchangesinnetworktopology
1 6
Centralized
Distributed
FixedRoutingTables
20
Flooding
Nonetworkinforequired
Packetsentbyswitchtoeveryneighbor
Packetsretransmittedoneverylinkexceptincominglink
Eventuallyanumberofcopieswillarriveatdestination
Duplicates
Manycopiesofthesamepacketiscreated
Cycleproblem
Thesecopiesmaycirclingaroundthenetworkforever
21
Ahopcountinpacketscanhandletheproblem
FloodingExample
Hopcount=3
Initial
3packets
1sthop
9packets
2ndhop
23packets
22
PropertiesofFlooding
Allpossibleroutesaretried
Veryrobust
Atleastonepacketwilltakeminimumcostroute
Canbeusedtosetupvirtualcircuit
Allswitchesarevisited
Usefultodistributeinformation(e.g.routing)
RandomRouting
Nodeselectsoneoutgoingpathforretransmissionofincomingpacket
Selectioncanberandomorroundrobin
Orbasedonprobabilitycalculation
Nonetworkinfoneeded
Suitableforstrongly-connectednetwork
Routeistypicallynotoptimal
AssignProbabilities
Pi=Ri/jRj
Pi–Probabilityofselectingout-linki
Ri–Costfactoroflinki
Possiblecostfactor
Transmissionrate–forthroughput
Reverseofqueuesize–fordelay
AdaptiveRouting
Usedbyalmostallpacketswitchingnetworks
Routingdecisionschangeasconditionsonthenetworkchange
Requiresinfoaboutnetwork
Tradeoffbetweenqualityofnetworkinfoandoverhead
Aidincongestioncontrol
AnIsolatedAdaptiveRouting
Onlylocalinfoused
Strategy1:routetotheoutgoinglinkwithshortestqueuelengthQ
Pros.Loadbalancing
Cons.Mayawayfromthedestination
Strategy2:takedirectionintoaccount
EachlinkhasabiasBforthedestination
RoutetominimizeQ+B
=11
=9
Q+B=1+3=4
=5
27
2LeastCostAlgorithms
Foreachpairofnodes,findapathwiththeleastcost
Dijkstra’sAlgorithm
Bellman-FordAlgorithm
Dijkstra’sAlgorithm
Findshortestpathsfromgivensourcetoallothernodes
Developingpathsinorderofincreasingpathcost(length)
Denote
N=setofnodesinthenetwork
s=thesourcenode
T=setofnodessofarincorporatedbythealgorithm
w(i,j)=linkcostfromnodeitonodej
w(i,i)=0
w(i,j)=ifthetwonodesarenotdirectlyconnected
w(i,j)>0ifthetwonodesaredirectlyconnected
Dijkstra’sAlgorithmMethod
L(n)=costofleast-costpathfromsourcestonoden
currentlyknown
Attermination,L(n)iscostofleast-costpathfromston
Step1[Initialization]
T={s}setofnodesincorporatedconsistsofonlysourcenode
L(n)=w(s,n) forns
Initialpathcoststoneighboringnodesaresimplylinkcosts
Step2[GetNextNode]
FindnodexnotinTwithleast-costpathfroms(i.e.minL(x))
IncorporatenodexintoT
AlsoincorporatetheedgethatlinksxwiththenodeinTthatcontributestothepath
Dijkstra’sAlgorithmMethod
Step3[UpdateLeast-CostPaths]
L(n)=min[L(n),L(x)+w(x,n)]forallnT
Iflattertermisminimum,pathfromstonispathfromstox
concatenatedwithlinkfromxton
AlgorithmterminateswhenallnodeshavebeenaddedtoT
Dijkstra’sAlgorithmNotes
Oneiterationofsteps2and3addsonenewnodetoT
Definesleastcostpathfromstothatnode
ValueL(n)foreachnodenisthecost(length)ofleast-costpathfromston
Atlast,Tdefinestheleast-costpathfromstoeachothernode
ExampleofDijkstra'sAlgorithm
ResultsofExampleDijkstra’sAlgorithm
No
T
L(2)
Path
L(3)
Path
L(4)
Path
L(5)
Path
L(6)
Path
1
{1}
2
1-2
5
1-3
1
1-4
–
–
2
{1,4}
2
1-2
4
1-4-3
2
1-4-5
–
3
{1,2,4}
4
1-4-3
2
1-4-5
–
4
{1,2,4,5}
3
1-4-5-3
4
1-4-5-6
5
{1,2,3,4,5}
4
1-4-5-6
6
{1,2,3,4,5,6}
2
1-2
3
1-4-5-3
1
1-4
2
1-4-5
4
1-4-5-6
Destination
Next-Hop
Distance
2
2
2
3
4
3
4
4
1
5
4
2
6
4
4
Dijkstra’salgorithmdiscussion
algorithmcomplexity:nnodes
eachiteration:needtocheckallnodes,w,notinN
n(n+1)/2comparisons:O(n2)
moreefficientimplementationspossible:O(nlogn)
oscillationspossible:
1+e
e
e.g.,supportlinkcostequalsamountofcarriedtraffic:
2+e
1+e1
2+e
1+e
2+e
1+e1
initially
giventhesecosts,findnewrouting….
resultinginnewcosts
giventhesecosts,findnewrouting….resulting
innewcosts giventhesecosts,find
newrouting….resultinginnewcosts
Bellman-FordAlgorithm
Findshortestpathsfromgivennodecontainingatmost1link
Findtheshortestpathsthatcontainingatmost2links,basedontheresultof1link
Findtheshortestpathsof3linksbasedonresultof2links,andsoon
s=thesourcenode
w(i,j)=linkcostfromnodeitonodej
w(i,i)=0
w(i,j)=ifthetwonodesarenotdirectlyconnected
w(i,j)>0ifthetwonodesaredirectlyconnected
Bellman-FordAlgorithmMethod
h=maximumnumberoflinksinpathatcurrentstageofthealgorithm
Lh(n)=costofleast-costpathfromstonunderconstraintofnomorethanhlinks
Step1[Initialization]
L0(n)=,forallns
L1(n)=w(s,n)
Lh(s)=0,forallh
Bellman-FordAlgorithmMethod
Step2[Update]
Foreachsuccessiveh>0
Foreachns,computeLh+1(n)=minj[Lh(j)+w(j,n)]
Connectnwithpredecessornodejthatachievesminimum
Eliminateanyconnectionofnwithdifferentpredecessorformedduringearlieriterations
Repeatuntilnochangemadetoroute
(convergence)
Bellman-FordAlgorithmNotes
Foreachiterationwithhandforeachdestinationnoden
Comparesnewlycomputedpathfromstonoflengthhwithpathfrompreviousiteration(h1)
Ifpreviouspathshorteritisretained
Otherwisenewpathisdefined
ExampleofBellman-FordAlgorithm
40
ResultsofBellman-FordExample
h
Lh(2)
Path
Lh(3)
Path
Lh(4)
Path
Lh(5)
Path
Lh(6)
Path
0
–
–
–
–
–
1
2
1-2
5
1-3
1
1-4
–
–
2
4
1-4-3
2
1-4-5
10
1-3-6
3
3
1-4-5-3
4
1-4-5-6
4
2
1-2
3
1-4-5-3
1
1-4
2
1-4-5
4
1-4-5-6
Destination
Next-Hop
Distance
2
2
2
3
4
3
4
4
1
5
4
2
6
4
4
Dijkstravs.Bellman-Ford
RoutingbasedonDijkstra
Linkstatesfloodtoallothernodes
Eachnodewillhavecompletetopologyandbuilditsownroutingtable
RoutingbasedonBellman-Ford
Eachnodemaintaindistancevectorstootherknownnodes
Vectorsexchangedwithdirectneighbourstoupdatethepathsandcosts
Routingtablesbuiltinadistributedway
L(n)=min[L(n),L(x)+w(x,n)]
Lh(x,D)
S … D S D
Dijkstra’s(LinkState)
Bellman-Ford(DistanceVector)
Dijkstravs.Bellman-Ford
Messagecomplexity
DK:nnodes,elinks,O(ne)
messages
BF:Dependsonconvergencetime
Speedofconvergence
DK:O(n2)andquick;Mayhaveoscillations
BF:Slowanddependsonchanges;
44
Maycontainroutingloops
Robustness:whathappensifnodemalfunctions
DK:Advertiseincorrectdirectlinkscost;
Errorrangeconstrained
BF:Errornodecanexchangeincorrectpathscost;
Errormaypropagatethroughthenetwork
Routingalgorithmclassification
Q:globalorlocalinformation?centralized:
allroutershavecompletetopology,linkcostinfo
“l(fā)inkstate”algorithms
decentralized:
routerknowsphysically-connectedneighbors,linkcoststoneighbors
“distancevector”algorithms
iterativeprocessofcomputation,exchangeofinfowithneighbors
Q:staticordynamic?
static:
routeschangeslowlyovertime
dynamic:
routeschangemorequickly
periodicupda
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 買賣種子合同范本
- 農(nóng)業(yè)委托種植合同范本
- 體育新城租房合同范本
- 剩余瓷磚售賣合同范本
- 人工包給勞務(wù)公司合同范本
- 協(xié)助出口退稅合同范本
- 農(nóng)資經(jīng)營聘用合同范本
- 3人共同合作合同范本
- lng承運(yùn)合同范本
- 醫(yī)保專員勞動(dòng)合同范本
- 計(jì)算機(jī)教室(微機(jī)室)學(xué)生上機(jī)使用記錄
- 第1章 會(huì)展經(jīng)濟(jì)概述
- 學(xué)與教的心理學(xué)第6版(師范專業(yè)心理學(xué))PPT完整全套教學(xué)課件
- 單位下鄉(xiāng)租車方案
- 《植物學(xué)》練習(xí)(二)根、莖、葉營養(yǎng)器官的聯(lián)系及變態(tài)
- 中暑-紅十字應(yīng)急救護(hù)培訓(xùn)課件
- 聯(lián)儲(chǔ)共備實(shí)施方案
- 高壓電動(dòng)機(jī)試驗(yàn)報(bào)告模板
- 醫(yī)學(xué)課件-主動(dòng)脈夾層ppt
- 中國農(nóng)業(yè)銀行筆試真題
- (5.5)-雜草圖片農(nóng)田雜草及防除學(xué)
評(píng)論
0/150
提交評(píng)論