The Complete Guide with All the Basic Network Protocols

We are sure that you have heard or read in various portals about protocols such as TCP or IP. However, have you ever wondered how they actually work? Is it possible to use them in conjunction with other protocols? This guide will help you clarify those questions and give you the essential knowledge to start building solid networking knowledge.

Basic protocols in networks

If you are interested in computer security or want to dedicate yourself to the world of telecommunications networks, it is essential to have a clear understanding of the fundamentals of the main protocols that currently exist. In turn, it will allow you to understand much more easily the way in which the different types of communication are established through local networks and also the Internet.

network protocols

Network protocols are a set of rules that govern communication between devices that are connected to a network. These rules are made up of instructions that allow devices to identify and connect to each other, in addition to applying formatting rules, so that messages travel properly from start to finish. These formatting rules determine if the data is received correctly or if it is rejected or there has been some type of problem in the transfer of information.

When the communication between computers connected to the same network is carried out, the data is divided into smaller data packets, usually having a length of 1500 bytes, since it is the typical MTU (Maximum Transfer Unit) that is usually used in the networks. However, professional local networks use a MTU of 9000 bytes or higher, they are known as Jumbo Frames, this allows optimizing the maximum data transfer since fewer headers that also have a certain size are going to be transferred. Of course, once we have broken the data into smaller packages, upon reaching the recipient, it is necessary to reassemble them and then pass them on to the application layer.

Media access layer protocols

ARP (Address Resolution Protocol)

The ARP protocol for IPv4 networks is one of the fundamental protocols of the Internet and local networks. This protocol also works in conjunction with the IP protocol to map IP addresses relative to the hardware addresses used by a data link protocol. These hardware addresses are called MAC addresses . These addresses serve as the identification code for each of the device’s network interfaces. ARP operates between the network layer and the medium access layer (if we consider the TCP / IP model). This protocol is applied when using the IP over Ethernet protocol.

Network layer protocols

Internet Protocol (IP)

Internet protocols are a set of rules that determine how data is transmitted over the network. The IP protocol is a standard with specifications regarding how connected devices on the Internet should work. For a couple of reasons: addressing and routing .

Addressing is about ensuring that any device connected to a certain network has a unique IP address . Thus, the origin and destination of the data in transit will be known. On the other hand, routing determines the path by which traffic must transit based on the IP address. The routing task is done through the routers, not only the one we have in our home, but the operators routers. In turn, various protocols interact with IP to enable communication on any network.

Internet Control Message Protocol (ICMP)

This protocol supports the error control process. This is so since the IP protocol, by default, does not have a mechanism for managing errors in general. ICMP is used for error reporting and management queries. It is a protocol used by devices such as routers to send error messages and information related to operations. For example, you can report that the requested service is not available or that a host or router could not be reached / located. This protocol sits just above the IP protocol at the TCP / IP protocol layer.

Transport layer protocols

Transmission Control Protocol (TCP)

TCP is IP’s ally in ensuring that data is properly transmitted over the Internet. Its main function is to ensure that traffic reaches its destination in a reliable way. This reliability feature cannot be achieved solely through IP. Other TCP functions are:

  • That data packets are not lost.
  • Control of the order of the data packets.
  • Control of a possible saturation that will be experienced.
  • Package duplication prevention.

User Datagram Protocol (UDP)

Unlike the TCP protocol, UDP is not as reliable. This does not have the possibility of making revisions in search of errors or corrections of data transmissions. However, there are certain applications where UDP is more feasible to use than TCP. An example of this is an online gaming session, where UDP allows data packets to be dropped without the possibility of retries.

The downside is that this protocol is not recommended for data transfer. Since if some packets are lost during the transfer process, the end result is that the file gets corrupted, and the upper layers (application layer) have to make the request so that the datagram is sent again. A corrupt file cannot be used for the purpose for which it was sent. Likewise, for this scenario of online games or video streaming sessions, UDP is the recommended protocol because it is faster since it does not have to do the typical handshake. These are some example of the difference between tcp vs udp.

We recommend you visit our complete article on TCP vs UDP where you will find the main differences between them, and why the two are important.

Application layer protocols

Hypertext Transfer Protocol (HTTP)

It is the protocol that allows browsers and web servers to communicate properly. This is used by web browsers to request HTML files from remote servers. Thus, users will be able to interact with said files by viewing web pages that have images, music, videos, text, etc.

The HTTP protocol is based on TCP, which implements a client-server communication model. There are three types of messages that HTTP uses:

  • HTTP GET: A message is sent to the server that contains a URL with or without parameters. The server responds by returning a web page to the browser, which is visible to the requesting user.
  • HTTP POST: A message is sent to the server containing data in the “body” section of the request. This is done to avoid sending data through the URL itself. Just like with HTTP GET.
  • HTTP HEAD: Here the emphasis is on the response from the server. This message restricts what the server responds to only responding with the header information.

