Routing Outline Algorithms Scalability Spring2002 CS461 1 - - PDF document

routing
SMART_READER_LITE
LIVE PREVIEW

Routing Outline Algorithms Scalability Spring2002 CS461 1 - - PDF document

Routing Outline Algorithms Scalability Spring2002 CS461 1 Overview Forwardingvs Routing forwarding:toselectanoutputportbasedon destinationaddressandroutingtable


slide-1
SLIDE 1

1

Spring2002 CS461 1

Routing

Outline

Algorithms Scalability

Spring2002 CS461 2

Overview

  • Forwardingvs Routing

– forwarding:toselectanoutputportbasedon destinationaddressandroutingtable – routing:processbywhichroutingtableisbuilt

  • NetworkasaGraph
  • Problem:Findlowestcostpathbetweentwonodes
  • Factors

– static:topology – dynamic:load

4 3 6 2 1 9 1 1 D A F E B C Spring2002 CS461 3

DistanceVector

  • Eachnodemaintainsasetoftriples

– (Destination,Cost,NextHop)

  • Directlyconnectedneighborsexchangeupdates

– periodically(ontheorderofseveralseconds) – whenevertablechanges(calledtriggered update)

  • Eachupdateisalistofpairs:

– (Destination,Cost)

  • Updatelocaltableifreceivea“better”route

– smallercost – camefromnext-hop

  • Refreshexistingroutes;deleteiftheytimeout
slide-2
SLIDE 2

2

Spring2002 CS461 4

Example

DestinationCost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A

D G A F E B C Spring2002 CS461 5

RoutingLoops

  • Example1

– FdetectsthatlinktoGhasfailed – FsetsdistancetoGtoinfinityandsendsupdatetoA – AsetsdistancetoGtoinfinitysinceitusesFtoreachG – AreceivesperiodicupdatefromCwith2-hoppathtoG – AsetsdistancetoGto3andsendsupdatetoF – FdecidesitcanreachGin4hopsviaA

  • Example2

– linkfromAtoEfails – AadvertisesdistanceofinfinitytoE – BandCadvertiseadistanceof2toE – BdecidesitcanreachEin3hops;advertisesthistoA – AdecidesitcanreadEin4hops;advertisesthistoC – CdecidesthatitcanreachEin5hops…

Spring2002 CS461 6

Loop-Breaking Heuristics

  • Setinfinityto16
  • Splithorizon
  • Splithorizonwithpoisonreverse
slide-3
SLIDE 3

3

Spring2002 CS461 7

LinkState

  • Strategy

– sendtoallnodes(notjustneighbors) informationaboutdirectlyconnectedlinks(not entireroutingtable)

  • LinkStatePacket(LSP)

– idofthenodethatcreatedtheLSP – costoflinktoeachdirectlyconnectedneighbor – sequencenumber(SEQNO) – time-to-live(TTL)forthispacket

Spring2002 CS461 8

LinkState(cont)

  • Reliableflooding

– storemostrecentLSPfromeachnode – forwardLSPtoallnodesbutonethatsentit – generatenewLSPperiodically

  • incrementSEQNO

– startSEQNOat0whenreboot – decrementTTLofeachstoredLSP

  • discardwhenTTL=0

Spring2002 CS461 9

RouteCalculation

  • Dijkstra’sshortestpathalgorithm
  • Let

– N denotessetofnodesinthegraph – l(i,j)denotesnon-negativecost(weight)foredge(i,j) – s denotesthisnode – M denotesthesetofnodesincorporatedsofar – C(n)denotescostofthepathfroms tonoden

M={s} foreachn inN - {s} C(n)=l(s,n) while(N !=M) M =Munion{w}suchthatC(w)istheminimumfor allw in(N- M) foreachn in(N- M) C(n)=MIN(C(n),C (w)+l(w,n))

slide-4
SLIDE 4

4

Spring2002 CS461 10

Metrics

  • OriginalARPANETmetric

– measuresnumberofpacketsqueuedoneachlink – took neitherlatencyorbandwidthintoconsideration

  • NewARPANETmetric

– stampeachincomingpacketwithitsarrivaltime(AT) – recorddeparturetime(DT) – whenlink-levelACKarrives,compute

Delay=(DT- AT)+Transmit+Latency

– iftimeout,resetDT todeparturetimeforretransmission – linkcost=averagedelayoversometimeperiod

  • FineTuning

– compresseddynamicrange – replacedDelay withlinkutilization

Spring2002 CS461 11

HowtoMakeRoutingScale

  • FlatversusHierarchicalAddresses
  • InefficientuseofHierarchicalAddressSpace

– classCwith2hosts(2/255=0.78%efficient) – classBwith256hosts(256/65535=0.39%efficient)

  • StillTooManyNetworks

– routingtablesdonotscale – routepropagationprotocolsdonotscale

Spring2002 CS461 12

InternetStructure

RecentPast

NSFNETbackbone Stanford BARRNET regional Berkeley

P

ARC NCAR UA UNM Westnet regional UNL KU ISU MidNet regional

slide-5
SLIDE 5

5

Spring2002 CS461 13

InternetStructure

Today

Backboneserviceprovider Peering point Peering point Largecorporation Largecorporation Small corporation “Consumer ”ISP “Consumer”ISP “ Consumer”ISP Spring2002 CS461 14

