lecture16-ip-switching...what do we know so far [1] … • network performance metrics •...

89
Computer Networks: Architecture and Protocols CS4450 Lecture 16 THE Internet Protocol Switch Architecture Rachit Agarwal

Upload: others

Post on 19-Apr-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ComputerNetworks:

ArchitectureandProtocols

CS4450

Lecture16THEInternetProtocolSwitchArchitecture

RachitAgarwal

Page 2: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Announcements

• PrelimonnextThursday

• Willcovereverythingdiscussedinclassandproblemsets

• ProblemSet3solutionsarereleased

• ProblemSet4isout(solutionswillbereleasedThursday)

• Practiceprelimisreleased(solutionswillbereleasedThursday)

• Wewillreleaseourfirstprojectthisweek(notincludedinprelim)

• Recall:notgraded,butwewillprovideallthehelp

• Youmusthavereceivedanemailformid-semesterfeedbackfortheclass

• Pleaseprovidefrankandconstructivefeedback• Recall:IalreadyknowIamanasshole;iteratingitmightnotbeuseful

• Whatyoulike?Wherecouldweimprove?3

Page 3: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Whatdoweknowsofar[1]…

• Networkperformancemetrics

• Transmissiondelay,propagationdelay,queueingdelay,bandwidth

• Sharingnetworks• Circuitswitching,packetswitching,andassociatedtradeoffs• WhyisInternetpacketswitched?

• Architecturalprinciplesanddesigngoals• Layeringprinciple,End-to-endprinciple,Fatesharingprinciple• ManyimportantdesigngoalsfromDavidClark’spaper

• Andmanyimportantmissinggoals

• Addressing• LinklayerMACnames,andscalabilitychallengesattheInternet

• NetworklayerIPaddresses:threerequirements,aggregation,CIDR

4

Page 4: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Whatdoweknowsofar[2]…• LinkLayer

• SharingaBroadcastmedium,associatedchallenges,CSMA/CD

• Linklayeraddressing:MACnames

• WhyFrames?WhySwitchedEthernet?

• TheSpanningTreeProtocol(STP)

• NetworkLayer

• WhyNetworkLayer?WhynotjustuseSTPacrosstheInternet?

• RoutingTables:Acollectionofspanningtrees,oneperdestination

• GeneratingValidRoutingtables(withinadomain):

• Globalview(Link-StateProtocol),andlimitations

• Localview(Distance-vectorProtocol)

• GeneratingValidRoutingtables(acrossdomains):

• BorderGatewayProtocol,Internetstructure,routingpolicies

5

Page 5: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Nextlecture

• Youmaynotrealizethisbut….

• Wehavelearntalotofmaterial!!!!!

• Nextlectureisveryveryvery….• veryveryveryvery….• important

• Pleaseattend

• IwilldiscusshoweverythingwehavecoveredsofarFITSTOGETHER…• …intoanend-to-enddesign

• Youwillfeelawesome—Ipromise!

6

Page 6: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

GoalsforToday’sLecture

• UnderstandIP(theInternetProtocol)

• PacketHeaderasanetwork“interface”

• Understandswitcharchitecture

7

Page 7: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

NetworkLayer

• THEfunctionality:deliveringthedata

• THEprotocol:InternetProtocol(IP)

• Achievesitsfunctionality(deliveringthedata),usingthreeideas:

• Addressing(IPaddressing)

• Routing(usingavarietyofprotocols)

• Packetheaderasaninterface(Encapsulatingdataintopackets)

Page 8: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

InternetProtocol

• THEfunctionality:deliveringthedata

• THEprotocol:InternetProtocol(IP)

• Unifyingprotocol

Page 9: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

WhatisDesigningIP?

• Syntax:formatofpacket

• Nontrivialpart:packet“header”

• Restisopaquepayload(whyopaque?)

• Semantics:meaningofheaderfields

• Requiredprocessing

Opaque PayloadHeader

Page 10: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PacketHeaderasInterface

• Thinkofpacketheaderasinterface

• Onlywayofpassinginformationfrompackettoswitch

• Designinginterfaces:

• Whattaskareyoutryingtoperform?

