The concept of a network protocol?
A network protocol is a set of rules that network devices connected to each other follow when exchanging data. The protocol can be described by a program or integrated into the hardware of network equipment. At the same time, the equipment can be very different — computers, routers, modems, access points, telephones, network printers, security cameras, smart home components, and so on.
Network protocols provide access to Internet sites, online services, data warehouses, network equipment, and IP telephony.
Network resources can work interactively or in real time. Real—time resources include streaming systems, video conferencing, and IP telephony. Messengers, mail, forums, as well as applications using artificial intelligence can be classified as interactive, that is, providing collaboration. We can talk to a voice assistant, like Alice, right?
But in order for all this technological diversity of programs and computers to understand each other, we need a standard that allows network participants to somehow agree among themselves.
The OSI Model
One of the first attempts to standardize network communication was the OSI model (The Open Systems Interconnection model), proposed by the international organization ISO (International Organization for Standardization):
The model consists of seven levels, each of which solves its own problem.
The physical layer determines the method of signal transmission (electrical signals, light signals, radio).
The channel layer handles hardware addressing, which is necessary for device identification and signal delivery.
The network layer finds data transmission paths, that is, routes traffic.
The transport layer is designed for connection establishment, flow control, and data delivery.
The session layer, as the name suggests, supports connection sessions. At this level, network engineers lay down their responsibilities and application programmers come into play.
The presentation layer prepares information for user or application interaction by encoding and compressing data, if necessary.
The application layer defines the interaction between the network and the user. At this level, we send requests to Internet resources, files, and emails.
Currently, the OSI model is outdated and is now of only theoretical interest, but the principles embedded in it are part of modern models such as TCP/IP.
TCP/IP Model
The TCP/IP model is a protocol stack that provides communication and data transmission in computer networks. This model is simpler than OSI and contains only four layers.:
OSI-4 Application Layer
OSI-4 Transport Layer
OSI-3 Inter-network Layer
OSI-2 Channel Layer
For historical reasons, the level numbers are borrowed from the OSI model. It should be noted that the division of protocols into layers turned out to be very convenient, as it allowed the development of technologies for each layer independently of the others. For example, when fiber-optic networks replaced modems, coaxial cables, and twisted pair, the TCP/IP model continued to exist as if nothing had happened.
Thanks to this flexibility, the TCP/IP model has gained universal popularity and has actually become the foundation of the modern Internet.
It is important to keep in mind that the TCP/IP protocol suite includes such components of the inter-network layer as BGP (Border Gateway Protocol), which is used to route traffic between different autonomous systems, OSPF (Open Shortest Path First), which is used to build routes within one autonomous system, and ICMP (Internet Control Message Protocol), which is responsible for diagnosing network device interactions and error messages.
But the most important role for us is played by network protocols of the transport and application layers. Let’s take a closer look at them.
Network Layer Protocols
Internet Protocol (IP). It was this protocol that combined individual computers and local area networks into the world Wide Web, known to us as the modern Internet. Network addressing has become one of the basic concepts of the IP protocol, which is why the familiar IP addresses have appeared.
IP provides data transfer between any devices on the network through an arbitrary number of intermediate nodes, delivering data exactly to the specified IP address.
The IP protocol addressing system initially used 32-bit addresses, known to us as the IP of the fourth version, IPv4. However, due to the rapid development of the Internet, IPv4 addresses are currently almost exhausted, so the IPv6 protocol is gradually being introduced into modern networks, which solves the problem of lack of address space by supporting 128-bit addresses, as well as eliminating some other limitations of the fourth version.
However, despite the obvious advantages of IPv6, network administrators are in no hurry to implement this protocol for a number of reasons.
- Limited device and software support. Many older devices and software do not support IPv6.
- Migration from IPv4 to IPv6 requires significant efforts and resources. To switch to IPv6, companies must review their network infrastructure, and this is often difficult and quite costly.
- IPv4 compatibility. IPv4 is still widely used, and many companies continue to rely on it. IPv6 networks must be compatible with IPv4 to ensure a secure and smooth transition, which requires additional settings and configurations.
- No need. Some companies believe that there is no need to implement IPv6, especially if they have enough IPv4 addresses or the current network infrastructure meets the needs of the project.
However, given the depletion of IPv4 addresses and the expansion of IoT (Internet of Things) and cloud networks, IPv6 adoption is becoming increasingly necessary to ensure the growth and development of networks in the future.
Another important component of the modern Internet is the TCP protocol, which operates at the transport layer.
Transport Layer Protocols
TCP (Transmission Control Protocol). TCP runs on top of the IP protocol and is designed to control data transmission on the Internet. This is a key communication protocol in the TCP/IP model.
The main job of TCP is to provide and guarantee data transmission, which consists of splitting it into parts (segments), sending them to their destination and restoring the original information on the recipient’s side. It is important that the TCP protocol controls the transmission of data, thereby ensuring the delivery of segments.
Let’s briefly focus on the data transfer procedure.
The information transmitted over the network is a set of zeros and ones — bits. The length of such a set can be very long, so it is unprofitable to transmit all the data at once — if at least one bit is lost during transmission, all the data will have to be transmitted anew. That is why the data set intended for transmission is divided into parts and transmitted separately.
To reduce the likelihood of data loss and ensure reliable transmission, packets usually contain a checksum, which allows you to verify the integrity of the received data. The packets also include a sequence number, which indicates the order of the packets in the transmitted sequence. In case of packet loss or corruption, the recipient can request the retransmission of only that particular packet, and not the entire data set.
To ensure that data delivery can be reliably monitored, service information is added to each piece of data — the header.
The header of each segment contains the sender’s port and the recipient’s port. The delivery of each segment is monitored according to the protocol and repeated if necessary.
Since the TCP protocol runs on top of IP, another header is added to each segment containing the IP addresses of the sender and recipient.
However, in order to ensure accurate delivery to the recipient, it is necessary to know his physical address, called the MAC address (Media Access Control address). To do this, the packet is provided with additional service information containing the MAC addresses of the sender and recipient, and the end (footer) with the checksum of the packet.
This structural unit, similar to a matryoshka doll, is called a frame. It is in this form that information is transmitted through local networks from the sender to the recipient. If you wish, you can verify this personally by using one of the sniffer programs, such as Wireshark.
UDP (User Datagram Protocol). Unlike TCP, it does not guarantee the delivery of packets to the recipient, but it works faster.
The UDP transport layer protocol is used for connection-free communication. For example, if you are watching an online broadcast or listening to the radio, it is important that your player does not lag behind the broadcast, and the possible loss of individual packets is not important, right?
In UDP broadcasting, the sender simply sends data packets (datagrams), not caring whether they are delivered or whether the recipient exists at all, and not waiting for any confirmation of reception.
However, the UDP protocol still requires specifying the sender and recipient ports, the length of the datagram, and the checksum, just as TCP requires.
Application Layer Protocols
HTTP(S) (HyperText Transfer Protocol). It was originally intended for receiving hypertext documents in HTML format (HyperText Markup Language) from servers. Currently, it has actually become a universal means of interaction between Internet nodes.
The beginning of data exchange over the HTTP protocol is initiated by the recipient, for example, a web browser. The resulting document can consist of many components, such as text, markup, styles, video and audio files, scripts, and so on.
It is important that the recipient and sender exchange single messages, not a stream of data. This means that, for example, the server serving the website does not know anything about the previous request when it receives the next request, and the programmer must take care of maintaining the state on his own.
However, the flexibility of the HTTP protocol allows not only to receive hypertext documents, but also to send various data such as HTML forms, JSON, AJAX, and many others.
Remember that since HTTP is a top-level protocol, there are numerous intermediaries between the sender and the recipient: proxy servers, routers, routers, modems, and so on.
However, due to the large number of intermediate nodes, packets transmitted over the HTTP protocol can be easily intercepted. Anyone with access to any equipment involved in the exchange can read and decrypt the passing data. Therefore, an HTTP extension was created, called HTTPS (HyperText Transfer Protocol Secure, secure hypertext transfer protocol).
HTTPS provides a secure connection using the cryptographic network protocols SSL (Secure Sockets Layer) and TLS (Transport Layer Security) to encrypt data.
We strongly recommend using only the secure HTTPS protocol when visiting websites, especially when transmitting sensitive data such as usernames, passwords, addresses, payment card data, and so on. We recommend that you pay attention to the browser’s address bar, which always tells you whether your connection is secure.
SSH (Secure Shell) is another important application layer protocol. First of all, this protocol is used to manage remote operating systems and is actually the basis of network administration.
If you’ve ever set up an Internet site or network service, mounted network folders, or run commands on a remote computer, then you’re certainly already familiar with this protocol.
SSH provides a secure, cryptographically secure connection to devices on the network, allowing you to log into a remote system and execute any commands allowed by the access control system.
In addition, SSH can be used in more exotic cases, for example, for proxying Internet traffic using SSH tunnels or for port forwarding.
FTP(S) (File Transfer Protocol). This is one of the oldest application layer protocols. FTP appeared long before HTTP, but it is still used today for data exchange on the network and for remote work with files.
FTP, like HTTP, runs on top of the TCP protocol, but it opens two channels simultaneously — for data transmission and for connection control. Remote file management capabilities are limited by an FTP-specific set of commands. Basically, it’s browsing directories, creating, deleting, and transferring files.
Since the FTP protocol transmits data in clear text, it is not recommended to use it to transfer sensitive information. To enhance security, an extension of this protocol has been developed, known as FTPS (File Transfer Protocol + SSL, or FTP/SSL). As the name suggests, FTPS adds the creation of encrypted SSL or TLS sessions to the basic FTP functionality.
SFTP (Secure File Transfer Protocol). Despite its similar name, SFTP is not an extension of FTP, but runs on top of the SSH protocol of the application layer.
As a practical advantage of the SFTP protocol over FTPS, there is no need to install any additional programs on the server – the SSH service supports all the necessary functionality out of the box.
(S)RTP (Real-time Transfer Protocol). It is used when broadcasting video and audio streams. The RTP application layer protocol has been designed to provide minimal delay in playback. This may be important, for example, in video/audio chats, video surveillance systems, or VoIP Internet telephony, where a significant lag in the image or sound from the original is unacceptable.
RTP allows you to transfer data to multiple recipients simultaneously using multicast over IP (IP multicast). These capabilities have allowed the RTP protocol to actually become the standard for transmitting multimedia data over IP networks.
To ensure secure data transfer, a version of the SRTP protocol (Secure Real-time Transport Protocol) is used, which extends RTP with a set of protection mechanisms.
The most well—known technology using the RTP protocol (SRTP) is WebRTC (Web Real-Time Communications, real-time network communications). WebRTC is designed to organize the direct transmission of streaming data between two browsers without using servers. Since support for this technology is included in all modern browsers, the installation of additional applications is not required. Currently, this feature is actively used, for example, when conducting webinars and videoconferences on the Internet, as well as in proctoring systems for quality control of distance learning.
An overview of the main application—level protocols would be incomplete without mentioning such important standards as IMAP(S) (Internet Message Access Protocol), an e-mail access protocol, as well as DHCP (Dynamic Host Configuration Protocol) and DNS (Domain Name System).
However, a detailed review of all currently existing protocols in one review is hardly possible — there are more than seven thousand of them in modern computer networks.
