The internet

Before we dive into understanding communication protocols, let's understand how the internet works since it is the backbone in the concept of IoT.

The internet is a global network of computers/systems connected to each other. Each system/computer has a unique Internet Protocol (IP) address as its identifier over the internet. But how exactly does one system interact with another? Through a protocol stack. It is also referred to as the Transmission Control Protocol (TCP) or IP protocol stack.

This table will help you understand TCP/IP:

Layer

Description

Application protocol

Specific to application such as FTP, email, HTTP, MQTT, Socket, and the others.

Transmission control protocol

It is a standard that defines how to establish and maintain a connection between applications so that data transmission can take place.

Internet protocol

It directs the message/packet to a specific system using an IP address.

Hardware

It converts binary data packets into network signals.

 

Let's demonstrate with the help of a diagram how the data flows between two systems over the internet. Say we want to transfer the data from computer 1 to computer 2 over the internet. Consider Figure 3.1:

Figure 3.1
  1. The data/message starts from the Application layer of the computer in the form of a data packet.
  1. Then the packet moves down to the TCP layer, where it is assigned a port. The port is important because a destination computer might have multiple applications running on different ports, so the packet transmitted from computer 1 must know the port number of the application running on computer 2 that is supposed to receive the packet.
  2. The packet arrives at the TCP layer, where it receives the IP address of the destination computer (computer 2).
  3. Now the data packet has an IP address and port number, it is ready to be sent to the destination. The Hardware layer is responsible for converting the data in text format to electrical signals, which are then transmitted to the destination over the internet through different modes such as Wi-Fi, Ethernet, and GPRS.
  4. Since the destination computer is connected to the internet, it receives the signals being converted to text format in the Hardware layer and then moves up to the IP layer, where the IP address is stripped; and then to TCP, where the port is removed from the data packet; and finally to the application layer, where the packet is received and interpreted.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.30.253