Vous êtes sur la page 1sur 19

THE OSI REFERENCE MODEL

Overview
Tounderstandhowanetworkoperatesandfunctions,itisfundamentaltobeawareofandhave
anunderstandingofcertainbasicconceptsandterms.TheOSIreferencemodelwascreatedto
helpexplainhownetworksfunctioningeneral.TheTCP/IPprotocolstackisusedtodescribe
theactualfunctionsandtermsthatareimplementedinIPnetworks.

Objectives
Upon completing this lesson, you will be able to define basic computer and networking
terminologyanddescribethebenefitsandfunctionsoftheOSIreferencemodelandTCP/IP
protocolstack,aswellastheprocessofcommunicationbetweenlayersoftheOSIreference
model.Thisincludesbeingabletomeettheseobjectives:
DescribethehistoryandpurposesoftheOSIreferencemodel
DiscussthefunctionsofeachofthesevenlayersoftheOSIreferencemodelandprovide
examplesofeach
DescribethebasicprocessofcommunicationbetweenthelayersoftheOSIreferencemodel
Describe thefunctions of the TCP/IP protocol stackandprovide examples of each layers
function
ComparetheTCP/IPprotocolstacktotheOSIreferencemodel

Outline
Thelessonincludesthesetopics:
Overview
TheOSIReferenceModel
TheOSILayersandFunctions
DataCommunications
TheTCP/IPProtocolStack
TCP/IPProtocolStackvs.OSIReferenceModel

The OSI Reference Model


The OSI reference model is the primary model for network communications. This topic
explainstheoriginandpurposeoftheOSIreferencemodel.

The OSI Reference Model

2003, Cisco Systems, Inc. All rights reserved.

Application

Presentation

Session

Transport

Network

Data Link

Physical

INTRO v1.0a1-10

TheearlydevelopmentofLANs,MANs,andWANswaschaoticinmanyways.Theearly
1980ssawtremendousincreasesinthenumberandsizesofnetworks.Ascompaniesrealized
thattheycouldsavemoneyandgainproductivitybyusingnetworkingtechnology,theyadded
networksandexpandedexistingnetworksasrapidlyasnewnetworktechnologiesandproducts
wereintroduced.
Bythemid1980s,companiesbegantoexperiencedifficultiesfromalltheexpansionstheyhad
made.Itbecamemoredifficultfornetworksusingdifferentspecificationsandimplementations
tocommunicatewitheachother.Thiswasprimarilyduetodifferenceinimplementationsof
different softwares bymultiple vendors. The companies realizedthat they neededto move
away from proprietary networking systems, those systems which are privately developed,
owned, and controlled. In the computer industry, proprietary is the opposite of open.
Proprietarymeansthatonecompanyorasmallgroupofcompaniescontrol(s)allusageofthe
technology.Openmeansthatfreeusageofthetechnologyisavailabletothepublic.
Toaddresstheproblemofnetworksbeingincompatibleandunabletocommunicatewitheach
other,theInternationalOrganizationforStandardization(ISO)researcheddifferentnetwork
schemes.Asaresultofthisresearch,theISOcreatedamodelthatwouldhelpvendorscreate
networksthatwouldbecompatiblewith,andoperatewith,othernetworks.
TheOpenSystemInterconnection(OSI)referencemodel,releasedin1984,wasthedescriptive
schemethat theISOhadcreated.Itprovidedvendorswitha setof standardsthat ensured
greatercompatibilityandinteroperabilitybetweenthevarioustypesofnetworktechnologies
producedbycompaniesaroundtheworld.Althoughothermodelsexist,mostnetworkvendors
todayrelatetheirproductstotheOSIreferencemodel,especiallywhentheywanttoeducate
customersontheuseoftheirproducts.Itisconsideredthebesttoolavailableforteaching
peopleaboutsendingandreceivingdataonanetwork.