• Whatinformationdoyouneedtoaccomplishit?

• Headerreflectsinformationneededforbasictasks

Page 11: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

WhatTasksDoWeNeedtoDo?

• Readpacketcorrectly

• Getthepackettothedestination

• Getresponsestothepacketbacktosource

• Carrydata

• Tellhostwhattodowiththepacketoncearrived

• Specifyanyspecialnetworkhandlingofthepacket

• Dealwithproblemsthatarisealongthepath

Page 12: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ReadingPacketCorrectly

• Wheredoestheheaderend?

• Wherethethepacketend?

• Whatprotocolareweusing?

• Whyisthissoimportant?

Page 13: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

GettingtotheDestination

• Providedestinationaddress

• Shouldthisbelocationoridentifier(name)?

• Andwhat’sthedifference?

• Ifahostmovesshoulditsaddresschange?

• Ifnot,howcanyoubuildscalableInternet?

• Ifso,thenwhatgoodisanaddressforidentification?

Page 14: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

GettingResponseBacktoSource

• Sourceaddress

• Necessaryforrouterstorespondtosource

• Whenwouldtheyneedtorespondback?

• Failures!

• Dotheyreallyneedtorespondback?

• Howwouldthesourceknowifthepackethasreachedthe

destination?

Page 15: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

CarryData

• Payload!

Page 16: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Questions?

Page 17: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ListofTasks

• Readpacketcorrectly

• Getthepackettothedestination

• Getresponsestothepacketbacktosource

• Carrydata

• Tellhostwhattodowithpacketoncearrived

• Specifyanyspecialnetworkhandlingofthepacket

• Dealwithproblemsthatarisealongthepath

Page 18: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

TellingDestinationHowtoProcessPacket

• Indicatewhichprotocolsshouldhandlepacket

• Whatlayersshouldthisprotocolbein?

• Whataresomeoptionsforthistoday?

• Howdoesthesourceknowwhattoenterhere?

Page 19: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

SpecialHandling

• Typeofservice,priority,etc.

• Options:discusslater

Page 20: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

DealingWithProblems

• Ispacketcaughtinloop?

• TTL

• Headercorrupted:

• DetectwithChecksum

• Whataboutpayloadchecksum?

• Packettoolarge?

• Dealwithfragmentation

• Splitpacketapart

• Keeptrackofhowtoputtogether

Page 21: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

AreWeMissingAnything?

• Readpacketcorrectly

• Getthepackettothedestination

• Getresponsestothepacketbacktosource

• Carrydata

• Tellhostwhattodowithpacketoncearrived

• Specifyanyspecialnetworkhandlingofthepacket

• Dealwithproblemsthatarisealongthepath

Page 22: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

FromSemanticstoSyntax

• Thepastfewslidesdiscussedtheinformationtheheadermustprovide

• Willnowshowthesyntax(layout)ofIPv4header,anddiscussthe

semanticsinmoredetail

Page 23: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPPacketStructure

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 24: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

20BytesofStandardHeader,thenOptions

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 25: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

NextSetofSlides

• Mappingbetweentasksandheaderfields

• Eachofthesefieldsisdevotedtoatask

• Let’sfindoutwhichonesandwhy…

Page 26: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

GoThroughTasksOne-by-One

• Readpacketcorrectly

• Getthepackettothedestination

• Getresponsestothepacketbacktosource

• Carrydata

• Tellhostwhattodowithpacketoncearrived

• Specifyanyspecialnetworkhandlingofthepacket

• Dealwithproblemsthatarisealongthepath

Page 27: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ReadPacketCorrectly

• Versionnumber(4bits)

• IndicatestheversionoftheIPprotocol

• Necessarytoknowwhatotherfieldstoexpect

• Typically“4”(forIPv4),andsometimes“6”(forIPv6)

• Headerlength(4bits)

• Numberof32-bitwordsintheheader

• Typically“5”(fora20-byteIPv4header)

• CanbemorewhenIPoptionsareused

• Totallength(16bits)

• Numberofbytesinthepacket

• Maximumsizeis65,535bytes(2^16-1)

• …thoughunderlyinglinksmayimposesmallerlimits