Subnetting

  • Addanotherleveltoaddress/routinghierarchy:subnet
  • Subnetmasksdefinevariablepartitionofhostpart
  • Subnetsvisibleonlywithinsite

Networknumber Hostnumber ClassBaddress Subnetmask(255.255.255.0) Subnettedaddress 111111111111111111111111 00000000 Networknumber HostID SubnetID

Spring2002 CS461 15

SubnetExample

ForwardingtableatrouterR1

SubnetNumberSubnetMaskNextHop 128.96.34.0255.255.255.128interface0 128.96.34.128255.255.255.128interface1 128.96.33.0255.255.255.0R2

Subnetmask:255.255.255.128 Subnetnumber:128.96.34.0 128.96.34.15 128.96.34.1 H1 R1 128.96.34.130 Subnetmask:255.255.255.128 Subnetnumber:128.96.34.128 128.96.34.129 128.96.34.139 R2 H2 128.96.33.1 128.96.33.14 Subnetmask:255.255.255.0 Subnetnumber:128.96.33.0 H3

slide-6
SLIDE 6

6

Spring2002 CS461 16

ForwardingAlgorithm

D=destinationIPaddress foreachentry(SubnetNum,SubnetMask,NextHop) D1=SubnetMask&D ifD1=SubnetNum ifNextHopisaninterface deliverdatagramdirectlytoD else deliverdatagramtoNextHop

  • Useadefaultrouterifnothingmatches
  • Notnecessaryforall1sinsubnetmasktobecontiguous
  • Canputmultiplesubnetsononephysicalnetwork
  • SubnetsnotvisiblefromtherestoftheInternet

Spring2002 CS461 17

Supernetting

  • Assignblockofcontiguousnetworknumbersto

nearbynetworks

  • CalledCIDR:ClasslessInter-DomainRouting
  • Representblockswithasinglepair

(first_network_address,count)

  • Restrictblocksizestopowersof2
  • Useabitmask(CIDRmask)toidentifyblocksize
  • AllroutersmustunderstandCIDRaddressing

Spring2002 CS461 18

RoutePropagation

  • Knowasmarterrouter

– hostsknowlocalrouter – localroutersknowsiterouters – siteroutersknowcorerouter – coreroutersknoweverything

  • AutonomousSystem(AS)

– correspondstoanadministrativedomain – examples:University,company,backbonenetwork – assigneachASa16-bitnumber

  • Two-levelroutepropagationhierarchy

– interiorgatewayprotocol(eachASselectsitsown) – exteriorgatewayprotocol(Internet-widestandard)

slide-7
SLIDE 7

7

Spring2002 CS461 19

PopularInteriorGatewayProtocols

  • RIP:RouteInformationProtocol

– developedforXNS – distributedwithUnix – distance-vectoralgorithm – basedonhop-count

  • OSPF:OpenShortestPathFirst

– recentInternetstandard – useslink-statealgorithm – supportsloadbalancing – supportsauthentication

Spring2002 CS461 20

EGP:ExteriorGatewayProtocol

  • Overview

– designedfortree-structuredInternet – concernedwith reachability,notoptimalroutes

  • Protocolmessages

– neighboracquisition:onerouterrequeststhatanother beitspeer;peersexchangereachabilityinformation – neighborreachability:onerouterperiodicallytestsif theanotherisstillreachable;exchangeHELLO/ACK messages;usesak-out-of-nrule – routingupdates:peersperiodicallyexchangetheir routingtables(distance-vector)

Spring2002 CS461 21

BGP-4:BorderGatewayProtocol

  • ASTypes

– stubAS:hasasingleconnectiontooneotherAS

  • carrieslocaltrafficonly

– multihomed AS:hasconnectionstomorethanoneAS

  • refusestocarrytransittraffic

– transitAS:hasconnectionstomorethanoneAS

  • carriesbothtransitandlocaltraffic
  • EachAShas:

– oneormoreborderrouters – oneBGPspeakerthatadvertises:

  • localnetworks
  • otherreachablenetworks(transitASonly)
  • givespath information
slide-8
SLIDE 8

8

Spring2002 CS461 22

BGPExample

  • SpeakerforAS2advertisesreachabilitytoPandQ

– network128.96,192.4.153,192.4.32,and192.4.3,canbereached directlyfromAS2

  • Speakerforbackboneadvertises

– networks128.96,192.4.153,192.4.32,and192.4.3canbereached alongthepath(AS1,AS2).

  • Speakercancancelpreviouslyadvertisedpaths

Backbonenetwork (AS1) RegionalproviderA (AS2) RegionalproviderB (AS3) CustomerP (AS4) CustomerQ (AS5) CustomerR (AS6) CustomerS (AS7) 128.96 192.4.153 192.4.32 192.4.3 192.12.69 192.4.54 192.4.23

Spring2002 CS461 23

IPVersion6

  • Features

– 128-bitaddresses(classless) – multicast – real-timeservice – authenticationandsecurity – autoconfiguration – end-to-endfragmentation – protocolextensions

  • Header

– 40-byte“base”header – extensionheaders(fixedorder,mostlyfixedlength)

  • fragmentation
  • sourcerouting
  • authenticationandsecurity
  • otheroptions