Unit-3 Iot
Unit-3 Iot
What is TCP?
Transmission Control Protocol (TCP) is connection-oriented,
meaning once a connection has been established, data can be
transmitted in two directions. TCP has built-in systems to check for
errors and to guarantee data will be delivered in the order it was
sent, making it the perfect protocol for transferring information like
still images, data files, and web pages.
Features of TCP
The following are the features of the TCP:
Data delivery
TCP protocol ensures that the data is received correctly, no data is
missing and in order. If TCP protocol is not used, then the incorrect
data can be received or out of order. For example, if we try to view
the web page or download a file without using TCP, then some data
or images could be missing.
Protocol
TCP is a connection-oriented protocol. Through the
word connection-oriented, we understand that the computers
first establish a connection and then do the communication.
This is done by using a three-way handshake. In a three-way
handshake, the first sender sends the SYN message to the
receiver then the receiver sends back the SYN ACK message to
confirm that the message has been received. After receiving
the SYN ACK message, the sender sends the acknowledgment
message to the receiver. In this way, the connection is
established between the computers. Once the connection is
established, the data will be delivered. This protocol guarantees
the data delivery means that if the data is not received then the
TCP will resend the data.
What is UDP?
User Datagram Protocol (UDP) is a simpler, connectionless
Internet protocol wherein error-checking and recovery services
are not required. With UDP, there is no overhead for opening a
connection, maintaining a connection, or terminating a
connection; data is continuously sent to the recipient, whether or
not they receive it.
What is the Difference Between TCP and UDP?
TCP is a connection-oriented protocol, whereas UDP is a
connectionless protocol. A key difference between TCP and
UDP is speed, as TCP is comparatively slower than UDP.
Overall, UDP is a much faster, simpler, and efficient protocol,
however, retransmission of lost data packets is only possible
with TCP.
The reason for UDP’s superior speed over TCP is that its non-
existent ‘acknowledgement’ supports a continuous packet
stream. Since TCP connection always acknowledges a set of
packets (whether or not the connection is totally reliable), a
retransmission must occur for every negative acknowledgement
where a data packet has been lost.
Feature TCP UDP
Requires an established
Connectionless protocol
connection to transmit
with no requirements for
data (connection should
Connection status opening, maintaining, or
be closed once
terminating a
transmission is
connection
complete)
https://shevalerupali.files.wordpress.com/2020/01/iot-
protocols-and-security.pdf