Page 28: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

FieldsforReadingPacketCorrectly

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 29: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

GettingPackettoDestinationandBack

• TwoIPaddresses

• SourceIPaddress(32bits)

• DestinationIPaddress(32bits)

• DestinationAddress

• Uniquelocatorforthereceivinghost

• Allowseachnodetomakeforwardingdecisions

• SourceAddress

• Uniquelocatorforthesendinghost

• Recipientcandecidewhethertoacceptpacket

• Enablesrecipienttosendareplybacktothesource

Page 30: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

FieldsforReadingPacketCorrectly

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 31: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Questions?

Page 32: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ListofTasks

• Readpacketcorrectly

• Getthepackettothedestination

• Getresponsestothepacketbacktosource

• Carrydata

• Tellhostwhattodowithpacketoncearrived

• Specifyanyspecialnetworkhandlingofthepacket

• Dealwithproblemsthatarisealongthepath

Page 33: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

TellingHostHowtoHandlePacket

• Protocol(8bits)

• Identifiesthehigherlevelprotocol

• Importantfordemultiplexingatreceivinghost

• Mostcommonexamples

• E.g.,“6”fortheTransmissionControlProtocol(TCP)

• E.g.,“17”fortheUserDatagramProtocol

IP HeaderTCP Header

IP HeaderTCP Header

Protocol = 6 Protocol = 17

Page 34: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

FieldsforReadingPacketCorrectly

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 35: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

SpecialHandling

• Type-of-Service(8-bits)

• Allowpacketstobetreateddifferentlybasedonneeds

• E.g.,lowdelayforaudio,highbandwidthforbulktransfer

• Hasbeenredefinedseveraltimes,nogeneraluse

• Options

• Abilitytospecifyotherfunctionality

• Extensibleformat

Page 36: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ExamplesofOptions

• RecordRoute

• StrictSourceRoute

• LooseSourceRoute

• Timestamp

• Traceroute

• RouterAlert

• …

Page 37: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PotentialProblems

• HeaderCorrupted:Checksum

• Loop:TTL

• Packettoolarge:Fragmentation

Page 38: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PreventingLoops

• Forwardingloopscausepacketstocycleforever

• Astheseaccumulate,eventuallyconsumeallcapacity

• Time-to-live(TTL)Field(8-bits)

• Decrementedateachhop,packetdiscardedifreaches0

• …and“timeexceeded”messageissenttothesource

• Using“ICMP”controlmessage;basisfortraceroute

Page 39: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

TTLField

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 40: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

HeaderCorruption

• Checksum(16bits)

• Particularformofchecksumoverpacketheader

• Ifnotcorrect,routerdiscardspackets

• Soitdoesn’tactinbogusinformation

• Checksumrecalculatedateveryrouter

• Why?

• WhyincludeTTL?

• Whyonlyheader?

Page 41: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ChecksumField

4-bit Version4-bit Header

Length8-bit Type of

Service (TOS)

16-bit Total Length (Bytes)

16-bit Identification 3-bit Flags 13-bit Fragment Offset

8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum

32-bit Source IP Address

32-bit Destination IP Address

Options (if any)

Payload

Page 42: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PacketHeaderasaninterface

• Uselesstolearntheheaderformatbyheart

• Ifyourememberthetasksthatneedtobeperformed…

• Understandingwhyheaderformatiswhatitis…

• Ingeneral:ifyouunderstandtheproblem,solutioniseasy

• Astheproblemevolves,youwillknowwheretolookforasolution

• TransitionfromIPv4toIPv6

• Graduallyhappening…

• Ifyouwanttolearnabit,seebackupslides

Page 43: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Switch/RouterArchitecture

Page 44: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPRoutersandSwitches(usedinterchangeablytoday)

• CorebuildingblockofInternetinfrastructure

• $120B+industry

• Vendors:Cisco,Huawei,Juniper,Alcatel-Lucent(accountfor>90%)

Page 45: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Recap:RoutersForwardPackets

Cornell

Harvard

MIT

Switch#1

Switch#2

Switch#3

Page 46: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

RouterDefinitions

Rbits/s

