Network Protocol
What is Network Protocol?
Network protocols are a set of rules that are responsible for the
communication of data between various devices in the network. These
protocols define guidelines and conventions for transmitting and receiving
data, ensuring efficient and reliable data communication.
The OSI Model is divided into 7 layers:
In order to reduce the design complexity, networks are organized as
stacks of layers and levels.
Each layer has its own set of functions which aids in the successful
transfer of data
Each layer passes the data to the layer immediately below or above it.
The Layers are as follows:
Layer 7: Provides standard services such as virtual terminal, file, and
Application Layer job transfer and operations.
Network DHCP: Dynamic Host Configuration Protocol
DNS: Domain Name System Protocol
FTP: File Transfer Protocol
HTTP: Hyper Text Transfer Protocol
IMAP AND IMAP4: Internet Message Access Protocol
(Version 4)
POP AND POP3: Post Office Protocol (Version 3)
SMTP: Simple Mail Transfer Protocol
TELNET: Terminal Emulation Protocol
SNMP: Simple Network Management Protocol
Layer 6: Masks the differences in data formats between dissimilar
Presentation systems.
Layer Network Encodes and decodes data, encrypts, and decrypts data,
and compresses and decompresses data.
Protocol
LPP: Lightweight Presentation Protocol
Layer 5: Manages user sessions and dialogues.
Session Layer Establishes and terminates sessions between users.
Network Protocol RPC: Remote Procedure Call protocol
Layer 4: Manages end-to-end message delivery in networks.
Transport Layer Renders reliable and sequential packet delivery through
Network Protocol error recovery and flow control mechanisms.
TCP: Transmission Control Protocol
UDP: User Datagram Protocol
It handles end-to-end communication between two nodes.
TCP- provides reliable end-to-end communication between
devices. It does this by dividing the data into small
manageable segments and sending each segments
individually. Each segments have a sequence number
attached to it. The receiving end uses the sequence
numbers to reassemble the data into correct order.
TCP also provides error checking to make sure that the
data was not corrupted during transmission.
UDP- It is similar to TCP, but it is simpler and faster. Unlike
TCP, UDP does not provide the same level of error-
checking and reliability. It simply sends packets of data
from one device to another. The receiving end is
responsible for determining whether the packets were
received correctly. If an error is detected, the receiving ed
simply discards the packet.
Layer 3: Routes packets according to unique network device
Network Layer addresses.
Protocol Renders flow and congestion control to prevent network
resource depletion.
IPv4: Internet Protocol (IPv4)
IPv6: Internet Protocol version 6
ICMP: Internet Control Message Protocol
It is responsible for routing data frames across different
networks.
Layer 2: Frames packets.
Data Link Layer Detects and corrects packet transmit errors.
Protocol ARP: Address Resolution Protocol
SLIP: Serial Line IP
it takes the raw bits from the physical layer and organizes
them into frames. It ensures that the frames are delivered
to the correct destination.
Layer 1: Interfaces between network medium and devices.
Physical Layer Defines optical, electrical, and mechanical characteristics.
Network Protocol It is responsible for transmitting raw bits of data across a
physical connection.
Layer 7: Application layer
DHCP: Dynamic Host Configuration Protocol- is a communication protocol that
enables network administrators to automate the assignment of IP addresses in a
network. In an IP network, every device connecting to the internet requires a unique
IP. DHCP lets network admins distribute IP addresses from a central point and
automatically send a new IP address when a device is plugged in from a different
place in the network. DHCP works on a client-server model.
Is a network protocol that automatically assigns IP addresses and other
network configurations parameters to devices on a network, allowing them to
communicate efficiently. (Responsible for IP address)
DNS: Domain Name System Protocol- helps in translating or mapping host
names to IP addresses. DNS works on a client-server model and uses a distributed
database over a hierarchy of name servers. (DNS, or the Domain Name System,
translates human readable domain names (for example, www.amazon.com)
to machine readable IP addresses (for example, 192.0.2.44). (Easy to
remember IP Address)
FTP- Transfer of files or FTP – This protocol is used for transferring files from
one system to the other. This works on a client-server model. When a
machine requests for file transfer from another machine, the FTO sets up a
connection between the two and authenticates each other using their ID and
Password. And, the desired file transfer takes place between the machines.
(Transferring data across the network.)
FTP uses two TCP connections i.e control connection and data connection.
Control Connection: FTP sends information like user identification and
passwords.
Data Connection: In this connection, files are sent over the network.
Ex: FileZilla Client and Server
Filezilla Client & server- The main difference between them is that a client is
for personal use, and the server allows for others to connect to it.
HTTP- HTTP (Hyper Text Transfer Protocol) (information that is uploaded on
the world wide web)
HTTP protocol is used to transfer hypertexts over the internet and it is
defined by the www (world wide web) for information transfer. This protocol
defines how the information needs to be formatted and transmitted. And, it
also defines the various actions the web browsers should take in response to
the calls made to access a particular web page. Whenever a user opens their
web browser, the user will indirectly use HTTP as this is the protocol that is
being used to share text, images, and other multimedia files on the World
Wide Web.
IMAP and IMAP4- IMAP (Internet Message Access Protocol) (access the
email across different devices or using different gadgets that you have)
is a protocol used for retrieving emails from a mail server. It allows users to
access and manage their emails on the server, rather than downloading
them to a local device. This means that the user can access their emails from
multiple devices and the emails will be synced across all devices. IMAP is
more flexible than POP3 (Post Office Protocol version 3) as it allows users to
access and organize their emails on the server, and also allows multiple
users to access the same mailbox.
POP and POP3- POP3 stands for Post Office Protocol version 3. (Lets us
access emails offline or downloaded emails.)
It has two Message Access Agents (MAAs) where one is client MAA (Message
Access Agent) and another is server MAA (Message Access Agent) for
accessing the messages from the mailbox. This protocol helps us to retrieve
and manage emails from the mailbox on the receiver mail server to the
receiver’s computer. This is implied between the receiver and the receiver
mail server.
SMTP- Simple Mail Transfer Protocol) (for queued or outgoing mails/email)
SMTP protocol is important for sending and distributing outgoing emails. This
protocol uses the header of the mail to get the email id of the receiver and
enters the mail into the queue of outgoing mail. And as soon as it delivers
the mail to the receiving email id, it removes the email from the outgoing
list. The message or the electronic mail may consider the text, video, image,
etc. It helps in setting up some communication server rules.
TELNET- TELNET (Terminal Network) (virtual terminal/pathway to the
network)
TELNET is a standard TCP/IP protocol used for virtual terminal service given
by ISO. This enables one local machine to connect with another. The
computer which is being connected is called a remote computer and which is
connecting is called the local computer. TELNET operation lets us display
anything being performed on the remote computer in the local computer.
This operates on the client/server principle. The local computer uses the
telnet client program whereas the remote computer uses the telnet server
program.
SNMP- Simple Network Management Protocol (SNMP) (used to
manage/monitor your devices)
is a networking protocol used for the management and monitoring of
network-connected devices in Internet Protocol networks.
An SNMP device is managed using the Simple Network Management
Protocol. Routers, switches, firewalls, load balancers, storage devices,
uninterruptible power supply (UPS) devices, and printers are all equipped
with SNMP.
Layer 6: PRESENTATION LAYER
LPP- Lightweight Presentation Protocol (allows you to access small
messages.)
The most common protocol for IoT devices is MQTT.
MQTT is designed to be a lightweight and power efficient protocol for IoT
applications that require low power consumption and low bandwidth usage.
It uses a publish-subscribe model, which allows devices to exchange small
messages with each other using a minimal amount of network bandwidth.
Layer5: SESSION LAYER
RPC- Remote Procedure Call (RPC) protocol (premium services)
is generally used to communicate between processes on different
workstations. However, RPC works just as well for communication between
different processes on the same workstation.
Layer4: TRANSPORT LAYER
TCP- TCP/IP (Transmission Control Protocol/ Internet Protocol) (sequence
arrangement of data/reliable data) (arrangement of messages)
In TCP/IP, the IP protocol ensures that each computer that is connected to
the Internet is having a specific serial number called the IP address. TCP
specifies how data is exchanged over the internet and how it should be
broken into IP packets. It also makes sure that the packets have information
about the source of the message data, the destination of the message data,
the sequence in which the message data should be re-assembled, and
checks if the message has been sent correctly to the specific destination.
The TCP is also known as a connection-oriented protocol.
UDP- UDP (User Datagram Protocol) (less reliable than TCP/send data but
doesn’t give guarantee about the result of the product) (example live video
streaming)
is a connectionless, unreliable transport layer protocol. Unlike TCP, it does
not establish a reliable connection between devices before transmitting data,
and it does not guarantee that data packets will be received in the order
they were sent or that they will be received at all. Instead, UDP simply sends
packets of data to a destination without any error checking or flow control.
UDP is typically used for real-time applications such as streaming video and
audio, online gaming, and VoIP (Voice over Internet Protocol) where a small
amount of lost data is acceptable and low latency is important. UDP is faster
than TCP because it has less overhead. It doesn’t need to establish a
connection, so it can send data packets immediately. It also doesn’t need to
wait for confirmation that the data was received before sending more, so it
can transmit data at a higher rate.
Layer3: NETWORK LAYER
IPv4- The fourth and initially widely used version of the Internet Protocol is
called IPv4 (Internet Protocol version 4). It is the most popular version of the
Internet Protocol and is in charge of distributing data packets throughout the
network. Maximum unique addresses for IPv4 are 4,294,967,296 (232),
which are possible due to the use of 32-bit addresses. The network address
and the host address are the two components of each address. The host
address identifies a particular device within the network, whereas the
network address identifies the network to which the host belongs. In the
“dotted decimal” notation, which is the standard for IPv4 addresses, each
octet (8 bits) of the address is represented by its decimal value and
separated by a dot (e.g. 192.168.1.1).
IPv6- The most recent version of the Internet Protocol, IPv6, was created to
address the IPv4 protocol’s drawbacks. A maximum of 4.3 billion unique
addresses are possible with IPv4’s 32-bit addresses. Contrarily, IPv6 uses
128-bit addresses, which enable a significantly greater number of unique
addresses. This is significant because IPv4 addresses were running out and
there are an increasing number of devices that require internet access.
Additionally, IPv6 offers enhanced security features like integrated
authentication and encryption as well as better support for mobile devices.
IPv6 support has spread among websites and internet service providers, and
it is anticipated to gradually displace IPv4 as the main internet protocol.
Example: Matching the hash value of both the messages for verification is
also done by IPv6.Here is an example of an IPv6 address:
2001:db8:3333:4444:5555:6666:7777:8888.
ICMP- ICMP (Internet Control Message Protocol) (used to SEND ERROR
MESSAGE) (example no internet connection, connection timeout etc.)
is a network protocol that is used to send error messages and operational
information about network conditions. It is an integral part of the Internet
Protocol (IP) suite and is used to help diagnose and troubleshoot issues with
network connectivity. ICMP messages are typically generated by network
devices, such as routers, in response to errors or exceptional conditions
encountered in forwarding a datagram. Some examples of ICMP messages
include:
Echo Request and Echo Reply (ping) - internet connection.
Destination Unreachable
Time Exceeded
Redirect
Layer2: DATA LINK LAYER
ARP- Address Resolution Protocol (ARP) (phonebook for IP address)
ARP is a protocol that helps in mapping logical addresses to the physical
addresses acknowledged in a local network. For mapping and maintaining a
correlation between these logical and physical addresses a table known as
ARP cache is used.
SLIP- (connection to the internet)
For example, a client may be connected to the Internet service provider (ISP)
with a slower SLIP line. When a service is required, the client places a
request to the ISP. The ISP responds to the request and passes it over to the
Internet via high-speed multiplexed lines.