TCP/IP Model
TCP/IP Model
Here, hierarchical means that each upper-layer protocol is supported by two or more
lower-level protocols.
Internet Layer
o An internet layer is the second layer of the TCP/IP model.
o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network, and
they arrive at the destination irrespective of the route they take.
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the
entire TCP/IP suite.
ICMP Protocol
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.
The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
Application Layer
o An application layer is the topmost layer in the TCP/IP model.
o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application
layer, it forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be placed
inside the application layer except those who interact with the communication system.
For example: text editor cannot be considered in application layer while web browser
using HTTP protocol to interact with the network where HTTP protocol is an application
layer protocol.
OSI model has been developed by ISO (International It was developed by ARPANET (Advanced
Standard Organization). Research Project Agency Network).
It is an independent standard and generic protocol It consists of standard protocols that lead to
used as a communication gateway between the the development of an internet. It is a
network and the end user. communication protocol that provides the
connection among the hosts.
In the OSI model, the transport layer provides a The transport layer does not provide the surety
guarantee for the delivery of the packets. for the delivery of packets. But still, we can say
that it is a reliable model.
This model is based on a vertical approach. This model is based on a horizontal approach.
In this model, the session and presentation layers In this model, the session and presentation
are separated, i.e., both the layers are different. layer are not different layers. Both layers are
included in the application layer.
It is also known as a reference model through which It is an implemented model of an OSI model.
various networks are built. For example, the TCP/IP
model is built from the OSI model. It is also referred
to as a guidance tool.
In this model, the network layer provides both The network layer provides only connectionless
connection-oriented and connectionless service. service.
Protocols in the OSI model are hidden and can be In this model, the protocol cannot be easily
easily replaced when the technology changes. replaced.
OSI model defines the services, protocols, and In the TCP/IP model, services, protocols, and
interfaces as well as provides a proper distinction interfaces are not properly separated. It is
between them. It is protocol independent. protocol dependent.
The usage of this model is very low. This model is highly used.
It provides standardization to the devices like router, It does not provide the standardization to the
motherboard, switches, and other hardware devices. devices. It provides a connection between
various computers.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection
between the local computer and remote computer in such a way that the local terminal
appears to be a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
Both the models are the logical models and having similar architectures as both the
models are constructed with the layers.
o Define standards
Both the layers have defined standards, and they also provide the framework used for
implementing the standards and devices.
Both models have simplified the troubleshooting process by breaking the complex
function into simpler components.
o Pre-defined standards
The standards and protocols which are already pre-defined; these models do not
redefine them; they just reference or use them. For example, the Ethernet standards
were already defined by the IEEE before the development of these models; instead of
recreating them, models have used these pre-defined standards.
The function which is performed between the 'presentation' and the 'network' layer is
similar to the function performed at the transport layer.
What is UDP?
The UDP stands for User Datagram Protocol. Its working is similar to the TCP as it is
also used for sending and receiving the message. The main difference is that UDP is a
connectionless protocol. Here, connectionless means that no connection establishes
prior to communication. It also does not guarantee the delivery of data packets. It does
not even care whether the data has been received on the receiver's end or not, so it is
also known as the "fire-and-forget" protocol. It is also known as the "fire-and-
forget" protocol as it sends the data and does not care whether the data is received or
not. UDP is faster than TCP as it does not provide the assurance for the delivery of the
packets.
o Type of protocol
Both the protocols, i.e., TCP and UDP, are the transport layer protocol. TCP is a
connection-oriented protocol, whereas UDP is a connectionless protocol. It
means that TCP requires connection prior to the communication, but the UDP
does not require any connection.
o Reliability
TCP is a reliable protocol as it provides assurance for the delivery of the data. It
follows the acknowledgment mechanism. In this mechanism, the sender receives
the acknowledgment from the receiver and checks whether the acknowledgment
is positive or negative. If the ACK is positive means, the data has been received
successfully. If ACK is negative, then TCP will resend the data. It also follows the
flow and error control mechanism.
UDP is an unreliable protocol as it does not ensure the delivery of the data.
o Flow Control
TCP follows the flow control mechanism that ensures a large number of packets
are not sent to the receiver at the same time, while UDP does not follow the flow
control mechanism.
o Ordering
TCP uses ordering and sequencing techniques to ensure that the data packets are
received in the same order in which they are sent. On the other hand, UDP does
not follow any ordering and sequencing technique; i.e., data can be sent in any
sequence.
o Speed
Since TCP establishes a connection between a sender and receiver, performs error
checking, and also guarantees the delivery of data packets while UDP neither
creates a connection nor it guarantees the delivery of data packets, so UDP is
faster than TCP.
o Flow of data
In TCP, data can flow in both directions means that it provides the full-duplex
service. On the other hand, UDP is mainly suitable for the unidirectional flow of
data.
Let's look at the differences between the TCP and UDP in a tabular form.
TCP UDP
Full form It stands for Transmission Control It stands for User Datagram
Protocol. Protocol.
Speed TCP is slower than UDP as it performs error UDP is faster than TCP as it does
checking, flow control, and provides not guarantee the delivery of data
assurance for the delivery of packets.
Header size The size of TCP is 20 bytes. The size of the UDP is 8 bytes.
Acknowledgment TCP uses the three-way-handshake UDP does not wait for any
concept. In this concept, if the sender acknowledgment; it just sends the
receives the ACK, then the sender will send data.
the data. TCP also has the ability to resend
the lost data.
Flow control It follows the flow control mechanism in This protocol follows no such
mechanism which too many packets cannot be sent to mechanism.
the receiver at the same time.
Error checking TCP performs error checking by using a It does not perform any error
checksum. When the data is corrected, then checking, and also does not
the data is retransmitted to the receiver. resend the lost data packets.
Applications This protocol is mainly used where a secure This protocol is used where fast
and reliable communication process is communication is required and
required, like military services, web does not care about the reliability
browsing, and e-mail. like VoIP, game streaming, video
and music streaming, etc.