• N=No.Ofexternalrouterports

• R=bandwidth(“linerate”)ofaport

• Routercapacity=NxR

12

3

45

N-1

N

Page 47: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

AT&T BBN

MIT

Cornell

core

core

edge/border (ISP)

edge/border (enterprise)

home, small business

NetworksandRouters

Page 48: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ExamplesofRouters(core)

• Core:CiscoCRS

• R=10/40/100Gbps

• NR=922Tbps

• Netflix:0.7GB/hr(1.5Mb/s)

• ~600millionconcurrentNetflixusers

• Edge(ISP):CiscoASR• R=1/10/40Gbps• NR=120Gbps

• Edge(enterprise):Cisco3945E• R=10/100/1000Mbps

• NR<10Gbps

Page 49: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

1

2

N

1

2

N

Linecards (input)

Interconnect(Switching)

Fabric

Route/Control Processor

Linecards (output)

Processespackets ontheirwayin

Processespackets beforetheyleave

Transferspacketsfrominputto outputports

InputandOutputforthesameportareonone

physicallinecard

What’sInsideaRouter?

Page 50: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

1

2

N

1

2

N

Linecards (input)

Interconnect(Switching)

Fabric

Route/Control Processor

Linecards (output)

(1) Implement IGP and BGP protocols;

compute routing tables(2) Push forwarding

tables to the line cards

What’sInsideaRouter?

Page 51: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

1

2

N

1

2

N

Linecards (input)

InterconnectFabric

Route/Control Processor

Linecards (output)

Constitutes the data plane

Constitutes the control plane

What’sInsideaRouter?

Page 52: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Receiveincomingpackets(physicallayerstuff)

● UpdatetheIPheader● TTL,Checksum(maybesomeotherfields)

● LookuptheoutputportforthedestinationIPaddress

● Queuethepacketattheswitchfabric

InputLineCards:Tasks

Page 53: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● 100Bpackets@40Gbps=>packetevery20nanosecs!

● Typicallyimplementedwithspecializedhardware

● ASICs,specialized“networkprocessors”

54

Challenge:Speed!

Page 54: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Uponreceivingapacket

● InspectthedestinationIPaddressintheheader

● Indexintotherouting/forwardingtable

● Ifnomatch,selectthedefaultroute● Forwardpacketoutappropriateinterface

● Defaultroute● Configuredtocovercaseswherenomatches

● Allowssmalltablesatedge(w/oroutingalgorithms)

● ifitisn’tonmysubnet,sendittomyISP

55

LookinguptheOutputPort

Page 55: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Recall:Forscalability,addressesareaggregated

● LongestPrefixmatch

● Findtheentrywithmatching“longestprefix”withdestinationaddress

ScalingtheLookup

……

3 1128.16.120.xxx

1

2128.16.120.111

128.82.100.101

2128.82.xxx.xxx

128.82.100.xxx

Page 56: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Incomingpacketdestination:201.143.7.0

57

Prefix Port

201.143.0.0/22 Port1

201.143.4.0.0/24 Port2

201.143.5.0.0/24 Port3

201.143.6.0/23 Port4

FindingaMatch

Page 57: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

58

11001001 10001111 00000111 11010010

FindingaMatch:CoverttoBinary

● Incomingpacketdestination:201.143.7.0

11001001 10001111 000000-- --------

11001001 10001111 00000100 --------

11001001 10001111 00000101 --------

11001001 10001111 0000011- --------

RougngTable201.143.0.0/22

201.143.4.0/24

201.143.5.0/24

201.143.6.0/23

Page 58: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

59

11001001 10001111 00000111 11010010

FindingaMatch:CoverttoBinary

● Incomingpacketdestination:201.143.7.0

11001001 10001111 000000-- --------

11001001 10001111 00000100 --------

11001001 10001111 00000101 --------

11001001 10001111 0000011- --------

RougngTable201.143.0.0/22

201.143.4.0/24

201.143.5.0/24

201.143.6.0/23

Page 59: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

60

11001001 10001111 00000111 11010010

FindingaMatch:CoverttoBinary

● Incomingpacketdestination:201.143.7.0

