59
Computer Networks: Architecture and Protocols CS4450 Lecture 10 Fundamentals of Rou4ng Rachit Agarwal

lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

ComputerNetworks:ArchitectureandProtocols

CS4450

Lecture10FundamentalsofRou4ng

RachitAgarwal

Page 2: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Announcements

• Quiz1solutionsandgradesposted• Average—26.7/30;median—30/30;std.dev.—6.1

• Livecodingsessiononthe02/27.Pleasebringyourlaptops.

• Prelimwillbe"inclass”on03/26.Nomakeup.

2

Page 3: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

GoalsforToday’sLecture

• Recap:WhyNetworkLayer?

• Recap:TherightwaytothinkaboutRoutingTables…

• OurfirstNetworkLayerProtocol:LinkState

• OursecondNetworkLayerProtocol:Distance-vector

3

Page 4: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Recapfromlastlecture

Page 5: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Whynotjustusespanningtreesacrosstheentirenetwork?

• Easytodesignroutingalgorithmsfor(spanning)trees

• Step1:Sourcenode“floods”itspacketonitsspanningtreelinks

• Step2:Wheneveranodereceivesapacket:

• Forwardsincomingpacketouttoalllinksotherthantheonethatsentthepacket

Recap:Whydoweneednetworklayer?

Page 6: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Recap:RoutingviaFlooding—Anexample

Source

DesVnaVon

1

3

2

7

6

5

4

Eventuallyallnodesarecovered

Onecopyofpacketdeliveredtodes4na4on

1

2

4

7

5

6

Page 7: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Whynotjustusespanningtreesacrosstheentirenetwork?

• Easytodesignroutingalgorithmsfor(spanning)trees

• Step1:Sourcenode“floods”itspacketonitsspanningtreelinks

• Step2:Wheneveranodereceivesapacket:

• Forwardsincomingpacketouttoalllinksotherthantheonethatsentthepacket

• Threefundamentallimitations:• Unnecessaryprocessingatendhosts• Highlatency• LowBandwidthutilization

Recap:Whydoweneednetworklayer?

Networklayerusesrou4ngtablestoalleviatetheseissues

Page 8: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

WelcometotheNetworkLayer!

• THEfunctionality:deliveringthedata

• THEprotocol:InternetProtocol(IP)• Toachieveitsfunctionality,IPprotocolhasthreeresponsibilities

• Addressing

• Encapsulatingdataintopackets

• Routing(usingavarietyofprotocols;severallectures)

Page 9: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Rou4ngtableentriesforapar4culardes4na4onforma(directed)spanningtreewiththatdes4na4onastheroot!!!!

• Letsfocusononedestination-MIT

Cornell

Harvard

MIT

Switch#1

Switch#2

Switch#3L1

L2 L3

L4

L5 L6

DESTINATION NEXTHOP

CORNELL L1

MIT L3

HARVARD L4

DESTINATION NEXTHOP

CORNELL L2

MIT L5

HARVARD L5

DESTINATION NEXTHOP

CORNELL L5

MIT L6

HARVARD L3

Recap:TherightwaytothinkaboutRoutingTables

Page 10: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Routingtablesarenothingbut….• Acollectionof(directed)spanningtree• Oneforeachdestination

• RoutingProtocols• “n”spanningtreeprotocolsrunninginparallel

Recap:TherightwaytothinkaboutRoutingTables

Page 11: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Globalroutingstatevalidifandonlyif:• Therearenodeadends(otherthandestination)• Therearenoloops

• Easytocheckvalidityofroutingstate

Recap:ValidityofaRoutingState

Page 12: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Easytoavoiddeadends

• Avoidingloopsishard

• Thekeydifferencebetweenroutingprotocolsishowtheyavoidloops!

CreatingValidRoutingState

Page 13: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• CreateTree,routeontree• E.g.,Spanningtreeprotocol(switchedEthernet)• Good:easy,no(persistent)loops,nodeadends• Not-so-good:unnecessaryprocessing,highlatency,lowbandwidth

• Obtainaglobalview:• E.g.,Linkstate

• Distributedroutecomputation:

• E.g.,Distancevector• E.g.,BorderGatewayProtocol

Recap:Threeflavorsofprotocols

Page 14: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Questions?

Page 15: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Globalview

Page 16: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

TwoAspectsofGlobalViewMethod

• Protocol:Whatwefocusontoday

• Wheretocreateglobalview

• Howtocreateglobalview• Disseminatingroutecomputation(ifnecessary)

• Whentorunroutecomputation

• Algorithm:computingloop-freepathsongraph

• Straightforwardtocomputelowestcostpaths

