Network Protocol

When it comes to networking, a protocol is essentially a set of rules that dictate the format and processing of data. In other words, it's like a common language that computers use to communicate. Even if the computers within a network are running different types of software and hardware, using protocols allows them to interact seamlessly.

Application Layer



 The Application Layer interface directly interacts with the application and provides common web application services. This layer is basically the highest level of an open system, which provides services directly for the application process.

A few examples of application layer protocols are :
  • Hypertext Transfer Protocol (HTTP), 
  • File Transfer Protocol (FTP), 
  • Domain Name System (DNS),
  • Simple Mail Transfer Protocol (SMTP), and 
  • Post Office Protocol (POP).

HTTP (Hyper Text Transfer Protocol)

The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, the Internet that most users interact with. It is used for transferring data between devices. HTTP belongs to the application layer (layer 7) because it puts data into a format that applications (e.g. a browser) can use directly, without further interpretation. The lower layers of the OSI model are handled by a computer's operating system, not applications.

HTTPS (Hyper Text Transfer Protocol Secure)

HTTP is an insecure protocol that can be intercepted by attackers who can read messages transmitted through it. HTTPS (HTTP Secure) was developed to address this issue by encrypting messages transmitted over the internet. This is achieved through the use of Transport Layer Security (TLS), which has replaced the outdated Secure Sockets Layer (SSL) protocol.

FTP (File Transfer Protocol)

File sharing between servers is made possible by establishing two TCP connections. One connection is for data transfer, while the other is for control. The data transfer connection is used to transfer the actual files, while the control connection is responsible for transferring control information, such as passwords. This ensures that data can still be retrieved in the event of data loss.

DNS (Domain Name System)

DNS is a database that contains a website's domain name and its corresponding IP addresses. When people want to access a website, they use the domain name, while devices use an IP address to locate the website. DNS translates the domain name into IP addresses, and these translations are stored in the DNS. DNS data is cached by servers, which is necessary to access websites. Additionally, DNS includes the DNS protocol, which is part of the IP suite and defines the specifications that DNS uses to translate and communicate.

DNS is crucial because it provides users with information quickly and enables them to access remote hosts and resources across the internet.



SMTP (Simple Mail Transfer Protocol)

SMTP is a protocol that operates on the application layer. When a user wants to send an email, they establish a TCP connection with the SMTP server and transmit the email via the connection. The SMTP server is always available and ready to accept incoming TCP connections from any client. Upon receiving a connection request, the SMTP process creates a connection through the appropriate port. Once the connection has been established, the client can immediately send the email.


POP (Post Office Protocol)

Post Office Protocol is the primary protocol for email communication. It works by connecting to the remote email server and downloading messages to the recipient's computer through a supporting email software client that integrates POP.


TELNET

Telnet is a protocol that allows one computer to connect to another, typically a local computer. The term Telnet is short for Teletype Network. It's a standard TCP/IP protocol that's used for virtual terminal service, which is provided by ISO. The computer that initiates the connection is known as the local computer.


Transport Layer

The Transport Layer is the fourth layer from the top in the OSI Model. It provides communication services to application processes that run on different hosts. The Transport Layer receives services from the Network Layer and provides services to the Session Layer. Its services include error correction and segmenting and desegmenting data before and after it is sent on the network. Additionally, the Transport Layer provides flow control functionality and ensures that segmented data is delivered across the network in the correct sequence.

At the sender’s side: At the sender's end, the transport layer collects data from the application layer - the message - and then segments it into smaller pieces. The transport layer also adds the source and destination port numbers to the header of each segment. Finally, the transport layer sends the segmented message to the network layer.

At the receiver’s side: At the receiver's end, the transport layer gathers data from the network layer, reassembles segmented data, and reads the header to identify the port number. It then sends the message to the appropriate port in the session layer.

TCP (Transmission Control Protocol)

Transmission Control Protocol (TCP) is a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and ensure the successful delivery of data and messages over networks.

UDP (User Datagram Protocol)

The User Datagram Protocol (UDP) is a communication protocol used on the internet for transmitting time-sensitive data such as video playback or DNS lookups. Unlike other protocols, UDP does not establish a connection before data transfer, which makes it faster. However, this also means that packets may get lost during transmission, creating opportunities for distributed denial-of-service (DDoS) attacks.


Network Layer Protocol

The network layer serves two main purposes. Firstly, it breaks down segments into network packets and then reassembles them on the receiving end. Secondly, it routes packets across a physical network by identifying the best path. To achieve this, the network layer employs logical network addresses, typically Internet Protocol (IP) addresses, to forward packets to a destination node.

ARP (Address Resolution Protocol)

The Address Resolution Protocol (ARP) is responsible for converting a logical address, or IP address, to a physical address, or MAC address. When a host on a network needs to know the physical address of another host on the same network, it sends an ARP query packet that includes the IP and MAC addresses of the requesting host, as well as the IP address of the destination host. This query packet is broadcast across the network and received by all hosts there. However, only the intended recipient recognizes its own IP address in the request and responds with its physical address.




RARP (Reverse Address Resolution Protocol)


The Reverse Address Resolution Protocol (RARP) is a protocol used by a physical machine in a local area network (LAN) to request its IP address. To do this, the device sends its physical address to a specialized RARP server that is on the same LAN and actively listening for RARP requests.




ICMP (Internet Layer Protocol)

Internet Control Message Protocol (ICMP) is a network diagnostic and error reporting protocol. It is a part of the IP protocol suite, which uses IP as a carrier protocol. When an ICMP packet is constructed, it is enclosed in an IP packet. Like IP, ICMP is a best-effort non-reliable protocol. ICMP is an essential network layer protocol that helps to diagnose and report errors.