We must not forget the HTTPS protocol, which provides us with point-to-point security (between the client and the web server). The HTTPS protocol uses the TLS (Transport Layer Security) protocol which also uses TCP over the top.

Domain Name System (DNS)

It is the service in charge of translating / interpreting domain names into IP addresses. Remember that domain names are made up of alphabetical characters (letters), which are easier to remember. For the user, it is easier to remember a name than a numeric series of a certain length. However, the Internet generally works largely through IP addresses. As long as you enter a domain name in your browser, a DNS service receives that information to interpret it and allow the display of the desired web page.

Keep in mind that when we contract an Internet service, it provides connectivity through its own DNS servers. However, it is possible to choose alternative DNS both to connect from the computer and our mobile. Not sure what the best alternatives are? Take a look at the alternative DNS guide for the computer and this other guide for the mobile . We also recommend visiting the best DNS over TLS (DoT) and DNS over HTTPS (DoH) servers to have security and privacy when browsing the Internet.

File Transfer Protocol (FTP)

The FTP protocol is used to share files between two computers. Just like the HTTP protocol, FTP implements the client-server model. In order for FTP to run, the FTP client must be launched and connected to a remote server that has software with the same protocol. Once the connection is established, the chosen files must be downloaded from the FTP server. In this article we have talked about FTP and FTPES servers (the secure version) for Windows , we have also talked about the best FTP and FTPES servers for Linux , and we have even recommended a large number of FTP clients including a complete FilleZilla Client tutorial .

On the other hand, the TFTP protocol was designed for devices with less capacity. Its abbreviations correspond to Trivial File Transfer Protocol . It provides a basic use that contains only elementary FTP operations. This protocol is usually used to load firmwares on routers and manageable switches, since it is a very simple communication protocol.

The protocols that we will mention next, also interact with IP and TCP. One of the reasons for being in the corporate world is email. Day after day, messages come to us, we respond to them, and that cycle repeats itself a large number of times. However, do we have any idea how the connections are carried out? How is it possible to view the emails and, in turn, keep a copy of them on our computer? We tell you about it:

Post-Office Protocol Version 3 (POP3)

It is a standard Internet protocol used by different email clients. It is used to be able to receive emails from a remote server through a TCP / IP connection. Making a bit of history, POP3 was first conceived in 1984 and has become one of the most popular. It is used by almost all known email clients, it is simple to configure, operate and maintain.

In most cases, email servers are offered and hosted by ISPs. If so, said provider must provide you with the data in order to correctly configure your email client. Apart from viewing the messages, it is possible to download a copy of them and keep them on our computer. Once the messages are downloaded, they already disappear from the remote server. However, there are cases where users configure emails to remain on the server for a specified period of time.

The TCP port number normally used by POP3 is 110 . If encrypted communication is available, users can choose to connect using the STLS (Secure TLS) command, or using POP3S (Secure POP3) . The latter can use TLS or SSL on TCP port 995 to connect to the mail server.

Internet Message Access Protocol ( IMAP)

It is a standard for accessing emails hosted on a web server, through a local email client. To establish communication connections, use the TCP transport layer protocol. Which allows the use of a remote email server. Now the port used for IMAP is 143 . It has similar features and utilities to POP3.

An important consideration is that IMAP is protocol for remote file servers, unlike those that use the POP3 protocol, which allows the storage of such messages. In other words, thanks to IMAP, email messages are kept on the server until the user decides to delete them . On the other hand, this protocol allows the administration of a single email account by more than one client.

When a user requests access to an email message, the request is routed through a central server. Some of the benefits of the IMAP protocol consist of the possibility of deleting messages from the server and searching by keywords among the messages found in our mailbox. Therefore, you can create and manage multiple mailboxes and / or folders, and the display of message previews.

Simple Mail Transfer Protocol (SMTP)

This protocol, as well as those mentioned above, is considered one of the most valuable services on the Internet. Most of the systems that work through the Internet use SMTP as a method to send / transfer emails.

The client who wants to send an email establishes a TCP connection to the SMTP server. Then send the message through that connection. The server is always in listening mode. As soon as a TCP connection is echoed, the SMTP process initiates a connection through its assigned port, which is number 25. Once a TCP connection has been successfully established, the client automatically sends the email.

We can come up with two SMTP operating schemes:

  • End-to-End Method
  • Store-and-forward method

Firstly, the End-to-End method is used for communication between different organizations. On the other hand, the Storage and Shipping method is used for communications between hosts that are in the same organization. An SMTP client who wants to send an email message will establish a contact with their destination in order to send the message. The SMTP server will keep the copy of the email message until it has reached its destination.