• UsingDijkstra’salgorithm(pleasestudy;algorithmscourse)

• Wewon’tspendtimeonthis

Page 17: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Wheretocreateglobalview?

• Oneoption:Centralserver• Collectsaglobalview• Computestheroutingtableforeachnode

• “Installs”routingtablesateachnode• Software-definedNetworks:laterincourse

• Secondoption:Ateachrouter• Eachroutercollectsaglobalview• ComputesitsownroutingtableusingLink-stateprotocol

• Link-stateroutingprotocol• OSPFisaspecificimplementationoflink-stateprotocol

• IETFRFC2328(IPv4)or5340(IPv6)

Page 18: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

OverviewofLink-StateRouting

• Everyrouterknowsitslocal“linkstate”• Knowsstateoflinkstoneighbors• Up/down,andassociatedcost

• Arouterfloodsitslinkstatetoallotherrouters• Usesaspecialpacket—LinkStateAnnouncements(LSA)

• Announcementisdeliveredtoallnodes(nextslide)

• Hence,everyrouterlearnstheentirenetworkgraph

• Runsroutecomputationlocally

• Computingleastcostpathsfromthemtoallothernodes

• E.g.,usingDijkstra’salgorithm

Page 19: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

HowdoesFloodingWork?

• “Linkstateannouncement”(LSA)arrivesonalinkatarouter

• Thatrouter:• Remembersthepacket

• Forwardsthepacketoutallotherlinks• Doesnotsenditouttheincominglink

• Why?

• Ifapreviouslyreceivedannouncementarrivesagain…

• Routerdropsit(noneedtoforwardagain)

Page 20: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Link-StateRouting

S1

S2

S3

S7S5

S6

S4

Host A

Host B

Host C

Host DHost E

Page 21: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

EachNodeThenhasaGlobalView

S1

S2

S3

S7S5

S6

S4

Host A

Host B

Host C

Host DHost E

Page 22: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

WhentoInitiateFloodingofannouncements?

• Topologychange• Linkfailures• Linkrecovery

• Configurationchange• Linkcostchange(whywouldonechangelinkcost?)

• Periodically• Refreshthelink-stateinformation

• Typically(say)30minutes

• Correctsforpossiblecorruptionofdata

Page 23: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

AreLoopsStillPossible?

55

5 35

51

1

A

D E

F

CB

A and D think this is the path to C

E-C link fails, but D doesn’t know yet

55

5 35

5

1

A

D E

F

CB

E thinks that this the path to C

E reaches C via D, D reaches C via E Loop!

• Canyoueverhaveloopswithlink-staterouting?

• Again:Canyoueverhaveloopswithlink-staterouting?

Page 24: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

TransientDisruptions

55

5 35

5

1

A

D E

F

CB

55

5 35

5

1

A

D E

F

CB

• Inconsistentlink-stateviews• Someroutersknowaboutfailurebeforeothers

• Theshortestpathsarenolongerconsistent• Cancausetransientforwardingloops

• Transientloopsarestillaproblem!

Page 25: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

ConvergenceinLink-StateRouting

• Eventually,allroutershaveconsistentroutinginformation

• E.g.,allnodeshavingthesamelink-statedatabase

• Here,eventuallymeans“ifnothingchangesafterawhile”

• Forwardingisconsistentafterconvergence• Allnodeshavethesamelink-statedatabase

• Allnodesforwardpacketsonsamepaths

• Butwhilestillconverging,badthingscanhappen

Page 26: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

TimetoReachConvergence

• Sourcesofconvergencedelay?• Timetodetectfailure

• Timetofloodlink-stateinformation(~longestRTT)

• Timetorecomputeforwardingtables

• Performanceproblemsduringconvergenceperiod?

• Deadends• Loopingpackets• Andsomemorewe’llseelater….

Page 27: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

LinkStateisConceptuallySimple

• Everyonefloodslinksinformation

• Everyonethenknowsgraphofthenetwork

• Everyoneindependentlycomputespathsonthegraph

• Allthecomplexityisinthedetails

Page 28: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

#3:DistributedRouteComputation

Page 29: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Eachnodecomputestheoutgoinglinks(foreachdestination)basedon:

• Locallinkcosts• Informationadvertisedbyneighbors

• Algorithmsdifferinwhattheseexchangescontain

• Distance-vector:justthedistance(andnexthop)toeachdestination• Pathvector:theentirepathtoeachdestination

• Wewillfocusondistance-vectorfornow

DistributedComputationofRoutes

Page 30: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Recall:RoutingTables=CollectionofSpanningTrees

30