11001001 10001111 000000-- --------

11001001 10001111 00000100 --------

11001001 10001111 00000101 --------

11001001 10001111 0000011- --------

RougngTable201.143.0.0/22

201.143.4.0/24

201.143.5.0/24

201.143.6.0/23

Page 60: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

61

11001001 10001111 00000111 11010010

LongestPrefixMatch

● Incomingpacketdestination:201.143.7.0

11001001 10001111 000000 - - - - - - - - - -

11001001 10001111 00000100 - - - - - - - -

11001001 10001111 00000101 - - - - - - - -

11001001 10001111 0000011- - - - - - - - -

RougngTable201.143.0.0/22

201.143.4.0/24

201.143.5.0/24

201.143.6.0/23

Checkanaddressagainstalldesgnagonprefixesandselecttheprefixitmatcheswithonthemostbits

Page 61: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Testingeachentrytofindamatchscalespoorly

● Roughly(numberofentries)×(numberofbits)

● Mustleveragetreestructureofbinarystrings

● Setuptree-likedatastructure

● CalledaTRIE● Wewillbrieflydiscussit;moredetailsintext

● Incaseyouareinterested….

62

FindingtheMatchEfficiently

Page 62: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

● Justfocusingonthebitswherealltheactionis….

● 0**➔ Port1

● 100➔ Port2

● 101➔ Port3

● 11*➔ Port4

63

ConsiderFour3-BitPrefixes

Page 63: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

64

00*

000 001

0 1 01*

010 011

0 111*

110 111

0 110*

100 101

0 1

0**0 1

1**0 1

***0 1

TreeStructure

Page 64: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

65

00*

000 001

0 1 01*

010 011

0 111*

110 111

0 110*

100 101

0 1

0**0 1

1**0 1

***0 1

0** ➔ Port 1 100 ➔ Port 2 101 ➔ Port 3 11* ➔ Port 4

WalkTree:StopatPrefixEntries

Page 65: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

66

00*

000 001

0 1 01*

010 011

0 111*

110 111

0 110*

100 101

0 1

0**0 1

1**0 1

***0 1

P1

P2 P3

P4

0** ➔ Port 1 100 ➔ Port 2 101 ➔ Port 3 11* ➔ Port 4

WalkTree:StopatPrefixEntries

