版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1TCP/IPandInternet1InternetArchitecture2TheInternetProtocol3TransportLayerProtocols4InternetRouting2TCP/IPandInternet1InternetArchitecture2TheInternetProtocol3TransportLayerProtocols4InternetRouting3WhyInternetworking?Tobuilda“networkofnetworks”orInternetoperatingovermultiple,coexisting,differentnetworktechnologiesprovidingubiquitousconnectivitythroughIPpackettransferachievinghugeeconomiesofscaleGGGGGGHNet5Net5HNet5Net2HNet5Net3HNet5Net1Net5Net44WhyInternetworking?ToprovideuniversalcommunicationservicesindependentofunderlyingnetworktechnologiesprovidingcommoninterfacetouserapplicationsGGGGGGHNet5Net5HNet5Net2HNet5Net3HNet5Net1Net5Net4ReliableStreamServiceUserDatagramService5WhyInternetworking?TosupportdistributedapplicationsAnyapplicationdesignedtooperatebasedonInternetcommunicationservicesimmediatelyoperatesacrosstheentireInternet
RapiddeploymentofnewapplicationsEmail,Web,Peer-to-peer,game,etc.ApplicationsindependentofnetworktechnologyNewnetworkscanbeintroducedbelowOldnetworktechnologiescanberetired6Internethistory最初的ARPANET網(wǎng)絡(luò)196x,美國軍方為互聯(lián)所屬各軍方網(wǎng)絡(luò),由國防部下屬ARPA(AdvancedResearchProjectAgent)出資贊助大學(xué)開展網(wǎng)絡(luò)互聯(lián)技術(shù)的研究。實驗性網(wǎng)絡(luò)ARPANET。1983年初,美軍將其所有軍事基地的各子網(wǎng)都聯(lián)到了ARPANET上,并全部采用TCP/IP協(xié)議。標(biāo)志著Internet正式誕生。80年代中期的NSFNET20世紀(jì)80年代,美國國家科學(xué)基金會(簡稱NSF)組建了一個從開始就使用TCP/IP協(xié)議的網(wǎng)絡(luò)NSFNET。NSFNET取代ARPANET,于1988年正式成為Internet的主干網(wǎng)。NSFNET采取的是一種層次結(jié)構(gòu),分為主干網(wǎng)、地區(qū)網(wǎng)與校園網(wǎng)。7Internethistory90年代,商業(yè)機(jī)構(gòu)介入InternetInternet問世后,每年加入Internet的計算機(jī)成指數(shù)式增長。MERIT、MCI與IBM三家商業(yè)公司組建了一個非盈利性的公司ANS,在1990年接管NSFNET構(gòu)成了ANSNET。Internet的商業(yè)化,開拓了其在通信、資料檢索、客戶服務(wù)等方面的巨大潛力,導(dǎo)致了Internet新的飛躍,走向全球。下一代互聯(lián)網(wǎng)Internet21996年美國率先發(fā)起下一代高速互聯(lián)網(wǎng)及其關(guān)鍵技術(shù)的研究。有185所大學(xué)和研究機(jī)構(gòu)加盟了Internet2計劃,建設(shè)了一個獨立的高速網(wǎng)絡(luò)試驗床Abilene,并于1999年1月提供服務(wù)。自1998年以來,其他國家和地區(qū)相繼開展下一代高速互聯(lián)網(wǎng)及其關(guān)鍵技術(shù)的研究。2004年3月,我國第二代CERNET2(中國教育和科研計算機(jī)網(wǎng))實現(xiàn)了與國際下一代高速互聯(lián)網(wǎng)Internet2的互聯(lián)。InternetArchitectureTheInternetisacollectionofmanynetworksconnectedtogetherbyabunchofbackbones.ThegluethatholdsthewholeInternettogetheristhenetworklayerprotocol,IP(InternetProtocol).
9InternetProtocolApproachIPpacketstransferinformationacrossInternet
HostAIP→router→router…→router→HostBIPInternetlayerineachrouterdeterminesnexthop(router)NetworkinterfacestransferIPpacketsacrossnetworksRouterInternetLayerNetworkInterfaceTransportLayerInternetLayerNetworkInterfaceTransportLayerInternetLayerNetworkInterfaceHostAHostBNet5Net1Net5Net2Net5Net3RouterInternetLayerNetworkInterfaceRouterInternetLayerNetworkInterfaceNet5Net410InternetProtocolstructureARPRARPHardwareInterfaceICMPIGMPIPTCPUDPUserProcessUserProcessUserProcessUserProcessapplicationtransportnetworklinkBest-effortconnectionlesspackettransferReliablestreamserviceUnreliableUserdatagramservice11EncapsulationTCPHeadercontainssource&destinationportnumbersIPHeadercontainssourceanddestinationIPaddresses;transportprotocoltypeEthernetHeadercontainssource&destinationMACaddresses;networkprotocoltypeHTTPRequestTCPheaderHTTPRequestIPheaderTCPheaderHTTPRequestEthernetheaderIPheaderTCPheaderHTTPRequestFCS12TCP/IPandInternet1TheTCP/IPArchitecture2TheInternetProtocol2.1IPAddressing2.2IPpacketstructureandtransmission3TransportLayerProtocols4InternetRouting13TCP/IPandInternet2TheInternetProtocol2.1IPAddressing2.2IPpacketstructureandtransmission14InternetProtocol(IP)Providesbesteffort,connectionlesspacketdeliverymotivatedbyneedtokeeprouterssimpleandbyadaptingtofailureofnetworkelementspacketsmaybelost,outoforder,orevenduplicatedhigherlayerprotocolsmustdealwiththese,ifnecessaryRFCs791,950,919,922,and2474.IPispartofInternetSTDnumber5,whichalsoincludes:InternetControlMessageProtocol(ICMP),RFC792InternetGroupManagementProtocol(IGMP),RFC111215TCP/IPandInternet2TheInternetProtocol2.1IPAddressing2.2IPpacketstructureandtransmission16InternetNames&AddressesInternetNamesEachhosthasauniquenameIndependentofphysicallocationFacilitatememorizationbyhumansDomainNameOrganizationundersingleadministrativeunitHostNameNamegiventohostcomputerUserNameNameassignedtouserInternetAddressesEachhosthasgloballyuniquelogical32bitIPaddressSeparateaddressforeachphysicalconnectiontoanetworkIPaddresshastwoparts:
netidandhostidnetiduniquenetidfacilitatesroutingDottedDecimalNotation: 4 (intj=jthoctet)
DNSresolvesdomainnametoIPaddress17PhysicalAddressesLANs(andothernetworks)assignphysicaladdressestothephysicalattachmenttothenetworkThenetworkusesitsownaddresstotransferpacketsorframestotheappropriatedestinationIPaddressneedstoberesolvedtophysicaladdressateachIPnetworkinterfaceExample:Ethernetuses48-bitaddressesEachEthernetnetworkinterfacecard(NIC)hasgloballyuniqueMediumAccessControl(MAC)orphysicaladdressFirst24bitsidentifyNICmanufacturer;second24bitsareserialnumber00:90:27:96:68:0712hexnumbers18IPAddressingRFC1166EachhostonInternethasunique32bitIPaddressEachaddresshastwoparts:netidandhostidnetidunique&administeredbyInternetCorporationforAssignedNamesandNumbers(ICANN)AmericanRegistryforInternetNumbers(ARIN)ReseauxIPEuropeens(RIPE)AsiaPacificNetworkInformationCentre(APNIC)IPaddressisassignedtonetworkinterfacesratherthanhosts=>separateaddressisrequiredforeachphysicalconnectionofahosttoanetwork;“multi-homed”hosts
Dotted-DecimalNotation:IPaddressof10000000100001110100010000000101isindotted-decimalnotation19ClassesofIPAddresses010netidnetidhostidhostid7bits24bits14bits16bitsClassAClassB126networkswithupto16millionhosts16,382networkswithupto64,000hoststo55to5511netidhostid22bits8bitsClassC02millionnetworkswithupto254hoststo5520MulticastaddressUpto250millionmulticast
groupsatthesametime11multicastaddress28bits10ClassDto55ClassesofIPAddresses11Reservedforexperiments28bits11ClassE~~Reserved21PrivateIPAddressesSpecificrangesofIPaddressessetasideforuseinprivatenetworks(RFC1918)Userestrictedtoprivateinternets;routersinpublicInternetdiscardpacketswiththeseaddressesRange1:to55Range2:to55Range3:to55NetworkAddressTranslation(NAT)usedtoconvertbetweenprivate&globalIPaddresses22ExampleofIPAddressingRNetworkNetworkHHHHHR=routerH=hostInterfaceAddressisInterfaceAddressis50160AddresswithhostID=all0sreferstothenetworkAddresswithhostID=all1sreferstoabroadcastpacket23IPSubnetWhysubnet?MaximHostnumberinA/B/Cdifferentfromeachother;A/B/CclassesNotflexibleSimplifiesmanagementofmultiplicityofLANsSubnetaddressingintroducesanotherhierarchicallevel(e.g.,)HowtosubnetIntradomainonlyTransparenttoremotenetworksChangepartofhostbitstosubnetbits,Introducenetworkmasktoknowhowsubnetwasdoneinside.Tonormalizeusage,treattraditionalA/B/Caddressesasspecialsubnettednetworks(onlyhaveonesubnet)24SubnetAddressingMaskingusedtofindsubnetnumber25Network
MaskIPaddress mask
11001010011101110001011000000101&11111111111111111111111100000000
11001010011101110001011000000000(202)(119)(22)(0)Theresultof(ipandmask)meansnetworkID,soif(address1andmask)equals(address2andmask)meanstheyareinthesamenetworkAllbitsinmaskequals1meansIPaddress’scorrespondingbitsarenetworkpart,0smeanshostpartDefaultMaskforA/B/CaddressA=>B=>C=>26SpecialIPAddressesHostid“all0s”isreservedtorefertoanetworkNumber
(mask),(mask)Hostid“all1s”isreservedtobroadcasttoallhostsonaspecificnetwork
55(mask),55(mask)27SpecialIPAddresses(cont)
isreservedandmeans“unknownaddress“.Normallyusetobootdisklessworkstation55isreservedtobroadcasttoeveryhostonthelocalnetwork127.x.x.xmeans“thisnode”(localloopback).Messagessenttothisaddresswillneverleavethelocalhost.It’spurposeistestingnetworksoftware28IPaddresses:howtogetone?Hosts(hostportion):UsersareassignedIPaddressesbyInternetserviceproviders(ISPs)byhard-codedinsystemDHCP:
DynamicHostConfigurationProtocol:dynamicallygetaddress:“plug-and-play”hostbroadcasts“DHCPdiscover”msgDHCPserverrespondswith“DHCPoffer”msghostrequestsIPaddress:“DHCPrequest”msgDHCPserversendsaddress:“DHCPack”msg29AddressResolutionProtocolH1H2H3H4H1H2H3H4ARPrequest(whatistheMACaddressof2?)ARPresponse(myMACaddressis08:00:5a:3b:94)0123
AlthoughIPaddressidentifiesahost,thepacketisphysicallydeliveredbyanunderlyingnetwork(e.g.,Ethernet)whichusesitsownphysicaladdress(MACaddressinEthernet).HowtomapanIPaddresstoaphysicaladdress?
H1,H2,H3,H4areinthesamenetwork(howtojudge?)H1wantstolearnphysicaladdressofH3->broadcastsanARPrequestEveryhostreceivestherequest,butonlyH3replywithitsphysicaladdress30ExampleofARP31TCP/IPandInternet2TheInternetProtocol2.1IPAddressing2.2IPpacketstructureandtransmission32IPPacketHeaderVersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431IPheaderTCPheaderHTTPRequest33IPPacketHeaderVersion
IHL
TypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431Version:currentIPversionis4.Internetheaderlength(IHL):lengthoftheheaderin32-bitwords.Typeofservice(ToS):traditionallypriorityofpacketateachrouter.RecentDifferentiatedServicesredefinesToSfieldtosupportotherservicesthatarebetterthanbesteffort.34IPPacketHeaderVersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431Totallength:numberofbytesoftheIPpacketincludingheaderanddata,maximumlengthis65535bytes.Identification,Flags,andFragmentOffset:usedforfragmentationandreassembly(Moreonthisshortly).35IPPacketHeaderVersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431Timetolive(TTL):numberofhopspacketisallowedtotraverseinthenetwork.Eachrouteralongthepathtothedestinationdecrementsthisvaluebyone.Ifthevaluereacheszerobeforethepacketreachesthedestination,therouterdiscardsthepacketandsendsanerrormessagebacktothesource.36IPPacketHeaderVersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431Protocol:specifiesupper-layerprotocolthatistoreceiveIPdataatthedestination.ExamplesincludeTCP(protocol=6),UDP(protocol=17),andICMP(protocol=1).Headerchecksum:verifiestheintegrityoftheIPheader.(16-bit)SourceIPaddressanddestinationIPaddress:containtheaddressesofthesourceanddestinationhosts.37IPPacketHeaderVersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceIPAddressDestinationIPAddressOptionsPadding04816192431Options:Variablelengthfield,allowspackettorequestspecialfeaturessuchassecuritylevel,routetobetakenbythepacket,andtimestampateachrouter.Detaileddescriptionsoftheseoptionscanbefoundin[RFC791].Padding:Thisfieldisusedtomaketheheaderamultipleof32-bitwords.38ExampleofIPHeader39IPHeaderProcessingatRoutersComputeheaderchecksumforcorrectnessandcheckthatfieldsinheader(e.g.,versionandtotallength)containvalidvaluesConsultroutingtabletodeterminenexthopChangefieldsthatrequireupdating(TTL,headerchecksum)TheIPpacketisthenforwardedalongthenexthop40IPIPRouterSourceDestinationNetworkNetworkFragmentatsourceFragmentatrouterReassembleatdestinationFragmentationandReassemblyMTU:maximumtransmissionunit41FragmentationandReassembly
Identificationidentifiesaparticularpacket,allocatedbysourcehost
Flags=(unused,don’tfragment/DF,morefragment/MF)
Fragmentoffsetidentifiesthelocationofafragmentwithinapacketin64-bitwords42Example:FragmentingaPacketApacketistobeforwardedtoanetworkwithMTUof576bytes.ThepackethasanIPheaderof20bytesandadatapartof1484bytes.andofeachfragment.Maximumdatalengthperfragment=576-20=556bytes.Wesetmaximumdatalengthto552bytestogetmultipleof8.
TotalLengthIdMFFragmentOffsetOriginalpacket1504x00Fragment1572x10Fragment2572x169=552/8Fragment3400x0138=552*2/8Fragmentationinvolvesasubtleperformancepenalty.43Thefragmentsaretobereassembledatdestinationhost.(noreassemblingatrouters)RelievingloadofroutersFragmentsmaygoaheadalongdifferentpathsTimerissetatdestinationhostTimerisstartedoncethefirstfragmentarrivedAllfragmentsofonepacketwillbediscardedifanyoneofthepacketisnotreceivedbeforetimeout.Anderrorinformationwillbereportedtosource.
Fragmentationinvolvesasubtleperformancepenalty.Reassembling44ICMP
(InternetControlMessageProtocol)RFC792;EncapsulatedinIPpacket(protocoltype=1)HandleserrorandcontrolmessagesIfroutercannotdeliverorforwardapacket,itsendsanICMP“hostunreachable”messagetothesourceIfrouterreceivespacketthatshouldhavebeensenttoanotherrouter,itsendsanICMP“redirect”messagetothesender;SendermodifiesitsroutingtableICMP“routerdiscovery”messagesallowhosttolearnaboutroutersinitsnetworkandtoinitializeandupdateitsroutingtablesICMP“echorequestandreply”facilitatediagnosticandusedin“ping”ICMPICMP封裝在IP包內(nèi)(因為ICMP包需要跨越多個路由器)差錯報告功能:向源端報告(不可達(dá)、分組超時、分組頭參數(shù)錯誤),不用于差錯恢復(fù),僅僅是通告,未規(guī)定后續(xù)處理控制功能:擁塞控制——源抑制報文:請求源端降低發(fā)送速率,未定義恢復(fù)速率報文,源端稍后自動逐步恢復(fù)速率路由重定向:同一網(wǎng)絡(luò)內(nèi)多個路由器,某路由器重定向同網(wǎng)內(nèi)某主機(jī)路由路由器通告(向主機(jī))、路由器懇求等查詢功能:Echo:ping,tracerouteTimestamp(節(jié)點同步)地址掩碼請求與應(yīng)答2022/11/2NCRL45ICMP2022/11/2NCRL4647TypeCodeChecksumUnusedIPheaderand64bitsoforiginaldatagram081631ICMPBasicErrorMessageFormatTypeandCodeIPheader&64bitsoforiginaldatagramTomatchICMPmessagewithoriginaldatainIPpacket48TypeCodeChecksumIdentifierSequencenumberData081631EchoRequest&EchoReplyMessageFormatEchorequest:type=8;Echoreply:type=0DestinationreplieswithechoreplybycopyingdatainrequestontoreplymessageSequencenumbertomatchreplytorequestIDtodistinguishbetweendifferentsessionsusingechoservicesUsedinPING49Example–Echorequest50Example–EchoReply51TCP/IPandInternet1TheTCP/IPArchitecture2TheInternetProtocol3TransportLayerProtocols:UDPTCP4InternetRouting52OutlineUDPProtocolTCPReliableStreamServiceTCPProtocolTCPConnectionManagementTCPFlowControlTCPCongestionControl53UDPBesteffortdatagramserviceMultiplexingenablessharingofIPdatagramserviceSimpletransmitter&receiverConnectionless:nohandshaking&noconnectionstateLowheaderoverheadNoflowcontrol,noerrorcontrol,nocongestioncontrolUDPdatagramscanbelostorout-of-orderApplicationsmultimedia(e.g.,RTP)networkservices(e.g.,DNS,RIP,SNMP)54UDPDatagramSourceanddestinationportnumbersClientportsareephemeralServerportsarewell-knownMaxnumberis65,535UDPlengthTotalnumberofbytesindatagram(includingheader)8bytes≤length≤65,535UDPChecksumOptionallydetectserrorsinUDPdatagramsourceport#destport#32bitsApplicationdata(message)UDPsegmentformatlengthchecksumLength,inbytesofUDPsegment,includingheader55UDPChecksumCalculationUDPchecksumdetectsforend-to-enderrorsCoverspseudoheaderfollowedbyUDPdatagramIPaddressesincludedtodetectagainstmis-deliveryIP&UDPchecksumssettozeroduringcalculationPadwith1byteofzerosifUDPlengthisodd 00000000Protocol=17UDPLengthSourceIPAddressDestinationIPAddress081631UDPpseudo-header56UDPChecksumCalculation57UDPReceiverChecksumUDPreceiverrecalculatesthechecksumandsilentlydiscardsthedatagramiferrorsdetected“silently”meansnoerrormessageisgeneratedTheuseofUDPchecksumsisoptionalButhostsarerequiredtohavechecksumsenabled58Example59OutlineUDPProtocolTCPReliableStreamServiceTCPProtocolTCPConnectionManagementTCPCongestionControl60TCPReliablebyte-streamserviceMorecomplextransmitter&receiverConnection-oriented:full-duplexunicastconnectionbetweenclient&serverprocessesConnectionsetup,connectionstate,connectionreleaseHigherheaderoverheadErrorcontrol,flowcontrol,andcongestioncontrolHigherdelaythanUDPMostapplicationsuseTCPHTTP,SMTP,FTP,TELNET,POP3,…61ReliableByte-StreamServiceStreamDataTransfertransfersacontiguousstreamofbytesacrossthenetwork,withnoindicationofboundariesgroupsbytesintosegmentstransmitssegmentsasconvenient(Pushfunctiondefined)ReliabilityerrorcontrolmechanismtodealwithIPtransferimpairmentsWrite45bytesWrite15bytesWrite20bytesbufferbufferApplicationTransportRead40bytesRead40bytessegmentsACKS,sequence#ErrorDetection&Retransmission62FlowControlBufferlimitations&speedmismatchcanresultinlossofdatathatarrivesatdestinationReceivercontrolsrateatwhichsendertransmitstopreventbufferoverflowbuffersegmentsbufferusedApplicationTransportadvertisedwindowsize<Bbufferavailable=B63CongestionControlAvailablebandwidthtodestinationvarieswithactivityofotherusersTransmitterdynamicallyadjuststransmissionrateaccordingtonetworkcongestionasindicatedbyRTT(roundtriptime)&ACKsElasticutilizationofnetworkbandwidthbuffersegmentsbufferApplicationTransportACKSRTTEstimation64TCPMultiplexingATCPconnectionisspecifiedbya4-tuple(sourceIPaddress,sourceport,destinationIPaddress,destinationport)TCPallowsmultiplexingofmultipleconnectionsbetweenendsystemstosupportmultipleapplicationssimultaneouslyArrivingsegmentdirectedaccordingtoconnection4-tuple...TCP
IP12m...TCP
IP12nABC...TCP
IP12k(A,5234,B,80)(A,6234,B,80)(C,5234,B,80)65OutlineUDPProtocolTCPReliableStreamServiceTCPProtocolTCPConnectionManagementTCPCongestionControl66TCPProtocol
EachTCPsegmenthasheaderof20ormorebytes+0ormorebytesofdataSourceportDestinationportSequencenumberAcknowledgmentnumberChecksumUrgentpointerOptionsPadding0410162431URGACKPSHRSTSYNFINHeaderlengthReservedWindowsizeDataTCPSegmentFormat67TCPHeaderPortNumbersAsocketidentifiesaconnectionendpointIPaddress+portAconnectionspecifiedbyasocketpairWell-knownportsFTP 21Telnet 23DNS 53HTTP 80Headerlength4bitsLengthofheaderinmultiplesof32-bitwordsMinimumheaderlengthis20bytesMaximumheaderlengthis60bytes68TCPHeaderAcknowledgementNumberSNofnextbyteexpectedbyreceiverAcknowledgesthatallpriorbytesinstreamhavebeenreceivedcorrectlyValidifACKflagissetSequenceNumberBytecountFirstbyteinsegment32bitslong0SN232-1Initialsequencenumberselectedduringconnectionsetup69TCPHeaderReserved6bitsControl6bitsURG:urgentpointerflagUrgentmessageend=SN+urgentpointerACK:ACKpacketflagPSH:overrideTCPbufferingRST:resetconnectionUponreceiptofRST,connectionisterminatedandapplicationlayernotifiedSYN:establishconnectionFIN:closeconnection70TCPHeaderWindowSize16bitstoadvertisewindowsizeUsedforflowcontrolCurrentsenderwillacceptbyteswithSNfromACKtoACK+windowMaximumwindowsizeis65535bytesTCPChecksumInternetchecksummethodTCPpseudoheader+TCPsegment71TCPChecksumCalculationTCPerrordetectionusessameprocedureasUDPTCPpseudo-header00000000Protocol=6TCPsegmentlengthSourceIPaddressDestinationIPaddress08163172OutlineUDPProtocolTCPReliableStreamServiceTCPProtocolTCPConnectionManagementTCPCongestionControl73InitialSequenceNumberSelectinitialsequencenumbers(ISN)toprotectagainstsegmentsfrompriorconnections(thatmaycirculateinthenetworkandarriveatamuchlatertime)SelectISNtoavoidoverlapwithsequencenumbersofpriorconnectionsUselocalclocktoselectISNsequencenumberTimeforclocktogothroughafullcycleshouldbegreaterthanthemaximumlifetimeofasegment(MSL);TypicallyMSL=120secondsHighbandwidthconnectionsposeaproblem2n>2*maxpacketlife*Rbytes/second74TCPConnectionEstablishment“Three-wayHandshake”ISN’sprotectagainstsegmentsfrompriorconnectionsHostAHostBSYN,Seq_no=xSYN,Seq_no=y,ACK,Ack_no=x+1Seq_no=x+1,ACK,Ack_no=y+175IfhostalwaysusesthesameISNHostAHostBSYN,Seq_no=n,ACK,Ack_no=n+1Seq_no=n+1,ACK,Ack_no=n+1DelayedsegmentwithSeq_no=n+2willbeacceptedISNshouldbedifferenteachtimetoavoiddelay,lost,duplicate76MaximumSegmentSizeMaximumSegmentSizelargestblockofdatathatTCPsendstootherendEachendcanannounceitsMSSduringconnectionestablishmentTCPMSSDefaultis536bytesEthernetimpliesMSSof1460bytesIEEE802.3implies145277NearEnd:ConnectionRequest78FarEnd:AckandRequest79NearEnd:Ack80Client-ServerApplicationacceptreturnsread(blocks)readreturnswriteread(blocks)HostA(client)HostB(server)SYN,Seq_no=xSYN,Seq_no=y,ACK,Ack_no=x+1Seq_no=x+1,ACK,Ack_no=y+1socketbindlistenaccept
(blocks)socketconnect(blocks)connectreturnswriteread(blocks)readreturnsRequestmessageReplymessaget1t2t3t4t5t681TCPWindowFlowControl1024bytestotransmit1024bytestotransmit1024bytestotransmit128bytestotransmit1024bytestotransmitcanonlysend512bytesHostAHostBSeq_no=2000,Ack_no=1,Win=1024,Data=2000-3023Seq_no=1,Ack_no=4048,Win=512,Data=1-128Seq_no=3024,Ack_no=1,Win=1024,Data=3024-4047Seq_no=4048,Ack_no=129,Win=1024,Data=4048-4559t1t2t3t4Seq_no=1,Ack_no=2000,Win=2048,NoDatat082“GracefulClose”FIN,seq=5086Ack=5087Data,seq.=303,Ack=5087Deliver150bytesFIN,seq.=453,Ack=5087Ack=454HostAHostBAck=453TCPConnectionClosingTerminatingABTerminatingBA835.3TCPcongestioncontrolTCPusesaslidingwindowprotocolforendtoendflowcontrol.Theadvertisedwindowensuresthatthereceiver’sbufferwillneveroverflow,doesnotpreventthebuffersintheintermediateroutersformoverflowing.IPlayerdoesnotamechanismtoco
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年環(huán)保產(chǎn)業(yè)代理股權(quán)轉(zhuǎn)讓及環(huán)保技術(shù)合作合同4篇
- 二零二五版眼鏡店店長聘用及視力健康咨詢合同2篇
- 2025年版?zhèn)€人汽車交易合同模板4篇
- 2024版跨境電子商務(wù)平臺合作合同
- 通訊錄的制作 課程設(shè)計
- 2024年09月河北2024年廣發(fā)銀行石家莊分行校園招考筆試歷年參考題庫附帶答案詳解
- 2025版屋頂花園落水管設(shè)計與安裝合同4篇
- 2025年度新型分公司注冊服務(wù)合同范本4篇
- 2024年08月全國中國儲蓄銀行總行信息科技部門社會招考筆試歷年參考題庫附帶答案詳解
- 加油站的加氣服務(wù)與設(shè)備
- 品牌策劃與推廣-項目5-品牌推廣課件
- 信息學(xué)奧賽-計算機(jī)基礎(chǔ)知識(完整版)資料
- 發(fā)煙硫酸(CAS:8014-95-7)理化性質(zhì)及危險特性表
- 數(shù)字信號處理(課件)
- 公路自然災(zāi)害防治對策課件
- 信息簡報通用模板
- 社會組織管理概論全套ppt課件(完整版)
- 火災(zāi)報警應(yīng)急處置程序流程圖
- 耳鳴中醫(yī)臨床路徑
- 安徽身份證號碼前6位
- 分子生物學(xué)在動物遺傳育種方面的應(yīng)用
評論
0/150
提交評論