• Canweusethespanningtreeprotocol(withmodifications)?

• Messages(Y,d,X):ForrootY;FromnodeX;advertisingadistancedtoY

• InitiallyeachswitchXannounces(X,0,X)toitsneighbors

Page 31: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Distancevector:acollectionof“n”STPinparallel

LetsruntheProtocolonthisexample

(destination=1)

Page 32: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round1

Receive Send

1 (1,0,1)

2

3

4

5

6

7

Page 33: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round2Receive Send

1(1,0,1)

2

3 (1,0,1) (1,1,3)

4

5 (1,0,1) (1,1,5)

6 (1,0,1) (1,1,6)

7

Page 34: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round3Receive Send

1(1,0,1)(1,1,3),(1,1,5),

(1,1,6)

2 (1,1,3),(1,1,6) (1,2,2)

3(1,1,3)

4

5(1,1,5) (1,1,6)

6(1,1,6) (1,1,5)

7

Page 35: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round4Receive Send

1(1,0,1)

2(1,2,2)

3(1,1,3) (1,2,2)

4 (1,2,2) (1,3,4)

5(1,1,5)

6(1,1,6) (1,2,2)

7 (1,2,2) (1,3,7)

Page 36: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round5Receive Send

1(1,0,1)

2(1,2,2) (1,3,4),(1,3,7)

3(1,1,3)

4(1,3,4) (1,3,7)

5(1,1,5)

6(1,1,6)

7(1,3,7) (1,3,4)

Page 37: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Thesameprotocol/algorithmappliestoalldestinations

• Eachnodeannouncesdistancetoeachdestination• Iam4hopsawayfromnodeA

• Iam6hopsawayfromnodeB

• Iam3hopsawayfromnodeC

• …

• Nodesareexchangingavectorofdistances

WhynotSpanningTreeProtocol?WhyDistance“Vector”?

Page 38: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

TowardsDistanceVectorProtocol(withnofailures)

38

• Messages(Y,d,X):ForrootY;FromnodeX;advertisingadistancedtoY

• InitiallyeachswitchXannounces(X,0,X)toitsneighbors

• Switchesupdatetheirview• Uponreceivingmessage(Y,d,Z)fromZ,checkY’sid

• IfY’sid<currentroot:setrootdestination=Y

• Switchescomputetheirshortestdistancefromtherootdestination

• Ifcurrent_distance_to_Y>d+costoflinktoZ:• updatecurrent_distance_to_Y=d+costoflinktoZ

• IfrootchangedORshortestdistancetotherootdestinationchanged,sendallneighborsupdatedmessage(Y,d+c,X)

Page 39: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

GroupExercise:

LetsruntheProtocolonthisexample

2

1

3

2 1

7

Page 40: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round1

Receive Send

1 (1,0,1)

2 (2,0,2)

3 (3,0,3)

2

1

3

2 1

7

Page 41: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round2

Receive Send

1(1,0,1)

(2,0,2),(3,0,3)

(2,2,1),(3,1,1)

2(2,0,2)

(1,0,1),(3,0,3)

(1,2,2),(3,7,2)

3(3,0,3)

(1,0,1),(2,0,2)

(1,1,3),(2,7,3)

2

1

3

2 1

7

Page 42: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round3

Receive Send

1(1,0,1)(2,2,1),(3,1,1)

(1,2,2),(3,7,2),(1,1,3),(2,7,3)

2(1,2,2),(2,0,2),(3,7,2)

(2,2,1),(3,1,1),(1,1,3),(2,7,3)

(3,3,2)

3(1,1,3),(2,7,3),(3,0,3)

(2,2,1),(3,1,1),(1,2,2),(3,7,2)

(2,3,3)

2

1

3

2 1

7

Page 43: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round4

Receive Send

1(1,0,1)(2,2,1),(3,1,1)

(3,3,2),(2,3,3)

2(1,2,2),(2,0,2),(3,3,2)

(2,3,3)

3(1,1,3),(2,3,3),(3,0,3)

(3,3,2)

2

1

3

2 1

7

Page 44: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

TowardsDistance-vectorprotocolwithnext-hops(nofailures)

44

• Messages(Y,d,X):ForrootY;FromnodeX;advertisingadistancedtoY

• InitiallyeachswitchXannounces(X,0,X)toitsneighbors

• SwitchZupdatesitsview• Uponreceivingmessage(Y,d,X)fromX,checkY’sid

• IfY’sid<currentroot:setrootdestination=Y

• SwitchZcomputesitsshortestdistancefromtherootdestination

