ip packet switching - cs. of today’s lecture • connecvity – links and nodes – circuit...
Post on 02-Mar-2018
215 views
Embed Size (px)
TRANSCRIPT
COS461:ComputerNetworksSpring2008(MW1:302:50inCOS105)
MikeFreedman
hEp://www.cs.princeton.edu/courses/archive/spring09/cos461/
IPPacketSwitching
GoalsofTodaysLecture ConnecTvity
Linksandnodes Circuitswitching Packetswitching
IPservicemodel Besteffortpacketdelivery IPastheInternetsnarrowwaistDesignphilosophyofIP
IPpacketstructure FieldsintheIPheader TracerouteusingTTLfield Sourceaddressspoofing
2
SimpleNetwork:NodesandaLink
Node:computer Endhost:generalpurposecomputer,cellphone,PDANetworknode:switchorrouter
Link:physicalmediumconnecTngnodes Twistedpair:thewirethatconnectstotelephones Coaxialcable:thewirethatconnectstoTVsetsOpTcalfiber:highbandwidthlongdistancelinks Space:propagaTonofradiowaves,microwaves,
3
Node Link Node
NetworkComponents
4
Fibers
Coaxial Cable
Links Interfaces Switches/routers
Ethernet card
Wireless card
Large router
Telephone switch
Links:DelayandBandwidth Delay
LatencyforpropagaTngdataalongthelinkCorrespondstothelengthofthelinkTypicallymeasuredinseconds
BandwidthAmountofdatasent(orreceived)perunitTmeCorrespondstothewidthofthelinkTypicallymeasuredinbitspersecond
5
bandwidth
delay
delay x bandwidth
ConnecTngMoreThanTwoHosts MulTaccesslink:Ethernet,wireless
Singlephysicallink,sharedbymulTplenodesLimitaTonsondistanceandnumberofnodes
Pointtopointlinks:fiberopTccableOnlytwonodes(separatelinkperpairofnodes)LimitaTonsonthenumberofadapterspernode
6
multi-access link point-to-point links
BeyondDirectlyConnectedNetworks
SwitchednetworkEndhostsattheedgeNetworknodesthatswitchtrafficLinksbetweenthenodes
MulTplexingManyendhostscommunicateoverthenetworkTrafficsharesaccesstothesamelinks
7
CircuitSwitching(e.g.,PhoneNetwork)
SourceestablishesconnecTontodesTnaTonNodealongthepathstoreconnecToninfoNodesmayreserveresourcesfortheconnecTon
SourcesendsdataovertheconnecTonNodesTnaTonaddress,sincenodesknowpath
SourcetearsdownconnecTonwhendone
8
CircuitSwitchingWithHumanOperator
9
CircuitSwitching:MulTplexingaLink
TimedivisionEachcircuitallocatedcertainTmeslots
FrequencydivisionEachcircuitallocatedcertainfrequencies
10
time frequency
time
AdvantagesofCircuitSwitching Guaranteedbandwidth
PredictablecommunicaTonperformanceNotbesteffortdeliverywithnorealguarantees
SimpleabstracTon ReliablecommunicaTonchannelbetweenhostsNoworriesaboutlostoroutoforderpackets
Simpleforwarding ForwardingbasedonTmeslotorfrequencyNoneedtoinspectapacketheader
Lowperpacketoverhead ForwardingbasedonTmeslotorfrequencyNoIP(andTCP/UDP)headeroneachpacket
11
DisadvantagesofCircuitSwitching Wastedbandwidth
BurstytrafficleadstoidleconnduringsilentperiodUnabletoachievegainsfromstaTsTcalmulTplexing
BlockedconnecTons ConnecTonrefusedwhenresourcesarenotsufficientUnabletoofferokayservicetoeverybody
ConnecTonsetupdelayNocommunicaTonunTltheconnecTonissetupUnabletoavoidextralatencyforsmalldatatransfers
NetworkstateNetworknodesmuststoreperconnecToninformaTonUnabletoavoidperconnecTonstorageandstate
12
PacketSwitching(e.g.,Internet) Datatrafficdividedintopackets
Eachpacketcontainsaheader(withaddress) Packetstravelseparatelythroughnetwork
PacketforwardingbasedontheheaderNetworknodesmaystorepacketstemporarily
DesTnaTonreconstructsthemessage
13
PacketSwitching:StaTsTcalMulTplexing
14
Packets
IPService:BestEffortPacketDelivery
15
PacketswitchingDividemessagesintoasequenceofpacketsHeaderswithsourceanddesTnaTonaddress
BesteffortdeliveryPacketsmaybelostPacketsmaybecorruptedPacketsmaybedeliveredoutoforder
source destination
IP network
IPServiceModel:WhyPackets? Datatrafficisbursty
LoggingintoremotemachinesExchangingemailmessages
DontwanttowastebandwidthNotrafficexchangedduringidleperiods
BeEertoallowmulTplexingDifferenttransfersshareaccesstosamelinks
PacketscanbedeliveredbymostanythingRFC1149:IPDatagramsoverAvianCarriers
sTll,packetswitchingcanbeinefficientExtraheaderbitsoneverypacket
16
IPServiceModel:WhyBestEffort? IPmeansneverhavingtosayyouresorry
DontneedtoreservebandwidthandmemoryDontneedtodoerrordetecTon&correcTonDontneedtorememberfromonepackettonext
EasiertosurvivefailuresTransientdisrupTonsareokayduringfailover
but,applicaTonsdowantefficient,accuratetransferofdatainorder,inaTmelyfashion
17
IPService:BestEffortisEnough NoerrordetecTonorcorrecTon
Higherlevelprotocolcanprovideerrorchecking Successivepacketsmaynotfollowthesamepath
NotaproblemaslongaspacketsreachthedesTnaTon Packetscanbedeliveredoutoforder
Receivercanputpacketsbackinorder(ifnecessary) Packetsmaybelostorarbitrarilydelayed
Sendercansendthepacketsagain(ifdesired) NonetworkcongesToncontrol(beyonddrop)
Sendercanslowdowninresponsetolossordelay18
LayeringintheIPProtocols
19
Internet Protocol
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
Telnet HTTP
SONET ATM Ethernet
RTP DNS FTP
History:WhyIPPackets? IPproposedintheearly1970s
DefenseAdvancedResearchProjectAgency(DARPA) Goal:connectexisTngnetworks
TodevelopaneffecTvetechniqueformulTplexeduTlizaTonofexisTnginterconnectednetworks
E.g.,connectpacketradionetworkstotheARPAnet MoTvaTngapplicaTons
Remotelogintoservermachines Inherentlyburstytrafficwithlongsilentperiods
PriorARPAnetexperiencewithpacketswitching PreviousDARPAprojectDemonstratedstoreandforwardpacketswitching
20
OtherMainDrivingGoals(InOrder)
CommunicaTonshouldconTnuedespitefailures SurviveequipmentfailureorphysicalaEack TrafficbetweentwohostsconTnueonanotherpath
SupportmulTpletypesofcommunicaTonservicesDifferingrequirementsforspeed,latency,&reliability BidirecTonalreliabledeliveryvs.messageservice
Accommodateavarietyofnetworks BothmilitaryandcommercialfaciliTesMinimizeassumpTonsabouttheunderlyingnetwork
21
OtherDrivingGoals,SomewhatMet Permitdistributedmanagementofresources
NodesmanagedbydifferentinsTtuTonsthoughthisissTllratherchallenging
CosteffecTveness StaTsTcalmulTplexingthroughpacketswitchingthoughpacketheadersandretransmissionswasteful
EaseofaEachingnewhosts StandardimplementaTonsofendhostprotocolsthoughsTllneedafairamountofendhostsolware
AccountabilityforuseofresourcesMonitoringfuncTonsinthenodesthoughthisissTllfairlylimitedandimmature
22
IPPacketStructure
4-bit Version
4-bit Header Length
8-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
IPHeader:Version,Length,ToS Versionnumber(4bits)
IndicatestheversionoftheIPprotocolNecessarytoknowwhatotherfieldstoexpect Typically4(forIPv4),andsomeTmes6(forIPv6)
Headerlength(4bits)Numberof32bitwordsintheheader Typically5(fora20byteIPv4header) CanbemorewhenIPopTonsareused
TypeofService(8bits)Allowpacketstobetreateddifferentlybasedonneeds E.g.,lowdelayforaudio,highb/wforbulktransfer
24
IPHeader:Length,Fragments,TTL Totallength(16bits)
NumberofbytesinthepacketMaximumsizeis63,535bytes(2161)thoughunderlyinglinksmayimposeharderlimits
FragmentaToninformaTon(32bits) PacketidenTfier,flags,andfragmentoffset SupportsdividingalargeIPpacketintofragmentsincasealinkcannothandlealargeIPpacketsowhydowetypicallysendmaxMTUpackets?
TimeToLive(8bits)UsedtoidenTfypacketsstuckinforwardingloopsandeventuallydiscardthemfromthenetwork
25
IPHeader:MoreonTimetoLive(TTL)
PotenTalrobustnessproblem Forwardingloopscancausepacketstocycleforever Confusingifthepacketarrivesmuchlater
Timetolivefieldinpacketheader TTLfielddecrementedbyeachrouteronthepath PacketisdiscardedwhenTTLfieldreaches0andTmeexceededmessageissenttothesource
26
IPHeader:UseofTTLinTraceroute TimeToLivefieldinIPpacketheader
SourcesendsapacketwithaTTLofnEachrouteralongthepathdecrementstheTTLTTLexceededsentwhenTTLreaches0
TraceroutetoolexploitsthisTTLbehavior
27
source destination
TTL=1 Time
exceeded
TTL=2
SendpacketswithTTL=1,2,andrecordsourceof;meexceededmessage
ExampleTraceroute:BerkeleytoCNN
28
1 169.229.62.1
2 169.229.59.225
3 128.32.255.169
4 128.32.0.249
5 128.32.0.66
6 209.247.159.109
7 *
8 64.159.1.46
9 209.247.9.170
10 66.185.138.33
11 *
12 66.185.136.17
13 64.236.16.52
Hop number, IP address, DNS name
inr-daedalus-0.CS.Berkeley.EDU
soda-cr-1-1-soda-br-6-2
vlan242.inr-202-doecev.Berkeley.EDU
gigE6-0-0.inr-666-doecev.Berkeley.EDU
qsv-juniper--ucb-gw.calren2.net
POS1-0.hsipaccess1.SanJose1.Level3.net
?
?
pos8-0.hsa2.Atlanta2.Level3.net
pop2-atm-P0-2.atdn.net
?
pop1-atl-P4-0.atdn.net
www4.cnn.com
No response from router
No name resolution
TryRunningTracerouteYourself OnUNIXmachine
TracerouteE.g.,traceroutecnn.comortraceroute12.1.1.1
OnWindowsmachineTrace