FTC disclaimer: This post contains affiliate links and I will be compensated if you make a purchase after clicking on my link.
A network protocol defines all the methods or conventions required to connect and communicate two or more devices in a network.
It works to identify and establish a connection between two devices to communicate and exchange data in a network.
What is a network protocol?
The network protocol is a set of rules and conventions for formatting, processing, and exchanging data over the network.
The computers or servers in a network use multiple software programs or applications.
To communicate with each other, the computers or servers need to use predefined protocol.
Network protocol acts as a language between two devices that offer seamless communication and information exchange in a network.
There are different protocols on the internet, and each protocol is defined and discussed in terms of the OSI model.
What are the layers of the OSI model?
To understand how network protocol works, it is important to know about the OSI model.
The OSI model is considered a primary architectural model for internet communication, and most of the network protocol structure is based on the OSI model.
The Open Systems Interconnection (OSI) model consists of 7 layers, and each layer represents how the internet works.
The task or group of tasks assigned to each layer works independently with the other OSI model layer.
Let suppose A and B are the two nodes of the network. Now, if the communication is happening from A to B, then how the flow of the data takes place.
A (Client side): L7 – Application => L6 – Presentation => L5 – Session => L4 – Transport => L3 – Network => L2 – Data-link => L1 – Physical.
B (receiving end or server side): L1 – Physical => L2 – Data-link => L3 – Network => L4 – Transport => L5 – Session => L6 – Presentation => L7 – Application.
If we look into the OSI model layer, we can easily divide layers into two groups: The upper and lower layers.
The upper layer consists of the Application layer, Presentation layer, and Session layer. These layers deal with the application or program installed on the computer or client-side.
The lower layer consists of the Transport layer, Network layer, Data-link layer, and Physical layer. These OSI layers deal with the transport of data from one node to another node.
OSI Layers functionality
Let’s look into each layer’s functionality, which gives a better understanding of each network protocol works in a different layer.
Application layer (Layer 7): It specifies the shared communication protocol and the user interface during communication.
Presentation layer (Layer 6): Its function is to present the data into a well-defined standard format, which should be readable and recognizable by the application.
Session layer (Layer 5): Its work establishes a connection between two processes in two different machines.
Transport layer (layer 4): Its work is to establish a connection between two machines in a network.
Network layer (layer 3): Its primary function is to transfer data packets from source to destination.
Data-link layer (layer 2): It works to provide functionality and procedure to transfer data between two nodes and detect and correct errors in the physical layer.
Physical layer (layer 1): This layer defines how the two or more devices are connected physically in a network.
Types of Network Protocol
Let’s look into the type of protocol that each layer represents.
Application layer protocol
DHCP: Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol is an automatic network configuration protocol that dynamically assigns an IP address and other network parameters to each device.
It allows the devices to communicate with other IP networks by using network services such as DNS, NTP, and any communication protocol based on UDP or TCP.
DNS: Domain Name System Protocol
Domain Name System is a hierarchically and decentralized naming system that helps translate or map hostnames to IP addresses.
DNS helps map domain names with IP addresses and convert the domain names of websites into numerical IP addresses.
FTP: File Transfer Protocol
File Transfer Protocol (FTP) is a standard network protocol for communicating and transferring files between computers over a TCP/IP network.
Moreover, FTP establishes two TCP connections parallelly: one is a control connection, and the other is a data connection.
The control connection is used to do any modification in the remote directory, while the data connection is used to send files.
HTTP: HyperText Transfer Protocol
The HyperText Transfer Protocol (HTTP) is a protocol that allows web browsers and web servers to communicate with each other.
It is based on a client-server model, which means that the request will be initiated from the client-side, usually by the web browser.
The HTTP protocol is used to exchange data in plain text, hypertext, audio, video, etc.
IMAP and IMAP4: Internet Message Access Protocol (version 4)
IMAP (Internet Message Access Protocol) is a standard email protocol used by email clients to access and manipulate data stored in a remote mail server.
The difference between IMAP and IMAP 4 is that IMAP (Previous version) is used to access email from the local server. In contrast, IMAP 4 (latest version), based on client-server protocol, can access data from an Internet server.
Unlike POP, IMAP stores all your information in the remote server, and you need to be connected to the remote server to have continual access to the email.
Moreover, deleting an email from an email client (like outlook) won’t delete the remote server’s email.
POP and POP3 (Post Office Protocol version 3)
Post Office Protocol is another standard email protocol that will receive email and held for you on the mail server.
When you read your email, it will automatically get downloaded to your computer using an email client. Further, emails are no longer maintained on the mail server.
Also, when your email is deleted locally, then it is deleted permanently. Unlike IMAP, you do not have any copy of your email on the email server.
SMTP: Simple Mail Transfer Protocol
Simple Mail Transfer Protocol is utilized to send messages to the email server. Your email client, such as Outlook, Mac OS X Mail, Eudora, uses SMTP to send messages.
Further, an email server uses an SMTP server to relay whether the correct mail server receives your messages.
Telnet: Terminal emulation protocol
Telnet is the application layer protocol that uses a command-line interface to access and communicate with remote devices or servers.
To access remote devices or servers, you need to install a Telnet client on your local machine.
The network administrator will initiate the connection by entering the host IP address. Once it gets connected, you will be presented with the virtual terminal to interact with your host.
SNMP: Simple Network Management Protocol
SNMP is an application layer protocol widely used to monitor network performance, detect network fault and, if needed, configure and troubleshoot remote devices.
In other words, SNMP is used to manage network nodes such as servers, routers, workstations, switches effectively.
SNMP basically consists of two components: Manager and agent.
A manager is a host that controls and manages agents such as routers, and it is run on the SNMP client program.
The agent’s work is to keep the information in a database, and it is run on the SNMP server program.
Presentation layer network protocols
LPP: Lightweight Presentation Protocol
Lightweight Presentation Protocol is an approach to provide streamlined support to OSI application running on TCP/IP based network for some constrained environment.
LPP was initially developed from a requirement to run the ISO Common Management Information Protocol (CMIP) in a TCP/IP-based network.
LPP is designed for a specific OSI application class, including those entities whose application context contains only an Association Control Service Element (ACSE) and a Remote Operations Service Element (ROSE). It is not applicable for entities whose application context is more extensive (e.g., contains a Reliable Transfer Service Element).
Also, a Directory Services Element (DSE) is assumed for use by the application-entity, but only in a minimal sense.
Session layer network protocols
RPC: Remote Procedure Call protocol
RPC is a request-response protocol initiated by the client, which sends a request message to the remote server, and the remote server sends a response to continue the process.
Moreover, RPC helps you request any program in the remote server without understanding the underlying network technologies.
Additionally, the communication between application program is carried out over TCP or UDP network.
Transport layer network protocols
TCP: Transmission Control Protocol
TCP (Transmission Control Protocol) is a network standard that facilitates establishing and maintaining a network conversation through which application programs can communicate with each other.
It works with the Internet Protocol (IP), which defines how computers send data packets to each other.
TCP work is to take messages from the application or server and divide them into multiple packets, further forwarded by the devices (switches, routers, security gateways) in the network.
Before sending, TCP numbers each packet and at the receiving end reassembles it before handing it to the application or server.
TCP is connection-oriented, which means that its connection is established and maintained during messages between the application or server.
UDP: User Datagram Protocol
User Datagram Protocol is a communication protocol that facilitates the exchange of messages between an application or server.
It divides the messages into packets known as a datagram and forwards them to the network devices such as switches, routers, security gateways to reach the destination server or application.
UDP is a connection-less transport layer protocol that doesn’t require reliability, flow control, or error recovery function.
UDP is fast compared to TCP and used in a situation where TCP’s reliability mechanism is not required.
Network layer protocols
IPv4: Internet Protocol version 4
Internet Protocol version 4 is a set of rules that allows devices in the network to exchange data by assigning a unique IP address to each device.
IPv4 consists of 32-bit numbers divided into four groups. Each group ranges from 0 to 255 and is separated with a decimal.
Moreover, the IP address is divided into two-part. The first section of the IP address is the network number, which identifies the network, and the remaining part is the host number, which identifies the host or computer.
IPv4 is a network layer protocol that helps route packets in a network and is responsible for successfully delivering the packets.
IPv6: Internet Protocol version 6
Internet Protocol version 6 is the modified version of IPv4, enabling packets to be routed in the network and responsible for the packets’ successful delivery.
It was created because of IPv4 exhaustion and increase the IP address size from 32-bits to 128-bits.
IPv6 provides better security and efficient routing of packets.
ICMP: Internet Control Message Protocol
Internet Control Message Protocol (ICMP) is a network layer protocol built-up to support the Internet Protocol Suite.
Its work is to identify and diagnose any network communication issues that mainly determine whether or not the packets are reaching the intended destination.
Further, ICMP is used in network devices such as routers, but it can also assist in DDoS (distributed denial-of-service) attacks.
Datalink layer network protocols.
ARP: Address Resolution Protocol
Address Resolution Protocol helps map dynamic Internet protocol address to a permanent physical machine address (also known as MAC address) in a local area network.
Further, ARP provides a rule to maintain a correlation between each IP address and its corresponding MAC address.
It helps in translating 32-bit IP address to 48-bit MAC address or vice versa.
SLIP: Serial Line IP
Serial Line Internet Protocol is a network layer protocol that works with TCP/IP for communication over serial ports and routers.
SLIP is replaced with Point-to-Point Protocol, which is more advanced and doesn’t require IP address configuration to establish a connection.
Moreover, SLIP is still a preferred way for the microcontroller to encapsulate IP addresses because of minimal overload.