• Ifcurrent_distance_to_Y>d+costoflinktoX:• updatecurrent_distance_to_Y=d+costoflinktoX• updatenext_hop_to_destination=X

• IfrootchangedORshortestdistancetotherootdestinationchanged,sendallneighborsupdatedmessage(Y,d+cost-of-link-to-X,Z)

Page 45: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

GroupExercise:

LetsruntheProtocolonthisexample

(thistimewithnext-hops)

2

1

3

2 1

7

Page 46: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round1

Receive Send Next-hops

1 (1,0,1) [-]

2 (2,0,2) [-]

3 (3,0,3) [-]

2

1

3

2 1

7

Page 47: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round2

Receive Send Next-hops

1(1,0,1)

(2,0,2),(3,0,3)

(2,2,1),(3,1,1)

[-,2,3]

2(2,0,2)

(1,0,1),(3,0,3)

(1,2,2),(3,7,2)

[1,-,3]

3(3,0,3)

(1,0,1),(2,0,2)

(1,1,3),(2,7,3)

[1,2,-]

2

1

3

2 1

7

Page 48: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round3

Receive Send Next-hops

1(1,0,1)(2,2,1),(3,1,1)

(1,2,2),(3,7,2),(1,1,3),(2,7,3)

[-,2,3]

2(1,2,2),(2,0,2),(3,7,2)

(2,2,1),(3,1,1),(1,1,3),(2,7,3)

(3,3,2)[1,-,1]

3(1,1,3),(2,7,3),(3,0,3)

(2,2,1),(3,1,1),(1,2,2),(3,7,2)

(2,3,3)[1,1,-]

2

1

3

2 1

7

Page 49: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round4

Receive Send Next-hops

1(1,0,1)(2,2,1),(3,1,1)

(3,3,2),(2,3,3)

[-,2,3]

2(1,2,2),(2,0,2),(3,3,2)

(2,3,3)[1,-,1]

3(1,1,3),(2,3,3),(3,0,3)

(3,3,2)[1,1,-]

2

1

3

2 1

7

Page 50: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

DistanceVectorProtocol

50

• Messages(Y,d,X):ForrootY;FromnodeX;advertisingadistancedtoY

• InitiallyeachswitchXinitializesitsroutingtableto(X,0,-)anddistanceinfinitytoallotherdestinations

• Switchesannouncetheirentiredistancevectors(routingtablew/0nexthops)

• Uponreceivingaroutingtablefromanode(sayX),eachnodedoes:

• ForeachdestinationYintheannouncement(distance(X,Y)=d):

• Ifcurrent_distance_to_Y>d+costoflinktoX:• updatecurrent_distance_to_Y=d+costoflinktoX• updatenext_hop_to_destination=X

• Ifshortestdistancetoanydestinationchanged,sendallneighborsyourdistancevectors

Page 51: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Protocol:• Exchangingthatroutinginformationwithneighbors

• Whatandwhenforexchanges

• RIPisaprotocolthatimplementsDV(IETFRFC2080)

• Algorithm:

• Howtousetheinformationfromyourneighborstoupdateyour

ownroutingtables?

TwoAspectstoThisApproach

Page 52: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

GroupExercise:

LetsruntheProtocolagainonthisexample

(thistimewithdistancevectors)

2

1

3

2 1

7

Page 53: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round1

2

1

3

2 1

7

distance next-hop1 0 -2 infinity3 infinity

distance next-hop1 infinity2 0 -3 infinity

distance next-hop1 infinity2 infinity3 0 -

Page 54: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round2

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 7 3

distance next-hop1 1 12 7 23 0 -

Page 55: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round3

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 3 1

distance next-hop1 1 12 3 13 0 -

Page 56: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Round4

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 3 1

distance next-hop1 1 12 3 13 0 -

Page 57: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Algorithm:

• NodesuseBellman-Fordtocomputedistances

• Protocol• Nodesexchangedistancevectors• Updatetheirownroutingtables• Andexchangeagain…• Details:whentoexchange,whattoexchange,etc….

FromAlgorithmtoProtocol

Page 58: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

• Whendoyousendmessages?

• Whenanyofyourdistancesd(u,v)change

• Periodically,toensureconsistencybetweenneighbors

• Whatinformationdoyousend?

• Couldsendentirevector• Orjustupdatedentries

• Doyousendeveryonethesameinformation?

• Nextlecture

OtherAspectsofProtocol

Page 59: lecture10-SPT-routing-fundamentals...Announcements • Quiz 1 solutions and grades posted • Average — 26.7/30; median — 30/30; std. dev. — 6.1 • Live coding session on the

Nextlecture!HappyFebruaryBreak!!