of 44
8/14/2019 osi and tcp/ip comparison
1/44
8/14/2019 osi and tcp/ip comparison
2/44
8/14/2019 osi and tcp/ip comparison
3/44
IntroductionIntroduction
The topics that we will beThe topics that we will be
discussing would be based on thediscussing would be based on the
diagram below.diagram below.
OSI TCP / IP
Application (Layer7)
ApplicationPresentation (Layer6)
Session (Layer 5)
Transport (Layer 4) Transport
Network (Layer 3) Internet
Data Link (Layer 2)Subnet
Physical (Layer 1)
8/14/2019 osi and tcp/ip comparison
4/44
OutlineOutline
Compare the protocol layers thatCompare the protocol layers that
correspond to each other.correspond to each other.
General ComparisonGeneral Comparison Focus of Reliability ControlFocus of Reliability Control
Roles of Host systemRoles of Host system
De-jure vs. De-factoDe-jure vs. De-facto
8/14/2019 osi and tcp/ip comparison
5/44
The Upper LayersThe Upper Layers
OSI TCP / IP
Application (Layer7)
ApplicationPresentation (Layer6)
Session (Layer 5)
SessionSession
PresentationPresentation
ApplicationApplication
8/14/2019 osi and tcp/ip comparison
6/44
The Session LayerThe Session Layer
The Session layerThe Session layer permits twopermits two
parties to hold ongoingparties to hold ongoing
communications called a sessioncommunications called a sessionacross a networkacross a network..
Not found in TCP/IP modelNot found in TCP/IP model
In TCP/IP,itsIn TCP/IP,its characteristicscharacteristics areareprovided by the TCP protocol.provided by the TCP protocol.
(Transport Layer)(Transport Layer)
8/14/2019 osi and tcp/ip comparison
7/44
The Presentation LayerThe Presentation Layer
The Presentation Layer handles dataThe Presentation Layer handles dataformat information for networkedformat information for networkedcommunications. This is done bycommunications. This is done byconverting data into a generic formatconverting data into a generic formatthat could be understood by both sides.that could be understood by both sides.
Not found in TCP/IP modelNot found in TCP/IP model
In TCP/IP, this function is provided byIn TCP/IP, this function is provided bythe Application Layer.the Application Layer.
e.g.e.g. External Data Representation Standard (XDR)External Data Representation Standard (XDR)Multipurpose Internet Mail ExtensionsMultipurpose Internet Mail Extensions (MIME)(MIME)
8/14/2019 osi and tcp/ip comparison
8/44
The Application LayerThe Application Layer
The Application Layer is the top layer of theThe Application Layer is the top layer of thereference model. It provides a set of interfacesreference model. It provides a set of interfacesfor applications to obtain access to networkedfor applications to obtain access to networked
services as well as access to the kinds ofservices as well as access to the kinds ofnetwork services that support applicationsnetwork services that support applicationsdirectly.directly.
OSIOSI - FTAM,VT,MHS,DS,CMIP- FTAM,VT,MHS,DS,CMIP
TCP/IPTCP/IP - FTP,SMTP,TELNET,DNS,SNMP- FTP,SMTP,TELNET,DNS,SNMP
Although the notion of an application processAlthough the notion of an application processis common to both, their approaches tois common to both, their approaches to
constructing application entities is different.constructing application entities is different.
8/14/2019 osi and tcp/ip comparison
9/44
Approaches use in constructingApproaches use in constructing
application entitiesapplication entities
The diagram below provides an overall view onThe diagram below provides an overall view on
the methods use by both thethe methods use by both the OSIOSI andandTCP/IPTCP/IP
model.model.
8/14/2019 osi and tcp/ip comparison
10/44
ISO ApproachISO Approach
Sometime calledSometime called Horizontal ApproachHorizontal Approach OSI asserts that distributed applicationsOSI asserts that distributed applications
operate over a strict hierarchy of layersoperate over a strict hierarchy of layersand are constructed from a commonand are constructed from a commontool kit of standardized applicationtool kit of standardized applicationservice elements.service elements.
In OSI, each distributed applicationIn OSI, each distributed applicationservice selects functions from a largeservice selects functions from a largecommon toolbox of applicationcommon toolbox of applicationservice element (ASEs) andservice element (ASEs) and
complements these with applicationcomplements these with applicationservice elements that perform functionsservice elements that perform functions
8/14/2019 osi and tcp/ip comparison
11/44
TCP/IP ApproachTCP/IP Approach
Sometime calledSometime called Vertical ApproachVertical Approach
In TCP/IP, each application entity isIn TCP/IP, each application entity is
composed of whatever set of function itcomposed of whatever set of function itneeds beyond end to end transport toneeds beyond end to end transport to
support a distributed communicationssupport a distributed communications
service.service.
Most of these application processesMost of these application processes
builds on what it needs and assumesbuilds on what it needs and assumes
only that an underlying transportonly that an underlying transport
mechanism (datagram or connection)mechanism (datagram or connection)will be rovided.will be rovided.
8/14/2019 osi and tcp/ip comparison
12/44
Transport LayerTransport Layer
The functionality of the transportThe functionality of the transport
layer is to provide transparentlayer is to provide transparent
transfer of data from a source endtransfer of data from a source end
open system to a destination endopen system to a destination end
open system (ISO / IEC 7498:open system (ISO / IEC 7498:
1984).1984).
OSI TCP / IP
Transport (Layer 4) Transport (TCP/UDP)
8/14/2019 osi and tcp/ip comparison
13/44
Transport LayerTransport Layer
Transport is responsible forTransport is responsible for
creating and maintaining the basiccreating and maintaining the basic
end-to-end connection betweenend-to-end connection betweencommunicating open systems,communicating open systems,
ensuring that the bits delivered toensuring that the bits delivered to
the receiver are the same as thethe receiver are the same as thebits transmitted by the sender; inbits transmitted by the sender; in
the same order and withoutthe same order and without
modification, loss or duplicationmodification, loss or duplication
8/14/2019 osi and tcp/ip comparison
14/44
OSI Transport LayerOSI Transport Layer
It takes the information to be sent andIt takes the information to be sent and
breaks it into individual packets that arebreaks it into individual packets that are
sent and reassembled into a completesent and reassembled into a completemessage by the Transport Layer at themessage by the Transport Layer at the
receiving nodereceiving node
Also provide a signaling service for theAlso provide a signaling service for the
remote node so that the sending noderemote node so that the sending nodeis notified when its data is receivedis notified when its data is received
successfully by the receiving nodesuccessfully by the receiving node
8/14/2019 osi and tcp/ip comparison
15/44
OSI Transport LayerOSI Transport Layer
Transport Layer protocols includeTransport Layer protocols include
the capability to acknowledge thethe capability to acknowledge the
receipt of a packet; if noreceipt of a packet; if noacknowledgement is received, theacknowledgement is received, the
Transport Layer protocol canTransport Layer protocol can
retransmit the packet or time-outretransmit the packet or time-outthe connection and signal an errorthe connection and signal an error
8/14/2019 osi and tcp/ip comparison
16/44
OSI Transport LayerOSI Transport Layer
Transport protocols can also markTransport protocols can also mark
packets with sequencing information sopackets with sequencing information so
that the destination system canthat the destination system canproperly order the packets if theyreproperly order the packets if theyre
received out-of-sequencereceived out-of-sequence
In addition, Transport protocols provideIn addition, Transport protocols provide
facilities for insuring the integrity offacilities for insuring the integrity ofpackets and requesting retransmissionpackets and requesting retransmission
should the packet become garbledshould the packet become garbled
when routed.when routed.
8/14/2019 osi and tcp/ip comparison
17/44
OSI Transport LayerOSI Transport Layer
Transport protocols provide theTransport protocols provide the
capability for multiple applicationcapability for multiple application
processes to access the networkprocesses to access the networkby using individual local addressesby using individual local addresses
to determine the destinationto determine the destination
process for each data streamprocess for each data stream
8/14/2019 osi and tcp/ip comparison
18/44
TCP/IP Transport LayerTCP/IP Transport Layer
Defines two standard transportDefines two standard transportprotocols: TCP and UDPprotocols: TCP and UDP
TCP implements a reliable data-TCP implements a reliable data-stream protocolstream protocol connection orientedconnection oriented
UDP implements an unreliableUDP implements an unreliabledata-streamdata-stream connectionlessconnectionless
8/14/2019 osi and tcp/ip comparison
19/44
TCP/IP Transport LayerTCP/IP Transport Layer
TCP provides reliable dataTCP provides reliable data
transmissiontransmission
UDP is useful in many applicationsUDP is useful in many applications
eg. Where data needs to beeg. Where data needs to be
broadcasted or multicastedbroadcasted or multicasted Primary difference is that UDPPrimary difference is that UDP
does not necessarily providedoes not necessarily provide
reliable data transmissionreliable data transmission
8/14/2019 osi and tcp/ip comparison
20/44
TCP/IP Transport LayerTCP/IP Transport Layer
Many programs will use a separateMany programs will use a separate
TCP connection as well as a UDPTCP connection as well as a UDP
connectionconnection
8/14/2019 osi and tcp/ip comparison
21/44
TCP/IP Transport LayerTCP/IP Transport Layer
TCP is responsible for dataTCP is responsible for data
recoveryrecovery by providing a sequence number withby providing a sequence number with
each packet that it sendseach packet that it sends
TCP requires ACKTCP requires ACK
(ackowledgement) to ensure(ackowledgement) to ensurecorrect data is receivedcorrect data is received
Packet can be retransmitted ifPacket can be retransmitted if
error detectederror detected
8/14/2019 osi and tcp/ip comparison
22/44
TCP/IP Transport LayerTCP/IP Transport Layer
Use of ACKUse of ACK
8/14/2019 osi and tcp/ip comparison
23/44
TCP/IP Transport LayerTCP/IP Transport Layer
Flow control withFlow control with WindowWindow via specifying an acceptable range ofvia specifying an acceptable range of
sequence numberssequence numbers
8/14/2019 osi and tcp/ip comparison
24/44
TCP/IP Transport LayerTCP/IP Transport Layer
TCP and UDP introduce theTCP and UDP introduce the
concept ofconcept ofportsports
Common ports and the servicesCommon ports and the servicesthat run on them:that run on them:
FTPFTP 21 and 2021 and 20 telnettelnet 2323 SMTPSMTP 2525 httphttp 8080 POP3POP3 110110
8/14/2019 osi and tcp/ip comparison
25/44
TCP/IP Transport LayerTCP/IP Transport Layer
By specifying ports and including portBy specifying ports and including port
numbers with TCP/UDP data,numbers with TCP/UDP data,
multiplexingmultiplexing is achievedis achieved Multiplexing allows multiple networkMultiplexing allows multiple network
connections to take placeconnections to take place
simultaneouslysimultaneously
The port numbers, along with theThe port numbers, along with thesource and destination addresses forsource and destination addresses for
the data, determine athe data, determine a socketsocket
8/14/2019 osi and tcp/ip comparison
26/44
Comparing Transport for bothComparing Transport for both
ModelsModels
The features of UDP and TCP defined atThe features of UDP and TCP defined atTCP/IP Transport Layer correspond toTCP/IP Transport Layer correspond tomany of the requirements of the OSImany of the requirements of the OSI
Transport Layer. There is a bit of bleedTransport Layer. There is a bit of bleedover for requirements in the sessionover for requirements in the sessionlayer of OSI since sequence numbers,layer of OSI since sequence numbers,and port values can help to allow theand port values can help to allow the
Operating System to keep track ofOperating System to keep track ofsessions, but most of the TCP and UDPsessions, but most of the TCP and UDPfunctions and specifications map to thefunctions and specifications map to theOSI Transport Layer.OSI Transport Layer.
8/14/2019 osi and tcp/ip comparison
27/44
Comparing Transport for bothComparing Transport for both
ModelsModels
The TCP/IP and OSI architecture modelsThe TCP/IP and OSI architecture modelsboth employ all connection andboth employ all connection andconnectionless models at transportconnectionless models at transportlayer. However, the internetlayer. However, the internetarchitecture refers to the two models inarchitecture refers to the two models in
TCP/IP as simply connections andTCP/IP as simply connections anddatagrams. But the OSI referencedatagrams. But the OSI reference
model, with its penchant for precisemodel, with its penchant for preciseterminology, uses the terms connection-terminology, uses the terms connection-mode and connection-oriented for themode and connection-oriented for theconnection model and the termconnection model and the term
connectionless-mode for theconnectionless-mode for the
8/14/2019 osi and tcp/ip comparison
28/44
Network vs. InternetNetwork vs. Internet
Like all the other OSI Layers, theLike all the other OSI Layers, the
network layer provides bothnetwork layer provides both
connectionless and connection-orientedconnectionless and connection-orientedservices. As for the TCP/IP architecture,services. As for the TCP/IP architecture,
the internet layer is exclusivelythe internet layer is exclusively
connectionless.connectionless.
OSI TCP / IP
Network (Layer 3) Internet
8/14/2019 osi and tcp/ip comparison
29/44
Network vs. InternetNetwork vs. Internet
X.25 Packet Level Protocol OSIsX.25 Packet Level Protocol OSIs
Connection-oriented Network ProtocolConnection-oriented Network Protocol
The CCITT standard for X.25 defines theThe CCITT standard for X.25 defines theDTE/DCE interface standard to provide accessDTE/DCE interface standard to provide access
to a packet-switched network. It is the networkto a packet-switched network. It is the network
level interface, which specifies a virtual circuitlevel interface, which specifies a virtual circuit
(VC) service. A source host must establish a(VC) service. A source host must establish a
connection (a VC) with the destination hostconnection (a VC) with the destination hostbefore data transfer can take place. Thebefore data transfer can take place. The
network attempts to deliver packets flowingnetwork attempts to deliver packets flowing
over a VC in sequence.over a VC in sequence.
8/14/2019 osi and tcp/ip comparison
30/44
Network vs. InternetNetwork vs. Internet
Connectionless Network ServiceConnectionless Network Service Both OSI and TCP/IP support aBoth OSI and TCP/IP support a
connectionless network service: OSI as anconnectionless network service: OSI as an
alternative to network connections andalternative to network connections andTCP/IP as the only way in use.TCP/IP as the only way in use.
Internetworking ProtocolsInternetworking Protocols OSIs CLNP (ISO/IEC 8473: 1993) isOSIs CLNP (ISO/IEC 8473: 1993) is
functionally identical to the Internets IPfunctionally identical to the Internets IP(RPC 791). Both CLNP and IP are best-effort-(RPC 791). Both CLNP and IP are best-effort-delivery network protocols. Bit nigglingdelivery network protocols. Bit nigglingaside, they are virtually identical. The majoraside, they are virtually identical. The majordifference between the two is that CLNPdifference between the two is that CLNP
accommodates variable-length addresses,accommodates variable-length addresses,-
8/14/2019 osi and tcp/ip comparison
31/44
Network vs. InternetNetwork vs. Internet
Internet (IP) AddressesInternet (IP) Addresses The lnternet network address is moreThe lnternet network address is more
commonly called the IP address. Itcommonly called the IP address. It
consists of 32 bits, some of which areconsists of 32 bits, some of which areallocated to a high-order network-numberallocated to a high-order network-numberpart and the remainder of which arepart and the remainder of which areallocated to a low-order host-numberallocated to a low-order host-numberpart.part.
The distribution of bits - how many form theThe distribution of bits - how many form the
network number, and how many arenetwork number, and how many aretherefore left for the host number - can betherefore left for the host number - can bedone in one of three different ways, givingdone in one of three different ways, givingthree differentthree different classesclasses of IP addressof IP address
8/14/2019 osi and tcp/ip comparison
32/44
Network vs. InternetNetwork vs. Internet
OSI Network Layer AddressingOSI Network Layer Addressing ISO/IEC and CCITT jointly administer theISO/IEC and CCITT jointly administer the
global network addressing domain. Theglobal network addressing domain. The
initial hierarchical decomposition of theinitial hierarchical decomposition of theNSAP address is defined by (ISO/IEC 8348).NSAP address is defined by (ISO/IEC 8348).
The standard specifies the syntax and theThe standard specifies the syntax and theallowable values for the high-order part ofallowable values for the high-order part ofthe address - the Initial Domain Part (IDP),the address - the Initial Domain Part (IDP),
which consists of the Authority and Formatwhich consists of the Authority and FormatIdentifier (AFI) and the Initial DomainIdentifier (AFI) and the Initial DomainIdentifier (IDI) - but specifically eschewsIdentifier (IDI) - but specifically eschewsconstraints on or recommendationsconstraints on or recommendationsconcerning the syntax or semantics of theconcerning the syntax or semantics of thedomain specific part (DSP).domain specific part (DSP).
8/14/2019 osi and tcp/ip comparison
33/44
Network vs. InternetNetwork vs. Internet
OSI Routing ArchitectureOSI Routing Architecture End systems (ESs) and intermediateEnd systems (ESs) and intermediate
systems (ISs) use routing protocols tosystems (ISs) use routing protocols to
distribute (advertise) some or all of thedistribute (advertise) some or all of theinformation stored in their locallyinformation stored in their locallymaintained routing information base. ESsmaintained routing information base. ESsand ISs send and receive these routingand ISs send and receive these routingupdates and use the information that theyupdates and use the information that they
contain (and information that may becontain (and information that may beavailable from the local environment, suchavailable from the local environment, suchas information entered manually by anas information entered manually by anoperator) to modify their routing informationoperator) to modify their routing informationbase.base.
8/14/2019 osi and tcp/ip comparison
34/44
Network vs. InternetNetwork vs. Internet
TCP/IP Routing ArchitectureTCP/IP Routing Architecture The TCP/IP routing architecture looks veryThe TCP/IP routing architecture looks very
much like the OSI routing architecture.much like the OSI routing architecture.
Hosts use a discovery protocol to obtain theHosts use a discovery protocol to obtain theidentification of gateways and other hostsidentification of gateways and other hostsattached to the same network (subnetwork).attached to the same network (subnetwork).Gateways within autonomous systemsGateways within autonomous systems(routing domains) operate an interior(routing domains) operate an interior
gateway protocol (intradomain IS-IS routinggateway protocol (intradomain IS-IS routingprotocol), and between autonomousprotocol), and between autonomoussystems, they operate exterior or bordersystems, they operate exterior or bordergateway protocols (interdomain routinggateway protocols (interdomain routingprotocols). The details are different but theprotocols). The details are different but theprinciples are the same.principles are the same.
8/14/2019 osi and tcp/ip comparison
35/44
Data link / Physical vs.Data link / Physical vs.
SubnetSubnet
Data link layerData link layer The function of theData Link Layeris provides for the control of
the physical layer, and detects and possibly corrects errors which
may occur (IOS/IEC 7498:1984). In another words, the DataLink Layer transforms a stream of raw bits (0s and 1s) from the
physical into a data frame and provides an error-free transfer fromone node to another, allowing the layers above it to assumevirtually error-free transmission
OSI TCP / IP
Data Link (Layer 2)
Subnet
Physical (Layer 1)
8/14/2019 osi and tcp/ip comparison
36/44
Data link / Physical vs.Data link / Physical vs.
SubnetSubnet
Physical layerPhysical layer
The function of thePhysical Layeris to provide
mechanical, electrical, functional, and procedural
means to activate a physical connection for bit
transmission (ISO/IEC 7498:1984). Basically, this
means that the typical role of the physical layer is to
transform bits in a computer system into
electromagnetic (or equivalent) signals for a particulartransmission medium (wire, fiber, ether, etc.)
8/14/2019 osi and tcp/ip comparison
37/44
Data link / Physical vs.Data link / Physical vs.
SubnetSubnet
Comparing to TCP/IPComparing to TCP/IP
These 2 layers of the OSI correspond directly to the subnet layerof the TCP/IP model.
Majority of the time, the lower layers below the Interface or
Network layer of the TCP/IP model are seldom or rarely
discussed. The TCP/IP model does nothing but to high light thefact the host has to connect to the network using some protocol so
it can send IP packets over it. Because the protocol used is not
defines, it will vary from host to host and network to network
8/14/2019 osi and tcp/ip comparison
38/44
Data link / Physical vs.Data link / Physical vs.
SubnetSubnet
Comparing to TCP/IPComparing to TCP/IP After much deliberation by organizations, it was
decided that the Network Interface Layer in the TCP/IP
model corresponds to a combination of the OSI DataLink Layer and network specific functions of the OSInetwork layer (eg IEEE 203.3).
Since these two layers deal with functions that are soinherently specific to each individual networkingtechnology, the layering principle of grouping themtogether related functions is largely irrelevant.
8/14/2019 osi and tcp/ip comparison
39/44
General ComparisonGeneral Comparison
Focus of Reliability ControlFocus of Reliability Control
Roles of Host SystemRoles of Host System
De-jure vs. De-factoDe-jure vs. De-facto
8/14/2019 osi and tcp/ip comparison
40/44
Focus of Reliability ControlFocus of Reliability Control
Implementation of the OSI model places emphasisImplementation of the OSI model places emphasison providing a reliable data transfer service, whileon providing a reliable data transfer service, whilethe TCP/IP model treats reliability as an end-to-endthe TCP/IP model treats reliability as an end-to-end
problem.problem. Each layer of the OSI model detects and handlesEach layer of the OSI model detects and handles
errors, all data transmitted includes checksums.errors, all data transmitted includes checksums.The transport layer of the OSI model checksThe transport layer of the OSI model checks
source-to-destination reliability.source-to-destination reliability. In the TCP/IP model, reliability control isIn the TCP/IP model, reliability control is
concentrated at the transport layer. The transportconcentrated at the transport layer. The transportlayer handles all error detection and recovery. Thelayer handles all error detection and recovery. The
TCP/IP transport layer uses checksums,TCP/IP transport layer uses checksums,
acknowledgments, and timeouts to controlacknowledgments, and timeouts to control- -- -
8/14/2019 osi and tcp/ip comparison
41/44
Roles of Host SystemRoles of Host System
Hosts on OSI implementations doHosts on OSI implementations donot handle network operationsnot handle network operations
(simple terminal), but TCP/IP hosts(simple terminal), but TCP/IP hostsparticipate in most networkparticipate in most networkprotocols. TCP/IP hosts carry outprotocols. TCP/IP hosts carry outsuch functions as end-to-endsuch functions as end-to-end
verification, routing, and networkverification, routing, and networkcontrol. The TCP/IP internet can becontrol. The TCP/IP internet can beviewed as a data stream deliveryviewed as a data stream deliverysystem involving intelligent hosts.system involving intelligent hosts.
8/14/2019 osi and tcp/ip comparison
42/44
De-jure vs. De-facto (OSI)De-jure vs. De-facto (OSI)
OSIOSI Standard legislated by official recognized body. (ISO)Standard legislated by official recognized body. (ISO) The OSI reference model was devisedThe OSI reference model was devised beforebefore the protocolsthe protocols
were invented. This ordering means that the model waswere invented. This ordering means that the model wasnot biased toward one particular set of protocols, whichnot biased toward one particular set of protocols, whichmade it quite general. The down side of this ordering ismade it quite general. The down side of this ordering isthat the designers did not have much experience with thethat the designers did not have much experience with thesubject and did not have a good idea of whichsubject and did not have a good idea of whichfunctionality to put in which layer.functionality to put in which layer.
Being general,the protocols in the OSI model are betterBeing general,the protocols in the OSI model are betterhidden than in the TCP/IP model and can be replacedhidden than in the TCP/IP model and can be replacedrelatively easily as the technology changes.relatively easily as the technology changes.
Not so widespread as compared with TCP/IP. (complex ,Not so widespread as compared with TCP/IP. (complex ,costly)costly)
More commonly used as teaching aids.More commonly used as teaching aids.
j f
8/14/2019 osi and tcp/ip comparison
43/44
De-jure vs. De-factoDe-jure vs. De-facto
(TCP/IP)(TCP/IP)
TCP/IPTCP/IP Standards adopted due to widespread use. (Internet)Standards adopted due to widespread use. (Internet) The protocols came first, and the model was reallyThe protocols came first, and the model was really
just a description of the existing protocols. There wasjust a description of the existing protocols. There wasno problem with the protocols fitting the model, butno problem with the protocols fitting the model, butit is hardly possible to be use to describe otherit is hardly possible to be use to describe othermodelsmodels..
Get the job done" orientation.Get the job done" orientation.
Over the years it has handled most challenges byOver the years it has handled most challenges by
growing to meet the needs.growing to meet the needs. More popular standard for internetworking forMore popular standard for internetworking for
several reasons :several reasons : relatively simple and robust compared to alternatives such asrelatively simple and robust compared to alternatives such as
OSIOSI available on virtually every hardware and operating systemavailable on virtually every hardware and operating system
platform (often free)platform (often free)
8/14/2019 osi and tcp/ip comparison
44/44
THANK YOUTHANK YOU