OSI Model TCP/IP Model
It is developed by ISO (International Standard It is developed by ARPANET (Advanced
Organization) Research Project Agency Network).
OSI model provides a clear distinction TCP/IP doesn’t have any clear distinguishing
between interfaces, services, and protocols. points between services, interfaces, and
OSI refers to Open Systems Interconnection. protocols.
OSI uses the network layer to define routing TCP refers to Transmission Control Protocol.
standards and protocols. TCP/IP uses only the Internet layer.
OSI follows a vertical approach. TCP/IP follows a horizontal approach.
OSI layers have seven layers. TCP/IP has four layers.
In the OSI model, the transport layer is only A layer of the TCP/IP model is both
connection-oriented. connection-oriented and connectionless.
In the OSI model, the data link layer and In TCP, physical and data link are both
physical are separate layers. combined as a single host-to-network layer.
Session and presentation layers are a part of There is no session and presentation layer in
the OSI model. the TCP model.
It is defined after the advent of the Internet. It is defined before the advent of the internet.
The minimum size of the OSI header is 5 The minimum header size is 20 bytes.
bytes. Characteristics TCP/IP Model
Characteristics of the OSI Model Here are the essential characteristics of the
Here are some important characteristics of the TCP/IP protocol:
OSI model:
Support for a flexible architecture
A layer should only be created where the Adding more systems to a network is easy.
definite levels of abstraction are needed. In TCP/IP, the network remains intact until the
The function of each layer should be selected source and destination machines were
as per the internationally standardized functioning properly.
protocols. TCP is a connection-oriented protocol.
The number of layers should be large so that TCP offers reliability and ensures that data
separate functions should not be put in the which arrives out of sequence should put back
same layer. At the same time, it should be into order.
small enough so that architecture doesn’t TCP allows you to implement flow control, so
become very complicated. the sender never overpowers a receiver with
In the OSI model, each layer relies on the data.
next lower layer to perform primitive functions.
Every level should able to provide services to
the next higher layer.
Changes made in one layer should not need
changes in other lavers.
KEY DIFFERENCE
OSI has 7 layers whereas TCP/IP has 4 layers.
The OSI Model is a logical and conceptual model that defines network communication used by systems open to
interconnection and communication with other systems. On the other hand, TCP/IP helps you to determine how a
specific computer should be connected to the internet and how you can be transmitted between them.
OSI header is 5 bytes whereas TCP/IP header size is 20 bytes.
OSI refers to Open Systems Interconnection whereas TCP/IP refers to Transmission Control Protocol.
OSI follows a vertical approach whereas TCP/IP follows a horizontal approach.
OSI model, the transport layer, is only connection-oriented whereas the TCP/IP model is both connection-oriented and
connectionless.
OSI model is developed by ISO (International Standard Organization), whereas TCP Model is developed by ARPANET
(Advanced Research Project Agency Network).
OSI model helps you to standardize router, switch, motherboard, and other hardware whereas TCP/IP helps you to
establish a connection between different types of computers.
Advantages of the OSI Model Advantages of TCP/IP
Here are the major benefits/pros of using the Here, are pros/benefits of using the TCP/IP
OSI model: model:
It helps you to standardize router, switch, It helps you to establish/set up a connection
motherboard, and other hardware between different types of computers.
Reduces complexity and standardizes It operates independently of the operating
interfaces system.
Facilitates modular engineering It supports many routing-protocols.
Helps you to ensure interoperable It enables the internetworking between the
technology organizations.
Helps you to accelerate the evolution TCP/IP model has a highly scalable client-
Protocols can be replaced by new protocols server architecture.
when technology changes. It can be operated independently.
Provide support for connection-oriented Supports several routing protocols.
services as well as connectionless service. It can be used to establish a connection
It is a standard model in computer between two computers.
networking.
Supports connectionless and connection- Disadvantages of TCP/IP
oriented services. Here, are few drawbacks of using the TCP/IP
It offers flexibility to adapt to various model:
types of protocols.
Disadvantages of OSI Model TCP/IP is a complicated model to set up and
Here are some cons/ drawbacks of using OSI manage.
Model: The shallow/overhead of TCP/IP is higher-
than IPX (Internetwork Packet Exchange).
Fitting of protocols is a tedious task. In this, model the transport layer does not
You can only use it as a reference model. guarantee delivery of packets.
It doesn’t define any specific protocol. Replacing protocol in TCP/IP is not easy.
In the OSI network layer model, some It has no clear separation from its services,
services are duplicated in many layers such interfaces, and protocols.
as the transport and data link layers
Layers can’t work in parallel as each layer
need to wait to obtain data from the
previous layer.
Synchronous Transmission Asynchronous Transmission
Synchronous data transmission is a data Asynchronous data transmission is a data
transfer method in which a continuous stream transfer method in which the sender and the
of data signals is accompanied by timing receiver use the flow control method.
signals. Asynchronous handler helps you to run a
Synchronous handler do not return until it process independently of sending a response
finishes processing the HTTP request for to the user.
which it is called. Users do not have to wait until sending
Users need to wait until it sending finishes completes before receiving a response from
before getting a response from the server. the server.
In this transmission method, blocks of In asynchronous transmission, the information
characters are transmitted at high- speed on should be transmitted character by character.
the transmission line. Data is sent in the form of character or byte.
It sends data in the form of blocks or frames. Asynchronous transmission method is slow.
Synchronous Transmission is fast. Asynchronous Transmission is economical.
Synchronous Transmission is costly. The time interval of transmission is random.
The time interval of transmission is constant. In asynchronous transmission, there is a gap
Synchronous Transmission does not have a between data.
gap between data. Asynchronous postback renders only needed
Synchronous postback renders the entire part of the page.
page of any postback. It requires local buffer storages at the two
It does not need any local storage at the ends of the line to assemble blocks
terminal end Asynchronous replication an ideal for projects
Synchronous replication should be performed that span across long distances and have a
when reliable and long-term storage is very minimal budget.
required. This method requires accurately synchronized
This method does not need any synchronized clocks at both ends.
clocks. You can use it in high-speed applications like
You can use it in the low-speed the Transmission of data from one computer
communication like the connection of a to another.
terminal to a computer. The voice-band channels that have a
The voice-band and broad-band channels are narrow type in the used asynchronous transfer.
mostly used in the Synchronous Advantages of Asynchronous Transmission
Transmission. Here are pros/benefits of Asynchronous
Advantages of Synchronous Transmission Transmission:
Here are the benefits/pros of Synchronous This is a highly flexible method of data
Transmission: transmission.
Synchronization between the receiver and
It helps you to transfer a large amount of transmitter is unnecessary.
data. It helps you to transmit signals from the
It offers real-time communication between sources which have different bit rates.
connected devices. The Transmission can resume as soon as
Each byte is transmitted without a gap the data byte transmission is available.
between the next byte. This mode of Transmission is easy for
It also reduces time timing errors implementation.
Disadvantages of Asynchronous Disadvantages of Synchronous Transmission
Transmission
Here are the cons/drawbacks of Synchronous
Here are cons/drawbacks of Asynchronous Transmission.
Transmission
The accuracy of the received data
In Asynchronous Transmission, additional depends on the receiver’s ability to count
bits called start and stop bits are required the received bits accurately.
to be used. The transmitter and receiver need to
The timing error may take place as it is operate simultaneously with the same
difficult to determine synchronicity. clock frequency.
It has a slower transmission rate.
May create false recognition of these bits
because of noise on the channel.
APPLICATION LAYER
Application layer is the top most layer in OSI and TCP/IP layered model. This layer exists in both layered
Models because of its significance, of interacting with user and user applications. This layer is for applications
which are involved in communication system.
A user may or may not directly interacts with the applications. Application layer is where the actual
communication is initiated and reflects. Because this layer is on the top of the layer stack, it does not serve
any other layers. Application layer takes the help of Transport and all layers below it to communicate or
transfer its data to the remote host.
When an application layer protocol wants to communicate with its peer application layer protocol on remote
host, it hands over the data or information to the Transport layer. The transport layer does the rest with the
help of all the layers below it.
There’s an ambiguity in understanding Application Layer and its protocol. Not every user application can be
put into Application Layer. except those applications which interact with the communication system. For
example, designing software or text-editor cannot be considered as application layer programs.
On the other hand, when we use a Web Browser, which is actually using Hyper Text Transfer Protocol
(HTTP) to interact with the network. HTTP is Application Layer protocol.
Another example is File Transfer Protocol, which helps a user to transfer text based or binary files across the
network. A user can use this protocol in either GUI based software like FileZilla or CuteFTP and the same
user can use FTP in Command Line mode.
Hence, irrespective of which software you use, it is the protocol which is considered at Application Layer used
by that software. DNS is a protocol which helps user application protocols such as HTTP to accomplish its
work.
There are several protocols which work for users in Application Layer. Application layer protocols can be
broadly divided into two categories:
Protocols which are used by users.For email for example, eMail.
Protocols which help and support protocols used by users.For example DNS.
Few of Application layer protocols are described below:
Domain Name System
The Domain Name System (DNS) works on Client Server model. It uses UDP protocol for transport layer
communication. DNS uses hierarchical domain based naming scheme. The DNS server is configured with
Fully Qualified Domain Names (FQDN) and email addresses mapped with their respective Internet Protocol
addresses.
A DNS server is requested with FQDN and it responds back with the IP address mapped with it. DNS uses
UDP port 53.
Simple Mail Transfer Protocol
The Simple Mail Transfer Protocol (SMTP) is used to transfer electronic mail from one user to another. This
task is done by means of email client software (User Agents) the user is using. User Agents help the user to
type and format the email and store it until internet is available. When an email is submitted to send, the
sending process is handled by Message Transfer Agent which is normally comes inbuilt in email client
software.
Message Transfer Agent uses SMTP to forward the email to another Message Transfer Agent (Server
side). While SMTP is used by end user to only send the emails, the Servers normally use SMTP to send as
well as receive emails. SMTP uses TCP port number 25 and 587.
Client software uses Internet Message Access Protocol (IMAP) or POP protocols to receive emails.
File Transfer Protocol
The File Transfer Protocol (FTP) is the most widely used protocol for file transfer over the network. FTP uses
TCP/IP for communication and it works on TCP port 21. FTP works on Client/Server Model where a client
requests file from Server and server sends requested resource back to the client.
FTP uses out-of-band controlling i.e. FTP uses TCP port 20 for exchanging controlling information and the
actual data is sent over TCP port 21.
The client requests the server for a file. When the server receives a request for a file, it opens a TCP
connection for the client and transfers the file. After the transfer is complete, the server closes the connection.
For a second file, client requests again and the server reopens a new TCP connection.
Post Office Protocol (POP)
The Post Office Protocol version 3 (POP 3) is a simple mail retrieval protocol used by User Agents (client
email software) to retrieve mails from mail server.
When a client needs to retrieve mails from server, it opens a connection with the server on TCP port 110.
User can then access his mails and download them to the local computer. POP3 works in two modes. The
most common mode the delete mode, is to delete the emails from remote server after they are downloaded to
local machines. The second mode, the keep mode, does not delete the email from mail server and gives the
user an option to access mails later on mail server.
Hyper Text Transfer Protocol (HTTP)
The Hyper Text Transfer Protocol (HTTP) is the foundation of World Wide Web. Hypertext is well organized
documentation system which uses hyperlinks to link the pages in the text documents. HTTP works on client
server model. When a user wants to access any HTTP page on the internet, the client machine at user end
initiates a TCP connection to server on port 80. When the server accepts the client request, the client is
authorized to access web pages.
To access the web pages, a client normally uses web browsers, who are responsible for initiating, maintaining,
and closing TCP connections. HTTP is a stateless protocol, which means the Server maintains no information
about earlier requests by clients.
HTTP versions
HTTP 1.0 uses non persistent HTTP. At most one object can be sent over a single TCP connection.
HTTP 1.1 uses persistent HTTP. In this version, multiple objects can be sent over a single TCP
connection.
P2P Architecture
In a P2P architecture, there is minimal (or no) reliance on dedicated servers
in data centers. Instead the application exploits direct communication between
pairs of intermittently connected hosts, called peers. The peers are not owned
by the service provider, but are instead desktops and laptops controlled by
users, with most of the peers residing in homes, universities, and offices.
Because the peers communicate without passing through a dedicated server,
the architecture is called peer-to-peer. Many of today’s most popular and
traffic-intensive applications are based on P2P architectures. These
applications include file sharing (e.g BitTorrent), peer-assisted download
acceleration (e.g. Xunlei), Internt Telephony (e.g. Skype), and IPTV (e.g.
Kankan and PPstream). The P2P architecture is illustrated in fig. 2.2(b). We
mention that some applications have hybrid architectures, combining both
client-server and P2P elements. For example, for many instant messaging
applications, servers are used to track the IP addresses of users, but user-to-
user messages are sent directly between user hosts (without passing through
intermediate servers).
One of the most compelling features of P2P architecture is their self-scalability.
For example, in a P2P file-sharing application, although each peer generates
workload by requesting files, each peer also adds service capacity to the
system by distributing files to others. P2P architectures are also cost effective,
since they normally don’t require significant server infrastructure and server
bandwidth (in contrast with client-server designs with datacenters). However,
future p2P applications face three major challenges:
1. ISP Friendly : Most residential ISPs (including DSL and cable ISPs) have
been dimensioned for “asymmetrical” bandwidth usage, that is, for much
more downstream than upstream traffic. But P2P video streaming and file
distribution applications shift upstream traffic from servers to residential
ISPs, thereby putting significant stress on the ISPs. Future P2P applications
need to be designed so that they are friendly to ISPs
2. Security : Because of their highly distributed and open nature, P2P
applications can be a challenge to secure.
3. Incentives : The success of future P2P applications also depends on
convincing users to volunteer bandwidth, storage, and computation
resources to the applications, which is the challenge of incentive design