OpenSystemsInterconnectionReferenceModel(1984),orsimplytheOSImodel.通信网络ISO-OSI七层模型•Analogy-2Philosophersexample–OneEnglishspeakingphilosopherwishestosendamessagetoacolleagueinFrance(Peersinlayer3)–Sincetheyhavenocommonlanguage,theybothhireatranslator.Thetranslators(Peersinlayer2)decidewhichlanguagetheywilltranslateto.–Thetranslatorssendtheirmessagetotheirsecretary(PeersinLayer1)whomaydecidetosendthemessagebyfax,oremailortelephone(Layer1protocol)–Notethatlogicallyeachlayercommunicateswithitspeer.Inpractice,eachlayercommunicateswiththelayersbelowthem•Analogy-Thingstoremember–Messageispassedfromlayer3downthroughlayers2and1beforetransmission–Attheoppositeside,themessagetravelsupthroughlayer1and2beforearrivingatlayer3–Layer3doesnotcarehowthemessageistransformedorhowitistransmittedbythelowerlayers–Layer2isonlyconcernedwithtransformingthemessage(i.e.translation)anddoesnotconcernitselfwithhowthemessageistransmitted–Layer1isonlyconcernedwithtransmittingthemessageanddoesnotconcernitselfwiththecontentsofthemessageLayering•Divideataskintopiecesandthensolveeachpieceindependently(ornearlyso).•Establishingawelldefinedinterfacebetweenlayersmakesportingeasier.•MajorAdvantages:CodeReuseExtensibilityProtocols•UsedbyNetworkmodellayers•SetsofrulestodefinehowtocommunicateateachlayerandhowtointerfacewithadjacentlayersreceiversenderLayerNLayerN-1LayerN+1LayerNLayerN-1LayerN+1KeyElementsofaProtocol•Syntax–Dataformats–Signallevels•Semantics–Controlinformation–Errorhandling•Timing–Speedmatching–SequencingProtocolArchitecturesandNetworksLayeringExample:FederalExpress•Letterinenvelope,addressonoutside•FedXguyaddsaddressinginformation,barcode.•Localofficedrivestoairportanddeliverstohub.•Sentviaairplanetonearestcity.•Deliveredtorightoffice•DeliveredtorightpersonLetterFedXLayersLetterAddressedEnvelopeAddressedEnvelopeLayeredSoftwareSystems•Networksoftware•Operatingsystems•WindowingsystemsUnixisaLayeredSystemApplicationsLibrariesSystemCallsKernel•TheOSIReferenceModelApplicationPresentationSessionTransportNetworkDatalinkPhysicalApplicationPresentationSessionTransportNetworkDatalinkPhysicalMediumOpenEndsystemOpenEndsystem•PhysicalLayeristhelowestlayerandisconcernedwithwiringandelectricalstandards.•Itprovidesanunreliablebittransmission/receptionservicetothelayeraboveit.•TheOSIReferenceModel–Data-linkLayerisconcernedwithusingthephysicallayertotransmitinformationfromonecomputertoanothercomputerconnectedtothesamenetwork.•Datatobesentisbrokenintoframesandtransmitted.•Thislayerneedstobeabletorecognizeaframeinarawbitstream•Itneedstobeabletoidentifyerrorsinframes•Thislayermustregulatethespeedofdatatransmission.Afasttransmittercouldoverloadaslowerreceiver•Ifinabroadcastnetwork,thenthislayercontrolsaccesstothesharedchannel(MediumAccessControl)•TheOSIReferenceModel–NetworkLayerprovidesaframedeliveryserviceacrossanetworkoracrossdifferentnetworks.•Thekeyproblemthatthislayersolvesishowtoroutepacketsfromasourcecomputertoadestinationcomputer•Thislayeraddsheaderinformationtoeachpackettouniquelyaddresshostsinthenetwork•RoutingInformationiskeptintablesorbuiltdynamically•Inbroadcastnetworks,routingissimplesinceeveryhostreceiveseverypacket,thusthenetworklayerinthiscaseisverythinornon-existent.•TheOSIReferenceModel–TransportLayeracceptsdatafromtheSessionLayerandbreaksitupintosmallerunits(calledfragmentation),ifnecessary,beforepassingittotheNetworkLayer.•Datacanbesentusinganerrorfreelogicalconnectionbetweentwocomputersthatdeliverspacketsthesameorderthattheyweresent•Datacanalsobesentusingadatagramservicewherepacketsaredeliveredwithoutassuredorderofdelivery•Thislayercansupportmanytransportlayerconnectionsenteringandleavingit.Thetransportlayerheaderineachpacketwillcontainthisinformation.•TheOSIReferenceModel–SessionLayer•Thislayerallowsdifferentmachinestoestablishsessionsbetweenthem.E.g.Transferringafilefromonemachinetoanother.Asessioncanberesumedafteracomputerhascrashed–PresentationLayer•Thislayerprovidesdatacodingforintegers,floatsetc,datacompressionandsecuretransmissionusingcryptography–ApplicationLayer.•EndapplicationprogramsORservicesusedbyendapplicationprograms.•Typicalapplicationsincludedinthislayerwouldbee-mail,remotelogin,directoryservicesPhysicalLayerDataLinkLayerNetworkLayerTransportLayerSessionLayerPresentationLayerApplicationLayerPhysicalLayerDataLinkLayerNetworkLayerTransportLayerSessionLayerPresentationLayerApplicationLayerDataDataDataDataDataDataDataBitsAHPHSHTHNHNHApplicationLayerProtocolActualPathtakenbydataMessageTransmissionExampleMessageTransmissionUsingLayersApplicationsApplicationssenderreceiverAreceivinglayerwrapsincomingmessagewithanenvelope•AddslayerrelatedaddressinginformationAreceivinglayerremovesthelayerrelatedenvelopeandforwardsthemessageupSimplifiedNetworkModelProcessTransportDataLinkInterfaceProtocolsPeer-to-peerProtocolsNetworkProcessTransportDataLinkNetwork802LayersSource:IEEEStd802-2001,IEEEStandardsforLocalandMetropolitanAreaNetworks:OverviewandArchitecture,IEEEStd802-2001ComparisonofNetworkModelsComparingtheModelsSource:Computer