TheOSIreferencemodelhassevennumberedlayers,eachillustratingaparticularnetwork
function.Thisseparationofnetworkingfunctionsiscalledlayering.TheOSIreferencemodel
defines the network functions that occur at each layer. The OSI reference model gives us
informationonhowactuallydatatravelsfromaenduseronanetworktoanotherenduseron
thenetworkthroughnetworkingdevicesandwires.

Why a Layered Network Model?


7

Application

Presentation

Session

Transport

Network

Data Link

Physical

Reduces complexity
Standardizes interfaces
Facilitates modular engineering

2003, Cisco Systems, Inc. All rights reserved.

Ensures interoperable technology


Accelerates evolution
Simplifies teaching and learning

INTRO v1.0a1-11

Dividingthenetworkintothesesevenlayersprovidestheseadvantages:
Reducescomplexity:Itbreaksnetworkcommunicationintosmaller,simplerparts.
Standardizes interfaces: It standardizes network components to allow multiplevendor
developmentandsupport.
Facilitatesmodularengineering:Itallowsdifferenttypesofnetworkhardwareandsoftware
tocommunicatewitheachother.
Ensuresinteroperabletechnology:Itpreventschangesinonelayerfromaffectingtheother
layers,allowingforquickerdevelopment.
Accelerates evolution: It provides for effective updates and improvements to individual
componentswithoutaffectingothercomponentsorhavingtorewritetheentireprotocol.
Simplifiesteachingandlearning:Itbreaksnetworkcommunicationintosmallercomponents
tomakelearningeasier.

The OSI Layers and Functions


Thepracticeofmovinginformationbetweencomputersisdividedintoseventechniquesinthe
OSIreferencemodel.
Eachoftheseventechniquesisrepresentedbyitsownlayerinthemodel.Thesevenlayersof
theOSIreferencemodelareasfollows:

Layer7:Applicationlayer

Layer6:Presentationlayer

Layer5:Sessionlayer

Layer4:Transportlayer

Layer3:Networklayer

Layer2:Datalinklayer

Layer1:Physicallayer

EachOSIlayercontainsasetoffunctionsperformedbyprogramstoenabledatapacketsto
travelfromasourcetoadestinationonanetwork.Followingisabriefdescriptionofeachlayer
intheOSIreferencemodel.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Transport

Network

Data Link

Physical

2003, Cisco Systems, Inc. All rights reserved.

Network Processes to Applications


Provides network services to
application processes (such as
electronic mail, file transfer,
and terminal emulation)

INTRO v1.0a1-12

Layer 7: The Application Layer


TheapplicationlayeristheOSIlayerthatisclosesttotheuser.Thislayerprovidesnetwork
servicestotheusersapplications.Itdiffersfromtheotherlayersinthatitdoesnotprovide
servicestoanyotherOSIlayer,butrather,onlytoapplicationsoutsidetheOSImodel.The
application layer establishes the availability of intended communication partners and
synchronizesandestablishesagreementonproceduresforerrorrecoveryandcontrolofdata
integrity.Thislayercanlogicallybereferencedasthemonitorofacomputerthatauseruses.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Transport

Network

Data Link

Physical

2003, Cisco Systems, Inc. All rights reserved.

Network Process to Applications


Data Representation
Ensures data is readable by
receiving system
Formats data
Structures data
Negotiates data transfer syntax
for application layer

INTRO v1.0a1-13

Layer 6: The Presentation Layer


Thepresentationlayerensuresthattheinformationthattheapplicationlayerofonesystem
sendsoutisreadablebytheapplicationlayerofanothersystem(forexample,aPCprogram
communicateswithanothercomputer,oneusingextendedbinarycodeddecimalinterchange
code(EBCDIC)andtheotherusingASCIItorepresentthesamecharacters).Ifnecessary,the
presentationlayertranslatesbetweenmultipledataformatsbyusingacommonformat.Itis
alsoresponsibleforencryption.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Transport

