Unit-3 IOT
Unit-3 IOT
When a user requests a web page on the internet, somewhere in the world, the server processes that request and sends
back an HTML Page to that user. The server makes use of a protocol called the HTTP Protocol. The HTTP then requests
the TCP layer to set the required connection and send the HTML file.
Now, the TCP breaks the data into small packets and forwards it toward the Internet Protocol (IP) layer. The packets are
then sent to the destination through different routes.
The TCP layer in the user’s system waits for the transmission to get finished and acknowledges once all packets have
been received.
Features of TCP:
Some of the most prominent features of Transmission control protocol are mentioned below.
SSegment Numbering System: TCP keeps track of the segments being transmitted or received by assigning numbers to
each and every single one of them. A specific Byte Number is assigned to data bytes that are to be transferred while
segments are assigned sequence numbers. Acknowledgment Numbers are assigned to received segments.
Connection Oriented:It means sender and receiver are connected to each other till the completion of the process. The
order of the data is maintained i.e. order remains same before and after transmission.
FuFull Duplex:: In TCP data can be transmitted from receiver to the sender or vice – versa at the same time. It increases
efficiency of data flow between sender and receiver.
FlFlow Control: Flow control limits the rate at which a sender transfers data. This is done to ensure reliable delivery.
The receiver continually hints to the sender on how much data can be received (using a sliding window).
ErrError Control: TCP implements an error control mechanism for reliable data transfer. Error control is byte-oriented.
Segments are checked for error detection. Error Control includes – Corrupted Segment & Lost Segment Management,
Out-of-order segments, Duplicate segments, etc.
CoCongestion Control:TCP takes into account the level of congestion in the network. Congestion level is determined by
the amount of data sent by a sender.
UDP
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.
User Datagram Protocol (UDP) is a fundamental component of the internet protocol suite, playing a crucial role in
facilitating fast and efficient data transmission across networks. As a lightweight, connectionless protocol, UDP offers a
streamlined approach to sending data packets, making it an indispensable tool for applications that prioritize speed over
reliability.
UDP Header
UDP header is an fixed and simple header, while for TCP it may vary from 20 bytes to 60 bytes. The first 8 Bytes contain
all necessary header information and the remaining part consists of data. UDP port number fields are each 16 bits long,
therefore the range for port numbers is defined from 0 to 65535; port number 0 is reserved. Port numbers help to
distinguish different user requests or processes.
Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.
Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.
Length: Length is the length of UDP including the header and the data. It is a 16-bits field.
Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s complement sum of the UDP
header, the pseudo-header of information from the IP header, and the data, padded with zero octets at the end (if
necessary) to make a multiple of two octets.
Note– Unlike TCP, the Checksum calculation is not mandatory in UDP. No Error control or flow control is provided by
UDP. Hence UDP depends on IP and ICMP for error reporting. Also UDP provides port numbers so that is can
differentiate between users requests.
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
Optimal use Used by HTTPS, HTTP, SMTP, POP, Video conferencing, streaming, DNS,
FTP, etc VoIP, etc
Error checking TCP performs error checking by using It does not perform any error
a checksum. When the data is checking, and also does not resend the
corrected, then the data is lost data packets.
retransmitted to the receiver.
Applications This protocol is mainly used where a This protocol is used where fast
secure and reliable communication communication is required and does
process is required, like military not care about the reliability like VoIP,
services, web browsing, and e-mail. game streaming, video and music
streaming, etc.
M2M (Machine-to-Machine) Protocol:
M2M (Machine-to-Machine) Communication rely on various standards and protocols to ensure interoperability and
efficient data exchange between devices and systems. Some of these key standards are described below.
MQTT (Message Queuing Telemetry Transport) : It is public subscribe messaging protocol designed for IoT and
M2M applications. it operates on broker based architecture which allows devices to publish messages to central server
(i.e. broker) which later distributes those messages to other devices (subscribers) as per their requests.
CoAP (Constrained Application Protocol) : It is designed for M2M communication in constrained environments
such as low power devices and networks. it is based on REST architecture.
LwM2M (Lightweight M2M) : It is a protocol developed by Open Mobile Alliance (PMA) for M2M communication
in IoT devices. It is used to manage and control devices remotely. It can be used for firmware updates, monitoring and
configurations of devices.
HTTP (Hypertext Transfer Protocol) : It is widely used for web communication. It is used when interacting with
web based services and APIs.
DDS (Data Distribution Service) : It is a standard for real time data distribution.
AMQP (Advanced Message Queuing Protocol) : It is a messaging protocol that allows reliable message delivery
between devices and systems.
Zigbee : Low power wireless standard which works in mesh topology. It is defined in IEEE 802.15.4 standard. It is
used in home automation and industrial settings for M2M communication.
Z-wave : It is another wireless communication standard used in smart home automation and other M2M applications.
3GPP : It defines various cellular standards which include GSM, LTE and 5G etc. These standards are often used for
M2M communication.
OPC UA : It is machine to machine communication protocol used in industrial automation to enable interoperability
and data exchange between different machines and systems.
There are several more M2M standards and protocols which include Modbus, CAN, Thread, Bluetooth, LoRaWAN,
Sigfox, AMT, XMPP etc.