walkingtreestakesO(#bits)

Page 66: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

LongestPrefixMatchinRealRouters

• Realroutersusefarmoreadvanced/complexsolutions

• Butwhatwediscussedisthestartingpoint

• Withmanyheuristicsandoptimizationsthatleveragereal-worldpatterns

• Somedestinationsmorepopularthanothers

• Someportsleadtomoredestinations

• Typicalfixgranularities

Page 67: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Recap:InputLinecards

• Mainchallengeisprocessingspeed

• Butwhatwediscussedisthestartingpoint

• Tasksinvolved

• Updatepacketheader(easy)

• Longestprefixmatchlookupondestinationsaddress(harder)

• Mostlyimplementedwithspecializedhardware

Page 68: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

OutputLinecard

• PacketClassification:mapeachpackettoa“flow”

• Flow(fornow):setofpacketsbetweentwoparticularendpoints

• BufferManagement:decidewhenandwhichpackettodrop

• Scheduler:decidewhenandwhichpackettotransmit

Page 69: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

OutputLinecard

• PacketClassification:mapeachpackettoa“flow”

• Flow(fornow):setofpacketsbetweentwoparticularendpoints

• BufferManagement:decidewhenandwhichpackettodrop

• Scheduler:decidewhenandwhichpackettotransmit

• Usedtoimplementvariousformsofpolicy

• Denyalle-mailtrafficfromISPXtoY(accesscontrol)

• RouteIPtelephonytrafficfromXtoYviaPHY_CIRCUIT(policy)

• Ensurethatnomorethan50MbpsareinjectedfromISP-X(QoS)

Page 70: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

SimplestFIFORouter

• Noclassification

• Droptailbuffermanagement:whenbufferisfulldropincomingpacket

• FirstInFirstOut(FIFO)Scheduling:schedulepacketsinorderofarrival

Page 71: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PacketClassification

• ClassifyanIPpacketbasedonthenumberoffieldsinthepacketheader

• Source/destinationIPaddress(32bits)• Source/destinationTCPportnumber(16bits)

• TypeofService(TOS)byte(8bits)• TypeofProtocol(8bits)

• Ingeneralfieldsarespecifiedbyrange

• Classificationrequiresamulti-dimensionalrangesearch

Page 72: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Scheduler

• Onequeueperflow

• Schedulerdecidesfromwhichqueuetosendapacket

• Goalsofschedulingalgorithm

• Fast!• Dependsonthepolicybeingimplemented(fairness,priority,etc.)

Page 73: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Example:PriorityScheduler

• Packetsinthehighestpriorityqueuearealwaysservedbeforethepacketsinthelowerpriorityqueues

Page 74: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Example:RoundRobinScheduler

• Packetsareservedfromeachqueueinturn

Page 75: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ConnectingInputtoOutput:SwitchFabric

• PriorityScheduler:packetsareservedfromeachqueueinturn

Page 76: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Today’sSwitchFabrics:MiniNetwork!

Page 77: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

What’sHardAbouttheSwitchFabric?

Queueing!

Page 78: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ThirdGenerationRouter:SwitchedInterconnects

Page 79: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

ThirdGenerationRouter:SwitchedInterconnects

Page 80: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

RealityisMoreComplicated

• Commercialhigh-speedroutersuse

• Combinationofinputandoutputqueueing

• Complexmulti-stage“topologies”

• Distributedmulti-stageschedulers(forscalability)

Page 81: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPRoutersRecap

• CorebuildingblockofInternetinfrastructure

• ScalableRouting->LongestPrefixMatching

• Needfastimplementationsfor

• Longestprefixmatching

• Switchfabricscheduling

Page 82: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Thisisitfortoday!

Page 83: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPv6

Page 84: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPv6

• Motivated(prematurely)byaddressexhaustion

• Addressfourtimesasbig

• SteveDeeringfocusedonsimplifyingIP

• Gotridofallfieldsthatwerenotabsolutelynecessary

• “SpringCleaning”forIP

• Resultisanelegant,ifunambitious,protocol

Page 85: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPv4andIPv6HeaderComparison

Version IHLType of Service (TOS)

Total Length

Identification Flags Fragment Offset

Time to Live (TTL) Protocol Header Checksum

Source Address

Destination Address

Options

Version Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

Field name kept from IPv4 to IPv6

Fields not kept in IPv6

Name and position changed in IPv6

New field in IPv6

Page 86: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

SummaryofChanges

• EliminatedFragmentation

• Eliminatedheaderlength

• EliminatedChecksum

• Newoptionsmechanism(nextheader)

• Expandedaddress

• AddedFlowLabel

Page 87: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

IPv4andIPv6HeaderComparison

Version IHLType of Service (TOS)

Total Length

Identification Flags Fragment Offset

Time to Live (TTL) Protocol Header Checksum

Source Address

Destination Address

Options

Version Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

Field name kept from IPv4 to IPv6

Fields not kept in IPv6

Name and position changed in IPv6

New field in IPv6

Page 88: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

PhilosophyofChanges

• Don’tdealwithproblems:leavetoends

• Eliminatedfragmentation

• Eliminatedchecksum

• WhyretainTTL?

• Simplifyhandling

• Newoptionsmechanism(usesnextheaderapproach)

• Eliminatedheaderlength

• Whycouldn’tIPv4dothis?

• Providegeneralflowlabelforpacket

• Nottiedtosemantics

• Providesgreatflexibility

Page 89: lecture16-IP-switching...What do we know so far [1] … • Network performance metrics • Transmission delay, propagation delay, queueing delay, bandwidth • Sharing networks •

Traffic Class

IPv4andIPv6HeaderComparison

IHLType of Service (TOS)

Total Length

Identification Flags Fragment Offset

Time to Live (TTL) Protocol Header Checksum

Source Address

Destination Address

Options

Version Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

To Destination and Back (expanded)

Deal with Problems (greatly reduced)

Read Correctly (reduced)

Special Handling (Similar)

Version