Network

Data Link

Physical

2003, Cisco Systems, Inc. All rights reserved.

Network Process to Applications


Data Representation
Interhost Communication
Establishes, manages, and
terminates sessions between
applications

INTRO v1.0a1-14

Layer 5: The Session Layer


Thesessionlayerestablishes,manages,andterminatessessionsbetweentwocommunicating
hosts.Itprovidesitsservicestothepresentationlayer.Thesessionlayeralsosynchronizes
dialoguebetweenthepresentationlayersofthetwohostsandmanagestheirdataexchange.For
example,webservershavemanyusers,sotherearemanycommunicationprocessesopenata
giventime.Itisimportant,then,tokeeptrackofwhichusercommunicatesonwhichpath.In
additiontosessionregulation,thesessionlayeroffersprovisionsforefficientdatatransfer,
classofservice,andexceptionreportingofsessionlayer,presentationlayer,andapplication
layerproblems.Itbasicallyisresponsibleforkeepingupperlayerdataseparate.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network Process to Applications


Data Representation
Interhost Communication
End-to-End Connections

2003, Cisco Systems, Inc. All rights reserved.

Handles transportation issues


between hosts
Ensures data transport reliability
Establishes, maintains and
terminates virtual circuits
Provides reliability through fault
detection and recovery
information flow control

INTRO v1.0a1-15

Layer 4: The Transport Layer


Thetransportlayersegmentsdatafromthesendinghostssystemandreassemblesthedatainto
adatastreamonthereceivinghostssystem.Forexample,businessusersinlargecorporations
oftentransferlargefilesfromfieldlocationstoacorporatesite.Reliabledeliveryofthefilesis
important,sothetransportlayerwillbreakdownlargefilesintosmallersegmentsthatareless
likelytoincurtransmissionproblems.
The boundary between the transport layer and the session layer can be thought of as the
boundary between application protocols and dataflow protocols. Whereas the application,
presentation,andsessionlayersareconcernedwithapplicationissues,thelowerfourlayersare
concernedwithdatatransportissues.
Thetransportlayerattemptstoprovideadatatransportservicethatshieldstheupperlayers
from transport implementation details. Specifically, issues such as reliability of transport
betweentwohostsaretheconcernofthetransportlayer.Inprovidingcommunicationservice,
thetransportlayerestablishes,maintains,andproperlyterminatesvirtualcircuits.Transport
errordetectionandrecoveryandinformationflowcontrolareusedtoprovidereliableservice.
Italsooffersunreliableorconnectionlessservicesasopposedtothereliableorconnection
orientedservices.TheseservicesareusedbyprotocolsandservicessuchasDNS.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Interhost Communication

Transport

End-to-End Connections

Network

Data Link

Physical

2003, Cisco Systems, Inc. All rights reserved.

Network Process to Applications


Data Representation

Data Delivery
Provides connectivity and path
selection between two host systems
Routes data packets
Selects best path to deliver data

INTRO v1.0a1-16

Layer 3: The Network Layer


Thenetworklayerprovidesconnectivityandpathselectionbetweentwohostsystemsthatmay
belocatedongeographicallyseparatednetworks.ThegrowthoftheInternethasincreasedthe
numberofusersaccessinginformationfromsitesaroundtheworld,anditisthenetworklayer
thatmanagesthisconnectivity.
Itisbasicallyresponsibleforoptimalpathselection,providesnetworkresiliencyandlogical
addressing.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Interhost Communication

Transport

End-to-End Connections

Network

Data Link

Physical

Network Process to Applications


Data Representation

Data Delivery
Access to Media

2003, Cisco Systems, Inc. All rights reserved.

Defines how data is formatted for


transmission and how access to the
network is controlled

INTRO v1.0a1-17

Layer 2: The Data-Link Layer


The datalink layer defines how data is formatted for transmission and how access to the
networkiscontrolled.Italsomayprovideconnectionorientedservices.Itisalsoresponsible
forerrordetection.