IGMP (Internet Layer Protocol)

IGMP stands for Internet Group Management Protocol. It is a protocol used for multicasting communication that efficiently uses resources to broadcast message and data packets. Hosts and nearby routers use IGMP to communicate with IP networks through multicasting. Streaming media, games, and web conferencing tools can utilize IGMP for multicasting communication since it allows multiple senders and receivers to communicate simultaneously.



IP (Internet Protocol)

The Internet Protocol (IP) is a set of rules that governs how data packets are addressed and routed across networks. To ensure that data arrives at the intended destination, it is divided into smaller pieces called packets, and IP information is attached to each packet. This information helps routers to send packets to the correct destination by directing them to the IP address attached to the packet. Every device or domain that connects to the Internet is assigned a unique IP address.



Network Access Layer

The network access layer is the lowest layer in the Internet reference model. This layer contains the protocols that the computer uses to deliver data to the other computers and devices that are attached to the network.

The protocols at this layer perform three distinct functions:
  1. They define how to use the network to transmit a frame, which is the data unit passed across the physical connection.
  2. They exchange data between the computer and the physical network.
  3. They deliver data between two devices on the same network. To deliver data on the local network, the network access layer protocols use the physical addresses of the nodes on the network. A physical address is stored in the network adapter card of a computer or other device, and it is a value that is "hardcoded" into the adapter card by the manufacturer.

Ethernet

Ethernet is a conventional technology used for connecting devices in wired local area networks (LAN) or wide area networks (WAN). It facilitates communication between devices through a protocol, which is essentially a set of rules or a common language used in network communication.

Types:
Fast Ethernet: It is an Ethernet network capable of 100 Mbit/s data transmission. It may use twisted pairs or fiber optic cables. (The earlier 10 Mbit/s Ethernet is still deployed and utilized but lacks the bandwidth required for specific network video scenarios.)

Gigabit Ethernet: Gigabit Ethernet, which might alternatively be based on twisted pair or fiber optic cable, provides a data transfer rate of one gigabit per second (1 Gbit/s) and is gaining in popularity.

10-Gigabit Ethernet: The newest iteration of Ethernet, 10 Gigabit Ethernet, offers a data throughput of 10 Gbit/s (10,000 Mbit/s) via an optic fiber or twisted pair connection.  Ethernet 10 Gbit/s is mainly utilized for backbone networks in high-end operations that demand significant data speeds.

Switch Ethernet: This network configuration includes a hub or a switch. In addition, a standard network cable is employed as opposed to a twisted pair cable. A network switch’s primary role is to transfer information/data from one device to another on the same network.

IP Address

An Internet Protocol (IP) address is a unique numerical identifier for every device or network that connects to the internet. Typically assigned by an internet service provider (ISP), an IP address is an online device address used for communicating across the internet.

Types of Ip address:

An Internet Protocol (IP) address is a unique numerical identifier assigned to every device or network that connects to the Internet. This address is typically assigned by an internet service provider (ISP) and is used to identify and communicate with devices and networks across the internet.

Static IP address: A static IP address is a fixed address that is assigned to a device and remains constant. It is commonly used for hosting websites or running servers. Having a fixed IP address enables users to easily connect their domain names to their servers, ensuring that their websites or services can be accessed all the time. Static addresses are configured either on the device itself or by the network administrator. Such IP addresses are typically provided by the user's ISP or network administrator, and usually come at an extra cost.

Dynamic IP Address: A dynamic IP address is a temporary address assigned by an ISP to a device such as a computer, smartphone, or router. These types of IP addresses are useful for providing a level of anonymity and security as they change periodically, making it harder to track a particular user or device. When a device connects to the ISP's network, it is assigned an available IP address from a pool. This address is then used for a specific duration before being returned to the pool and assigned to another device.

Classes of IP addresses

There are five classes of IP addresses in the IPv4 IP address space: A, B, C, D, and E. Each class has a specific range of IP addresses, which ultimately determines the maximum number of devices that can be connected to a network. The majority of devices on the internet use class A, B, and C IP addresses, while class D and E are reserved for special uses.



Subnetting

Subnetting involves dividing a network into smaller subnetworks, called subnets. Devices within a subnet can communicate directly, while routers connect different subnets.



Subnet Mask

A subnet mask is a 32-bit number created by setting host bits to all 0s and setting network bits to all 1s. In this way, the subnet mask separates the IP address into the network and host addresses.

The “255” address is always assigned to a broadcast address, and the “0” address is always assigned to a network address. 




Classful Routing

Classful Routing is a type of routing protocol that does not import subnet masks. In this type of routing, subnet masks are provided after the route update. It is important to note that in classful routing, the subnet mask is the same throughout and does not vary for all devices. This can be seen in the given picture. However, it is important to note that classful routing does not support VLSM (Variable Length Subnet Mask) and CIDR (Classless Inter-Domain Routing).

Classless Routing 

Classless routing is a routing protocol that imports subnet mask and uses triggered updates. It supports Variable Length Subnet Mask (VLSM) and Classless Inter-Domain Routing (CIDR). In classless routing, hello messages are used to check the status. The subnet mask is not the same for all devices and can vary, as shown in the picture below.

Variable Length Subnet Mask (VLSM)

Variable Length Subnet Mask (VLSM) is a design strategy that allows network engineers to subnet a larger network into smaller segmented pieces with varying subnet mask sizes. This method of "subnetting subnets" enables the use of multiple masks for different subnets within a single class A, B, or C network.