The Seven Layers of the OSI Model


7

Application

Presentation

Session

Interhost Communication

Transport

End-to-End Connections

Network

Data Link

Physical

Network Process to Applications


Data Representation

Data Delivery
Access to Media
Binary Transmission

2003, Cisco Systems, Inc. All rights reserved.

Defines the electrical, mechanical,


procedural, and functional
specifications for activating,
maintaining, and deactivating the
physical link.
INTRO v1.0a1-18

Layer 1: The Physical Layer


Thephysicallayerdefinestheelectrical,mechanical,procedural,andfunctionalspecifications
for activating, maintaining, and deactivating the physical link between end systems.
Characteristicssuchasvoltagelevels,timingofvoltagechanges,physicaldatarates,maximum
transmissiondistances,physicalconnectors,andothersimilarattributesaredefinedbyphysical
layerspecifications.
Wiretypes,voltagespecifications,pinoutspecificationsetc.arereferencebythephysicallayer
oftheOSIreferencemodel.

Data Communications
Allcommunicationsonanetworkoriginateatasourceandaresenttoadestination.Thistopic
explainshowtheprocessoftransmittingdatafromonesitetoanotheroperates.

Data Encapsulation
Sender

User Data
7

Application

Presentation

Session

Transport

Network

Data Link

Physical

L5
HDR
L4
L5
HDR HDR
L3
L4
L5
HDR HDR HDR
L2
L3
L4
L5
HDR HDR HDR HDR

L6
HDR
L6
HDR
L6
HDR
L6
HDR
L6
HDR

L7
HDR
L7
HDR
L7
HDR
L7
HDR
L7
HDR
L7
HDR

User Data
User Data
User Data
User Data
User Data
User Data FCS

Bits
HDR = header

2003, Cisco Systems, Inc. All rights reserved.

INTRO v1.0a1-19

Encapsulation
Theinformationsentonanetworkisreferredtoasdataordatapackets.Ifonecomputer(Host
A)wantstosenddatatoanothercomputer(HostB),thedatamustfirstbepackagedbya
processcalledencapsulation.Theencapsulationprocesscanbethoughtofasputtingaletter
insideanenvelope,andthenproperlywritingtherecipientsmailaddressontheenvelopesoit
canbeproperlydeliveredbythepostalsystem.
Encapsulation wraps data with the necessary protocol information before network transit.
Therefore,asthedatamovesdownthroughthelayersoftheOSImodel,eachOSIlayeraddsa
header(andatrailerifapplicable)tothedatabeforepassingitdowntoalowerlayer.The
headersandtrailerscontaincontrolinformationforthenetworkdevicesandreceivertoensure
properdeliveryofthedataandtoensurethatthereceivercancorrectlyinterpretthedata.
Thefigureillustrateshowencapsulationoccurs.Itshowsthemannerinwhichdatatravels
throughthelayers.Thesestepsoccurinordertoencapsulatedata:
Theuserdataissentfromanapplicationtotheapplicationlayer.
Theapplicationlayeraddstheapplicationlayerheader(Layer7header)totheuserdata.The
Layer7headerandtheoriginaluserdatabecomethedatathatispasseddowntothe
presentationlayer.
Thepresentationlayeraddsthepresentationlayerheader(Layer6header)tothedata.This
thenbecomesthedatathatispasseddowntothesessionlayer.
Thesessionlayeraddsthesessionlayerheader(Layer5header)tothedata.Thisthenbecomes
thedatathatispasseddowntothetransportlayer.
Thetransportlayeraddsthetransportlayerheader(Layer4header)tothedata.Thisthen
becomesthedatathatispasseddowntothenetworklayer.

The network layer adds the networklayer header (Layer 3 header) to the data. This then
becomesthedatathatispasseddowntothedatalinklayer.
Thedatalinklayeraddsthedatalinklayerheaderandtrailer(Layer2headerandtrailer)tothe
data.ALayer2trailerisusuallytheframechecksequence(FCS),whichisusedby
thereceivertodetectwhetherornotthedataisinerror.Thisthenbecomesthedata
thatispasseddowntothephysicallayer.
Thephysicallayerthentransmitsthebitsontothenetworkmedia.

Data De-Encapsulation
Receiver

User Data
7

Application

Presentation

Session

Transport

Network

Data Link

Physical

L5
HDR
L4
L5
HDR HDR
L3
L4
L5
HDR HDR HDR
L2
L3
L4
L5
HDR HDR HDR HDR

L6
HDR
L6
HDR
L6
HDR
L6
HDR
L6
HDR

L7
HDR
L7
HDR
L7
HDR
L7
HDR
L7
HDR
L7
HDR

User Data
User Data
User Data
User Data
User Data
User Data FCS

Bits
HDR = header

2003, Cisco Systems, Inc. All rights reserved.

INTRO v1.0a1-20

De-Encapsulation
Whentheremotedevicereceivesasequenceofbits,thephysicallayerattheremotedevice
passes the bits to the datalink layer for manipulation. The datalink layer performs the
following:
Step 1

Itchecksthedatalinktrailer(theFCS)toseeifthedataisinerror.

Ifthedataisinerror,itmaybediscarded,andthedatalinklayermayaskforthedatatobe
retransmitted.
Ifthedataisnotinerror,thedatalinklayerreadsandinterpretsthecontrolinformationinthe
datalinkheader.
Itstripsthedatalinkheaderandtrailer,andthenpassestheremainingdatauptothenetwork
layerbasedonthecontrolinformationinthedatalinkheader.
Thisprocessisreferredtoasdeencapsulation.Eachsubsequentlayerperformsasimilarde
encapsulationprocess.Thinkofdeencapsulationastheprocessofreadingtheaddressona
lettertoseeifitisforyouornot,andthenremovingtheletterfromtheenvelopeiftheletteris
addressedtoyou.

Peer-to-Peer Communication
Sender

Receiver

Application

Application

Presentation

Presentation

Session
Transport
Network
Data Link
Physical

2003, Cisco Systems, Inc. All rights reserved.

Segments
Packets
Frames
Bits
Network

Session
Transport
Network
Data Link
Physical

INTRO v1.0a1-21

Peer-to-Peer Communication
Sothatdatapacketscantravelfromthesourcetothedestination,eachlayeroftheOSImodel
at the source must communicate with its peer layer at the destination. This form of
communicationisreferredtoaspeertopeercommunication.Duringthisprocess,theprotocols
ateachlayerexchangeinformation,calledprotocoldataunits(PDUs),betweenpeerlayers.
Data travels from source to destination on a network. Each layer depends on the service
functionoftheOSIlayerbelowit.Toprovidethisservice,thelowerlayerusesencapsulation
toputthePDUfromtheupperlayerintoitsdatafield.Itthenaddswhateverheadersthelayer
needstoperformitsfunction.AsthedatamovesdownthroughLayers7through5oftheOSI
model,additionalheadersareadded.ThegroupingofdataattheLayer4PDUiscalleda
segment.
Thenetworklayerprovidesaservicetothetransportlayer,andthetransportlayerpresentsdata
totheinternetworksubsystem.Thenetworklayermovesthedatathroughtheinternetworkby
encapsulatingthedataandattachingaheadertocreateapacket(theLayer3PDU).Theheader
containsinformationrequiredtocompletethetransfer,suchassourceanddestinationlogical
addresses.
Thedatalinklayerprovidesaservicetothenetworklayerbyencapsulatingthenetworklayer
packet in a frame (the Layer 2 PDU). The frame header contains the physical addresses
requiredtocompletethedatalinkfunctions,andtheframetrailercontainstheFramecheck
sequence(FCS)
Thephysicallayerprovidesaservicetothedatalinklayer,encodingthedatalinkframeintoa
patternof1sand0s(bits)fortransmissiononthemedium(usuallyawire)atLayer1.
Networkdevicessuchashubs,switches,androutersworkatthelowerthreelayers.Hubsareat
Layer1,switchesareatLayer2,androutersareatLayer3.

The TCP/IP Protocol Stack


AlthoughtheOSIreferencemodelisuniversallyrecognized,thehistoricalandtechnicalopen
standardoftheInternetistheTCP/IPprotocolstack.Thistopicdescribesthelayersofthe
TCP/IPprotocolstack.

TCP/IP Model

Application
Presentation
Internet
Network Access

2003, Cisco Systems, Inc. All rights reserved.

INTRO v1.0a1-22

TheTCP/IPprotocolstackhasfourlayers:theapplicationlayer,thetransportlayer,theInternet
layer,andthenetworkaccesslayer.Itisimportanttonotethatalthoughsomeofthelayersin
theTCP/IPprotocolstackhavethesamenamesaslayersintheOSImodel,thelayershave
differentfunctionsineachmodel.
Application layer: The application layer handles highlevel protocols, including issues of
representation,encoding,anddialogcontrol.TheTCP/IPmodelcombinesallapplication
relatedissuesintoonelayerandensuresthatthisdataisproperlypackagedforthenext
layer.Theapplication,presentationandsessionlayeroftheOSIreferencemodelhavebeen
clubbedandrepresentedastheapplicationlayerofTCP/IP
Transportlayer: Thetransportlayerdealswithqualityofserviceissuesofreliability,flow
control, and error correction. One of its protocols, the Transmission Control Protocol
(TCP), provides for reliable network communications. User Datagram Protocol (UDP)
providesconnectionlessorunreliablenetworkcommunicationabilities.
Internetlayer:ThepurposeoftheInternetlayeristosendsourcepacketsfromanynetwork
ontheinternetworkandhavethemarriveatthedestination,regardlessofthepaththeytook
togetthere.Thisisresponsibleforoptimalpathdetermination.
Networkaccesslayer:Thenameofthislayerisverybroadandsomewhatconfusing.Itisalso
called the hosttonetworklayer. It includes the LAN and WAN protocols, and all the
detailsintheOSIphysicalanddatalinklayers.

TCP/IP Protocol Stack vs. OSI Reference Model


TherearebothsimilaritiesanddifferencesbetweentheTCP/IPprotocolstackandtheOSI
referencemodel.Thistopicdescribesthesesimilaritiesanddifferences.

TCP/IP Protocol Stack vs. OSI Model


TCP/IP Protocol Stack

OSI Model
Application

Application

Protocols

Presentation

Application
Layers

Session
Transport

Transport

Internet

Network

Network
Access

Networks

Data Link

Data Flow
Layers

Physical

2003, Cisco Systems, Inc. All rights reserved.

INTRO v1.0a1-23

Similarities
TherearecertainsimilaritiesbetweentheTCP/IPprotocolstackandtheOSImodel:
Bothhaveapplicationlayers,thoughtheyincludedifferentservices.
Bothhavecomparabletransportandnetworklayers.
Bothassumepacketswitchedtechnology,notcircuitswitched.(Analogtelephonecallsarean
exampleofcircuitswitched.)
Differences
TherearealsosomedifferencesbetweentheTCP/IPprotocolstackandtheOSImodel:
TCP/IPcombinesthepresentationandsessionlayersintoitsapplicationlayer.
TCP/IPcombinestheOSIdatalinkandphysicallayersintothenetworkaccesslayer.
TCP/IP protocols are the standards around which the Internet developed, so the TCP/IP
protocolstackgainscredibilityjustbecauseofitsprotocols.Incontrast,networksarenot
typicallybuiltontheOSImodel,eventhoughtheOSImodelisusedasaguide.