0% found this document useful (0 votes)
8 views35 pages

CN Notes

The document provides an overview of the OSI model, which is a seven-layer framework for understanding data transmission between computers. Each layer, from the Physical Layer to the Application Layer, has specific functions and responsibilities, including data transmission, error detection, and session management. The document also discusses the flow of data through these layers and the importance of protocols at each level.

Uploaded by

Shivaraj Bhagoji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views35 pages

CN Notes

The document provides an overview of the OSI model, which is a seven-layer framework for understanding data transmission between computers. Each layer, from the Physical Layer to the Application Layer, has specific functions and responsibilities, including data transmission, error detection, and session management. The document also discusses the flow of data through these layers and the importance of protocols at each level.

Uploaded by

Shivaraj Bhagoji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Computer Networks

What is the OSI Model?


The OSI model, created in 1984 by ISO, is a reference framework that explains the process of
transmitting data between computers. It is divided into seven layers that work together to carry
out specialized network functions, allowing for a more systematic approach to networking.

What are the 7 layers of the OSI Model?

Physical Layer – Layer 1:


The lowest layer of the OSI reference model is the physical layer. It is responsible for the actual
physical connection between the devices. The physical layer contains information in the form of
bits. It is responsible for transmitting individual bits from one node to the next. When receiving
data, this layer will get the signal received and convert it into 0s and 1s and send them to the
Data Link layer, which will put the frame back together.
Data Link Layer (DLL) – Layer 2
The data link layer is responsible for the node-to-node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another, over the
physical layer. When a packet arrives in a network, it is the responsibility of the DLL to transmit
it to the Host using its MAC address.

The Data Link Layer is divided into two sublayers:

Logical Link Control (LLC)


Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending on the
frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol)


request onto the wire asking “Who has that IP address?” and the destination host will reply with
its MAC address.

Network Layer – Layer 3


The network layer works for the transmission of data from one host to the other located in
different networks. It also takes care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available. The sender & receiver’s IP addresses
are placed in the header by the network layer.

Transport Layer – Layer 4


The transport layer provides services to the application layer and takes services from the network
layer. The data in the transport layer is referred to as Segments. It is responsible for the
end-to-end delivery of the complete message. The transport layer also provides the
acknowledgment of the successful data transmission and re-transmits the data if an error is
found.

At the sender’s side: The transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow and error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards the
segmented data to the Network Layer.
Session Layer – Layer 5
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.

Presentation Layer – Layer 6


The presentation layer is also called the Translation layer. The data from the application layer is
extracted here and manipulated as per the required format to transmit over the network.

Application Layer – Layer 7


At the very top of the OSI Reference Model stack of layers, we find the Application layer which
is implemented by the network applications. These applications produce the data to be
transferred over the network. This layer also serves as a window for the application services to
access the network and for displaying the received information to the user.

Example: Application – Browsers, Skype Messenger, etc.

What is the Flow of Data in OSI Model?


When we transfer information from one device to another, it travels through 7 layers of OSI
model. First data travels down through 7 layers from the sender’s end and then climbs back 7
layers on the receiver’s end.

Let’s look at it with an Example:

Luffy sends an e-mail to his friend Zoro.

Step 1: Luffy interacts with e-mail application like Gmail, outlook, etc. Writes his email to send.
(This happens in Layer 7: Application layer)

Step 2: Mail application prepares for data transmission like encrypting data and formatting it for
transmission. (This happens in Layer 6: Presentation Layer)

Step 3: There is a connection established between the sender and receiver on the internet. (This
happens in Layer 5: Session Layer)
Step 4: Email data is broken into smaller segments. It adds sequence number and error-checking
information to maintain the reliability of the information. (This happens in Layer 4: Transport
Layer)

Step 5: Addressing of packets is done in order to find the best route for transfer. (This happens in
Layer 3: Network Layer)

Step 6: Data packets are encapsulated into frames, then MAC address is added for local devices
and then it checks for error using error detection. (This happens in Layer 2: Data Link Layer)

Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over a physical
network medium like ethernet cable or WiFi.

After the email reaches the receiver i.e. Zoro, the process will reverse and decrypt the email
content. At last, the email will be shown on Zoro’s email client.

Physical Layer

The physical layer is the first and lowest layer from the bottom of the 7-layered OSI model and
delivers security to hardware. Being the most complex layer, it is in charge of data transmission
over the physical medium.

It converts the data frame received from the data link layer into bits, i.e., in terms of ones and
zeros. It maintains the data quality by implementing the required protocols on different network
modes and maintaining the bit rate through data transfer using a wired or wireless medium.
Attributes of the physical layer:

1. Signals: The data is first converted to a signal for efficient data transmission. There are two
kinds:
- Analog Signals: These signals are continuous waveforms in nature and are represented
by continuous electromagnetic waves for the transmission of data.
- Digital Signals: These signals are discrete in nature and represent network pulses and
digital data from the upper layers.

2. Transmission media: Data is carried from source to destination with the help of transmission
media. There are two sorts of transmission media:

- Wired Media: The connection is established with the help of cables. For example, fiber
optic cables, coaxial cables, and twisted pair cables.
- Wireless Media: The connection is established using a wireless communication network.
For example, Wi-Fi, Bluetooth, etc.

3. Data Flow: It describes the rate of data flow and the transmission time frame. The factors
affecting the data flow are:
- Encoding: Encoding data for transmission on the channel.
- Error-Rate: Receiving erroneous data due to noise in transmission.
- Bandwidth: The rate of transmission of data in the channel.

4. Transmission mode: It describes the direction of the data flow. Data can be transmitted in
three sorts of transmission modes:
- Simplex mode: This mode of communication is a one-way communication where a
device can only send data. Examples are a mouse, keyboard, etc.
- Half-duplex mode: This mode of communication supports one-way communication, i.e.,
either data can be transmitted or received. An example is a walkie-talkie.
- Full-duplex mode: This mode of communication supports two-way communication, i.e.,
the device can send and receive data at the same time. An example is cellular
communication.

5. Noise in transmission: Transmitted data can get corrupted or damaged during data
transmission due to many reasons. Some of the reasons are mentioned below:
- Attenuation: It is a gradual deterioration of the network signal on the communication
channel.
- Dispersion: In the case of Dispersion, the data is dispersed and overlapped during
transmission, which leads to the loss of the original data.
- Data Delay: The transmitted data reaches the destination system outside the specified
frame time.

The physical layer performs various functions and services:

- It transfers data bit by bit or symbol by symbol.


- It performs bit synchronization, which means that only one bit needs to be transferred
from one system to another at a time. There should be no overlapping of bits during
transmission. Bit synchronization can be achieved by providing a clock.
- Bit rate control defines how many bits per second can be transmitted, i.e., the number of
bits sent per second.
- The physical layer is responsible for knowing the arrangements made between devices in
networks called physical topologies, such as mesh, ring, bus, and star.
- The transmission mode in which data is transmitted, and there are three modes of
transmitting data: full-duplex, half-duplex, and simplex.
- It is responsible for point-to-multipoint, point-to-point, or multipoint line configurations.
- It is responsible for flow control and start-stop signaling in asynchronous serial
communication.
- Signal processing of physical signals such as training sequence, pulse shaping,
equalization filtering, and others.
- It provides bit-interleaving and other channel coding.
- It is responsible for serial or parallel communication.
- It provides a standardized interface for physical transmission media, including
electrical specifications for transmission line signal levels, mechanical specifications for
electrical cables and connectors, radio interfaces, and wireless IR communication links,
IR specifications.
- The physical layer is responsible for modulation, which means the conversion of
information into radio waves by adding the data to an optical nerve signal or electrical
signal.
- This layer is responsible for circuit switching.
- This layer is concerned with auto-negotiation. Signals are mainly of two sorts, digital
signals & analog signals. The physical layer decides which signal will be used to transfer
the data from one point to another.
- It also avoids collisions between data flowing in the network due to the irretrievability of
data packets.
- It is responsible for the translation of data received from the data link layer for further
transmission.

Different Types of Topology


Data Link Layer

The data link layer is the second layer from the bottom in the OSI (Open System
Interconnection) network architecture model. It is responsible for the node-to-node delivery of
data. Its major role is to ensure error-free transmission of information. DLL is also responsible
for encoding, decode and organizing the outgoing and incoming data. This is considered the most
complex layer of the OSI model as it hides all the underlying complexities of the hardware from
the other layers above.
● The communication channel that connects the adjacent nodes is known as links, and in
order to move the datagram from source to the destination, the datagram must be moved
across an individual link.

● The main responsibility of the Data Link Layer is to transfer the datagram across an
individual link.

● The Data link layer protocol defines the format of the packet exchanged across the nodes
as well as the actions such as Error detection, retransmission, flow control, and random
access.

● The Data Link Layer protocols are Ethernet, token ring, FDDI and PPP.

● An important characteristic of a Data Link Layer is that datagrams can be handled by


different link layer protocols on different links in a path. For example, the datagram is
handled by Ethernet on the first link, PPP on the second link.
● Services provided by the Data Link Layer

● Framing & Link access: Data Link Layer protocols encapsulate each network frame
within a Link layer frame before the transmission across the link. A frame consists of a
data field in which a network layer datagram is inserted and a number of data fields. It
specifies the structure of the frame as well as a channel access protocol by which frame is
to be transmitted over the link.

● Reliable delivery: Data Link Layer provides a reliable delivery service, i.e., transmits the
network layer datagram without any error. A reliable delivery service is accomplished
with transmissions and acknowledgements. A data link layer mainly provides the reliable
delivery service over the links as they have higher error rates and they can be corrected
locally, link at which an error occurs rather than forcing to retransmit the data.

● Flow control: A receiving node can receive the frames at a faster rate than it can process
the frame. Without flow control, the receiver's buffer can overflow, and frames can get
lost. To overcome this problem, the data link layer uses the flow control to prevent the
sending node on one side of the link from overwhelming the receiving node on another
side of the link.

● Error detection: Errors can be introduced by signal attenuation and noise. Data Link
Layer protocol provides a mechanism to detect one or more errors. This is achieved by
adding error detection bits in the frame and then receiving nodes can perform an error
check.

● Error correction: Error correction is similar to the Error detection, except that the
receiving node not only detects the errors but also determines where the errors have
occurred in the frame.

● Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes can transmit the
data at the same time. In a Half-Duplex mode, only one node can transmit the data at the
same time.

Sub layers of the Data Link Layer

● Logical Link Control (LLC): This sublayer of the data link layer deals with
multiplexing, the flow of data among applications and other services, and LLC is
responsible for providing error messages and acknowledgments as well.

● Media Access Control (MAC): MAC sublayer manages the device’s interaction,
responsible for addressing frames, and also controls physical media access.
Network Layer
The network layer is a crucial layer in the OSI (Open Systems Interconnection) model
responsible for facilitating data transfer across networks. Its primary role is to handle the routing
of data packets from the source to the destination through potentially multiple intermediate nodes
(routers).

Network Layer Design Issues

Designing the network layer involves addressing several critical issues to ensure efficient,
reliable, and scalable communication between devices across different networks.

Store-and-Forward Packet Switching

● Store-and-Forward: Packets are sent from the source to the nearest router, stored until
fully received and processed, and then forwarded to the next router along the path. This
continues until the packet reaches the destination.

Services Provided to the Transport Layer

● Service Goals:
● Independence from router technology.
● Shielding transport layer from the number, type, and topology of routers.
● Uniform network addressing across LANs and WANs.
● Connection-Oriented vs. Connectionless:
● Connectionless (Datagram Service): Each packet is routed independently (e.g.,
IP).
● Connection-Oriented: A path is established before sending packets (e.g., virtual
circuits).

Implementation of Connectionless Service

● Datagram Network: Packets are routed independently. Each packet carries the full
destination address. Routers use routing tables to determine the next hop.

Implementation of Connection-Oriented Service


● Virtual Circuit Network: A path is established before data transfer. Each packet carries a
virtual circuit identifier. The route is predefined, and the same path is used for all packets
in a session.

Comparison of Virtual-Circuit and Datagram Networks

● Datagram Network:
● No setup required.
● Each packet contains the full address.
● Routers do not hold state information about connections.
● Independent packet routing.
● Virtual-Circuit Network:
● Requires setup.
● Each packet contains a short virtual circuit number.
● Routers maintain state information about each connection.
● Fixed route for all packets in a session.

Routing Algorithms

Optimality Principle

● Concept: If router B is on the optimal path from A to C, then the path from B to C is also
optimal.

Shortest Path Algorithm

● Example: Dijkstra’s Algorithm


● Function: Finds the shortest path between two nodes.

Flooding

● Definition: Sends every packet out on all outgoing lines except the one it arrived on.
● Pros/Cons: Robust but inefficient due to duplicate packets.

Distance Vector Routing

● Example: RIP (Routing Information Protocol)


● Mechanism: Routers share network distance information with neighbors.

Link State Routing

● Example: OSPF (Open Shortest Path First)


● Mechanism: Routers have a complete network map and compute shortest paths.

Hierarchical Routing

● Concept: Divides network into regions to simplify routing.


● Use Case: Large networks.

Broadcast Routing

● Function: Sends a packet to all nodes.


● Methods: Flooding, spanning tree.

Multicast Routing

● Function: Sends a packet to a specific group of nodes.


● Use Case: Efficient group communication like streaming.

Anycast Routing

● Function: Sends a packet to any one of a group of nodes, typically the closest.
● Use Case: Load distribution and optimized response times.

Quality of Service (QoS) in Computer Networks

Quality of Service (QoS) ensures predictable network performance for critical applications. It
focuses on:

1. Bandwidth: Ensuring sufficient data transfer rates.


2. Latency: Minimizing delay in packet delivery.
3. Jitter: Reducing variation in packet arrival times.
4. Packet Loss: Decreasing the number of lost packets.
5. Reliability: Maintaining consistent network performance.

QoS Techniques
1. Traffic Shaping: Controls the data flow rate to prevent congestion.
2. Priority Queuing: Assigns priority to different types of traffic.
3. Resource Reservation: Reserves bandwidth for specific applications using protocols like
RSVP.
4. Traffic Policing: Enforces data flow rules to maintain network integrity.
5. Congestion Management: Uses algorithms to manage and prevent network congestion.
6. Admission Control: Decides on accepting new traffic based on current load.

QoS in Practice

● Differentiated Services (DiffServ): Marks packets for different handling priorities.


● Integrated Services (IntServ): Reserves resources along a network path to ensure QoS.

Importance of QoS

● Real-Time Applications: Ensures smooth operation for video calls and gaming.
● Business-Critical Applications: Provides reliable performance for essential services.
● Efficient Network Utilization: Optimizes resource use and prevents congestion.

Internetworking

Internetworking is the process of connecting multiple computer networks to create a larger,


global network, such as the Internet. This involves several key concepts and components:

1. Routers: Devices that forward data packets between networks. They determine the best
path for data to travel across interconnected networks.
2. IP (Internet Protocol): The primary protocol for internetworking, defining how data
packets are addressed and routed across networks.
3. Protocols: Sets of rules that govern data communication, including TCP/IP, which is the
foundational suite for the Internet.

1. Subnetworks: Smaller, individual networks that make up a larger internetwork.


2. Routing Tables: Databases in routers that store routes to various network destinations.
3. Gateways: Nodes that serve as access points to other networks, facilitating
communication between different network architectures.
Processes

1. Packet Switching: Data is broken into packets that are routed independently across the
network and reassembled at the destination.
2. Addressing: Each device on the network has a unique IP address, enabling correct routing
of packets.
3. Routing: The process of determining the path for data to travel from the source to the
destination.

Importance of Internetworking

● Global Communication: Enables devices from different networks and locations to


communicate seamlessly.
● Scalability: Allows for the expansion and integration of new networks.
● Interoperability: Ensures diverse networks and systems can work together, facilitating
data exchange and connectivity.

Network Layer in the Internet: IPv4 and IPv6

The network layer is responsible for routing data packets across interconnected networks. It
includes protocols like IPv4 and IPv6, which provide addressing and routing functions.

IPv4 (Internet Protocol version 4)

1. Addressing:
● Uses 32-bit addresses, allowing for about 4.3 billion unique addresses.
● Address format: 192.168.0.1.
2. Header:
● Contains source and destination IP addresses.
● Includes fields for packet fragmentation and reassembly.
3. Fragmentation:
● Supports fragmentation to accommodate different maximum transmission units
(MTUs) of various networks.
4. Routing:
● Utilizes routing tables and protocols like OSPF and BGP to determine the best
path for packet delivery.
5. Limitations:
● Address exhaustion due to limited address space.
● Lacks built-in security features.
IPv6 (Internet Protocol version 6)

1. Addressing:
● Uses 128-bit addresses, providing a virtually unlimited address space.
● Address format: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
2. Header:
● Simplified compared to IPv4 for more efficient processing.
● Includes mandatory fields and optional extension headers for additional features.
3. Fragmentation:
● Performed only by the sending host, not by routers, improving efficiency and
security.
4. Routing:
● Supports improved routing protocols with hierarchical address allocation,
enhancing route aggregation and reducing the size of routing tables.
5. Features:
● Built-in support for security with IPsec.
● Improved support for mobile devices through features like auto-configuration and
neighbor discovery.
6. Transition:
● Designed to coexist with IPv4 during the transition period, using techniques like
dual-stack, tunneling, and translation mechanisms.

Transport Layer

The transport layer in computer networks is a crucial component of the networking stack
responsible for ensuring reliable and efficient communication between two devices over a
network. Its primary function is to manage end-to-end data transmission, offering services such
as segmentation, error checking, flow control, and multiplexing to enable secure and efficient
data transfer. It sits above the network layer and below the session layer and manages end-to-end
communication between devices in a network.
Working of Transport Layer:
The transport layer acts as an intermediary, receiving services from the Application layer while
providing services to the Network layer.
● On the sender's side: The transport layer takes data (messages) from the Application layer
and proceeds to segment it. It breaks down the original message into smaller segments,
incorporates the source and destination port numbers into the segment's header, and
dispatches the segmented data to the Network layer.
● On the receiver's side: The transport layer receives data from the Network layer,
reconstructs the segmented information, inspects the header to determine the port
number, and then routes the message to the proper port within the Application layer.
Transport layer services:
Transport layer protocols offer services that can be categorized into five distinct groups:

1. End-to-end delivery: In computer networking, just as the Data Link Layer relies on
MAC addresses to ensure precise frame delivery and the Network Layer uses IP
addresses for effective packet routing, the Transport Layer also depends on port numbers.
Port numbers are essential for accurately directing data segments to the appropriate
process among several concurrently running on a single host. These 16-bit addresses
serve as unique identifiers for client-server programs, ensuring that data is correctly
delivered to the intended destination process.
2. Addressing: Addressing involves the capability to establish communication with the
precise application running on a computer. This addressing procedure commonly
employs network ports to allocate distinct port numbers to both the sending and receiving
applications residing on a machine. The combination of the IP address utilised in the
network layer and the port number within the transport layer results in a unique address
for each application, ensuring precise identification and communication.
3. Reliable delivery: Reliability in the context of network data transmission refers to the
system's capability to address potential errors that may occur during data transfer. If data
undergoes unintended alterations during transit, error correction mechanisms and
checksums are in place to identify and rectify these issues. If a data packet is lost during
transmission, it is recognized, and the system initiates a retransmission process.
Furthermore, if a single packet is inadvertently duplicated, it can be detected and
subsequently discarded. Additionally, the system can transmit acknowledgments upon
successfully receiving packets to ensure guaranteed data delivery. Some protocols even
include mechanisms to notify the sender if a packet is either missing or corrupted.
4. Flow control: Flow control within the transport layer refers to its capability to prevent
the transmission of data beyond what the network can reliably handle. This involves
buffering both outgoing and incoming data until sufficient network capacity is available
for smooth transmission. In cases where the receiver's buffer reaches its capacity, the
sending rate is adjusted downward to avoid overwhelming the recipient.
5. Multiplexing: Multiplexing, often described as a many to one process, involves
consolidating data from multiple sender processes into a single packet, which includes
appropriate headers. This consolidated packet is then transmitted as a unified entity.
Multiplexing enables the concurrent utilisation of various processes on a host within a
network environment, with each process being distinguished by its unique port number.

Protocols of Transport Layer


● UDP (User Datagram Protocol)
● TCP(Transmission Control Protocol)
● SCTP (Stream Control Transmission Protocol)

UDP
● Connectionless protocol
● Unreliable protocol
● UDP stands for User Datagram Protocol.
● UDP is one of the simplest transport layer protocols which provides nonsequenced data
transmission functionality.
● UDP is considered as a connectionless transport layer protocol.
● This type of protocol is referred to be used when speed and size are more important than
reliability and security.
● It is an end-to-end transport-level protocol that adds transport-level addresses, checksum
error control, and length information to the data received from the upper layer.
● User datagram is the packet constructed by the UDP protocol

UDP Services
● Process to Process Communication
● Connectionless Service
● Fast delivery of the message
● Checksum

TCP
● Connection-oriented protocol
● Reliable protocol
● Provide error and flow control
● TCP stands for Transmission Control Protocol.
● TCP is a connection-oriented transport layer protocol.
● TCP explicitly defines connection establishment, data transfer, and connection tear-down
phases to provide connection-oriented service for data transmission.
● TCP is the most commonly used transport layer protocol.

Features of TCP Protocol:


● Stream data transfer
● Reliability
● Flow Control
● Error Control
● Multiplexing
● Logical Connections
● Full Duplex

SCTP
● SCTP stands for Stream Control Transmission Protocol.
● SCTP is one of the connection-oriented transport layer protocols.
● It allows the transmission of data between sender and receiver in full duplex mode.
● This protocol makes it simpler to build connections over a wireless network and to
control multimedia data transmission.

Features of SCTP
● Unicast with Multiple Properties
● Reliable Transmission
● Message oriented
● Multi-homing
Session Layer
The session layer is Layer 5 layer from the bottom in the OSI model. The job of the session layer
is to control and maintain connections between systems to share data. It establishes, maintains,
and ends sessions across all channels. In case of a network error, it checks the authenticity and
provides recovery options for active sessions. It manages sessions and synchronizes data flow.

Basically, this layer regulates when computers can send data and how much data they can send.
Essentially it coordinates communication between devices.

Functions of the Session Layer:

○ Session Establishment: The session layer establishes connections between devices which
are known as sessions. The session which is created allows users to share data, remote
access, and file management. When the session is released, the transport connection is
mapped. The ways in which transport connection maps are one-to-many, one-to-one, and
many-to-one.

○ Data Transfer: It is the very basic function of the session layer, which handles the
exchange of data between systems in a full-duplex or half-duplex mode of transmission.
The session layer allows only one user to transmit data in half-duplex as well as exchange
data in full-duplex mode.

○ Dialog Management: The session layer keeps log data on which connections are
established to transmit and receive data, which is called dialog management. It is
accountable for establishing, synchronizing, preserving, and ending the conversation
between the sender and the receiver. It uses a token mechanism in which the user sharing
the data is given a token in case of half duplex mode and, after the exchange, transfers it
to another device. The token method maintains the efficiency of the connection.

○ Synchronization: The session maintains proper connectivity between systems, and if any
error occurs, then it provides a recovery option which is called a known state. The session
layer adds synchronization bits to the message to use the known state in the event of an
error. These bits can be used as checkpoints. It adds synchronization points or
checkpoints to the data stream for longer communication. It ensures that the data streams
are successfully received and acknowledged up to the checkpoints. In case of any failure,
only the stream needs to be retransmitted after the checkpoints.

○ Authentication: The process of identification is known as authentication. It takes a


guarantee from the user to permit them access to the data. Authentication is very
important because it provides security.

○ Authorization: It grants privileges after authentication of the user. Authorization means


providing access to the data that is authorized to the specific user.

Protocols of the Session Layer:

The session layer offers many network protocols for the safety, security, and efficiency of
communication between devices.

Some of these protocols are discussed below:

○ RTCP: It is an abbreviation for Real-time Transport Control Protocol. It is used to


provide audio and video over the Internet. Basically, it periodically transmits control
packets to all participants in the session. It provides feedback on QoS (Quality of
Service) to all participants in the session. It is used in video conferencing, television
services, etc.
○ PPTP: It is the full form of Point-to-Point Tunneling Protocol. This is the technology
used to implement VPN. With the help of PPTP, data can be transmitted securely from
one node to another through a tunnel.

○ PAP: It is an abbreviation for Password Authentication Protocol. The point-to-point


protocol uses it to authenticate the user. It takes care of whether the user is authentic or
not and then grants access. It works in such a way that the user will enter the id and
password, then after the authentication, the server will reply with a confirmation. It is a
weak type of authentication system as it is highly vulnerable to attackers.

○ ADSP: It is an abbreviation for AppleTalk Data Stream Protocol. It is a networking


protocol that was introduced 38 years ago, in 1985, and was created for Apple Macintosh
networks. It allows users to share printers and folders for access by other network users.

Presentation Layer
The presentation layer is the 6th layer from the bottom in the OSI model. This layer presents the
incoming data from the application layer of the sender machine to the receiver machine. It
converts one format of data to another format of data if both sender and receiver understand
different formats; hence this layer is also called the translation layer. It deals with the semantics
and syntax of the data, so this layer is also called the syntax layer. It uses operations such as data
compression, data encryption & decryption, data conversion, etc.
Functions of the presentation layer:

○ Translation: Data is sent from sender to receiver, but what if the sender device and
receiver device understand different formats of code? For example, suppose one device
understands ASCII code and another device understands EBCDIC code. In that case, the
data must be translated into a code that the recipient understands to determine what data
has been sent. The presentation layer is responsible for translating ASCII codes to
EBCDIC or vice versa. With the help of the presentation layer, the receiver understands
the data effectively and uses it efficiently.

○ Encryption and Decryption: Whatever data is being transmitted between the sender and
the receiver, that data must be secure because an intruder can hack the data passing
between the sender and the receiver. Hackers can modify the data and send the modified
data to the receiver to create false communication. The presentation layer is responsible
for encrypting and decrypting data to avoid data leakage and data modification.
The plaintext data at the source is encrypted into ciphertext (unreadable format), then it is
sent to the receiver, where the ciphertext is decrypted into plaintext. Now, if the hacker
tries to hack the data, the hacker receives an encrypted, unreadable form, and if the
hacker tries to send modified data, the receiver can detect the modification during
decryption; thereby, the data remains safe.

○ Compression and Decompression: If the file size is large, it becomes difficult to transmit
the large file over the network. File size can be decreased by compressing the file for easy
transmission of data. Compression is the method of diminishing the size of a file to
transmit data easily in less time. When the compressed data reaches the receiver, the data
is reconstructed back to the original size, and this process is called decompression.

Sublayers of presentation layer in the OSI model:

The presentation layer in the OSI model is classified into two sublayers:

1. Common Application Service Element (CASE): This sublayer offers services to layer-7,
i.e., the application layer, and requests services from layer-5, i.e., the session layer. It
supports various application services, such as Reliable Transfer Service Element (RTSE),
Remote Operation Service Element (ROSE), Association Control Service Element
(ACSE), and Commitment Concurrency and Recovery (CCR).

2. Specific Application Service Element (SASE): This sublayer offers application-specific


protocols, such as Message Oriented Text Interchange Standard (MOTIS), Remote
Database Access (RDA), File Transfer Access and Manager (FTAM), Common
Management Information Protocol (CMIP), Virtual Terminal (VT), Distributed
Transaction Processing (DTP), Job Transfer and Manipulation (JTM), and others.

Protocols of the Presentation layer:

○ Independent Computing Architecture


(ICA): It is a presentation layer protocol in the
OSI model, which was formed by Citrix
Systems. It is used for transferring data from
server to client. It is a very thin protocol as it
does not require much overhead in order to
transmit data from the server over to the client.
It is well-optimized for the WAN.

○ Network Data Representation (NDR): It is the protocol that is used to implement the
presentation layer of the OSI model. It provides different kinds of data representation,
such as images, video, audio, numbers, etc. It is used for Microsoft Remote Procedure
Call (Microsoft RPC) and Distributed Computing Environment (DCE) / Remote
Procedure Calls (RPC).
○ Apple Filing Protocol (AFP): It is a communication protocol that was specifically
designed for macOS by Apple, Inc. It provides file services for Classic Mac OS and
macOS. This protocol is used to share files over the network.

The Application Layer

The Application Layer is the topmost layer in the Open System Interconnection (OSI) model.
This layer provides several ways for manipulating the data (information) which actually enables
any type of user to access the network with ease. This layer also makes a request to its bottom
layer, which is the presentation layer for receiving various types of information from it. The
Application Layer interface directly interacts with applications and provides common web
application services. This layer is basically the highest level of open system, which provides
services directly for the application process.

Functions of Application
Layer :

The Application Layer, as


discussed above, being the topmost
layer in the OSI model, performs
several kinds of functions which
are required in any kind of
application or communication
process.
Following are list of functions
which are performed by
Application Layer of OSI Model –
Data from User <=> Application
layer <=> Data from Presentation
Layer
● Application Layer provides a facility by which users can forward several emails and it
also provides a storage facility.
● This layer allows users to access, retrieve and manage files in a remote computer.
● It allows users to log on as a remote host.
● This layer provides access to global information about various services.
● This layer provides services which include: e-mail, transferring files, distributing results
to the user, directory services, network resources and so on.
● It provides protocols that allow software to send and receive information and present
meaningful data to users.
● It handles issues such as network transparency, resource allocation and so on.
● This layer serves as a window for users and application processes to access network
services.
● Application Layer is basically not a function, but it performs application layer functions.
● The application layer is actually an abstraction layer that specifies the shared protocols
and interface methods used by hosts in a communication network.
● Application Layer helps us to identify communication partners, and synchronize
communication.
● This layer allows users to interact with other software applications.
● In this layer, data is in visual form, which makes users truly understand data rather than
remembering or visualizing the data in the binary format (0’s or 1’s).
● This application layer basically interacts with the Operating System (OS) and thus further
preserves the data in a suitable manner.
● This layer also receives and preserves data from it’s previous layer, which is Presentation
Layer (which carries in itself the syntax and semantics of the information transmitted).
● The protocols which are used in this application layer depend upon what information
users wish to send or receive.
● This application layer, in general, performs host initialization followed by remote login to
hosts.

Working of Application Layer


in the OSI model :

In the OSI model, this application


layer is narrower in scope.
The application layer in the OSI model
generally acts only like the interface
which is responsible for
communicating with host-based and
user-facing applications. This is in
contrast with TCP/IP protocol, wherein
the layers below the application layer,
which is Session Layer and
Presentation layer, are clubbed together and form a simple single layer which is responsible for
performing the functions, which includes controlling the dialogues between computers,
establishing as well as maintaining as well as ending a particular session, providing data
compression and data encryption and so on.
At first, the client sends a command to the server and when the server receives that command, it
allocates the port number to the client. Thereafter, the client sends an initiation connection
request to server and when server receives request, it gives acknowledgement (ACK) to client
through client has successfully established a connection with the server and, therefore, now
client has access to server through which it may either ask server to send any types of files or
other documents or it may upload some files or documents on server itself.

Features provided by Application Layer Protocols :

To ensure smooth communication, application layer protocols are implemented the same on
source host and destination host.
The following are some of the features which are provided by Application layer protocols-

● The Application Layer protocol defines processes for both parties which are involved in
communication.
● These protocols define the type of message being sent or received from any side (either
source host or destination host).
● These protocols also define basic syntax of the message being forwarded or retrieved.
● These protocols define the way to send a message and the expected response.
● These protocols also define interaction with the next level.

Application Layer Protocols:


The application layer provides several protocols which allow any software to easily send and
receive information and present meaningful data to its users.
The following are some of the protocols which are provided by the application layer.
● TELNET: Telnet stands for Telecommunications Network. This protocol is used for
managing files over the Internet. It allows the Telnet clients to access the resources of the
Telnet server. Telnet uses port number 23.
● DNS: DNS stands for Domain Name System. The DNS service translates the domain
name (selected by user) into the corresponding IP address. For example- If you choose
the domain name as www.abcd.com, then DNS must translate it as 192.36.20.8 (random
IP address written just for understanding purposes). DNS protocol uses the port number
53.
● DHCP: DHCP stands for Dynamic Host Configuration Protocol. It provides IP addresses
to hosts. Whenever a host tries to register for an IP address with the DHCP server, DHCP
server provides lots of information to the corresponding host. DHCP uses port numbers
67 and 68.
● FTP: FTP stands for File Transfer Protocol. This protocol helps to transfer different files
from one device to another. FTP promotes sharing of files via remote computer devices
with reliable, efficient data transfer. FTP uses port number 20 for data access and port
number 21 for data control.
● SMTP: SMTP stands for Simple Mail Transfer Protocol. It is used to transfer electronic
mail from one user to another user. SMTP is used by end users to send emails with ease.
SMTP uses port numbers 25 and 587.
● HTTP: HTTP stands for HyperText Transfer Protocol. It is the foundation of the World
Wide Web (WWW). HTTP works on the client server model. This protocol is used for
transmitting hypermedia documents like HTML. This protocol was designed particularly
for the communications between the web browsers and web servers, but this protocol can
also be used for several other purposes. HTTP is a stateless protocol (network protocol in
which a client sends requests to server and server responses back as per the given state),
which means the server is not responsible for maintaining the previous client’s requests.
HTTP uses port number 80.
● NFS: NFS stands for Network File System. This protocol allows remote hosts to mount
files over a network and interact with those file systems as though they are mounted
locally. NFS uses the port number 2049.
● SNMP: SNMP stands for Simple Network Management Protocol. This protocol gathers
data by polling the devices from the network to the management station at fixed or
random intervals, requiring them to disclose certain information. SNMP uses port
numbers 161 (TCP) and 162 (UDP).

TCP/IP Model
TCP/IP was designed and developed by the Department of Defense (DoD) in the 1960s and is
based on standard protocols. It stands for Transmission Control Protocol/Internet Protocol. The
TCP/IP model is a concise version of the OSI model. It contains four layers, unlike the seven
layers in the OSI model.
The number of layers is sometimes referred to as five or four. Here In this article, we’ll study
five layers. The Physical Layer and Data Link Layer are referred to as one single layer as the
‘Physical Layer’ or ‘Network Interface Layer’ in the 4-layer reference.
What Does TCP/IP Do?
The main work of TCP/IP is to transfer the data of a computer from one device to another. The
main condition of this process is to make data reliable and accurate so that the receiver will
receive the same information which is sent by the sender. To ensure that each message reaches its
final destination accurately, the TCP/IP model divides its data into packets and combines them at
the other end, which helps in maintaining the accuracy of the data while transferring from one
end to another end.
What is the Difference between TCP and IP?
TCP and IP are different protocols of Computer Networks. The basic difference between TCP
(Transmission Control Protocol) and IP (Internet Protocol) is in the transmission of data. In
simple words, IP finds the destination of the mail and TCP has the work to send and receive the
mail. UDP is another protocol, which does not require IP to communicate with another computer.
IP is required by only TCP. This is the basic difference between TCP and IP.
How Does the TCP/IP Model Work?
Whenever we want to send something over the internet using the TCP/IP Model, the TCP/IP
Model divides the data into packets at the sender’s end and the same packets have to be
recombined at the receiver’s end to form the same data, and this thing happens to maintain the
accuracy of the data. TCP/IP model divides the data into a 4-layer procedure, where the data first
go into this layer in one order and again in reverse order to get organised in the same way at the
receiver’s end.
For more, you can refer to TCP/IP in Computer Networking.
Layers of TCP/IP Model
1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer

The diagrammatic comparison of the TCP/IP and OSI model is as follows:


1. Physical Layer

It is a group of applications requiring network communications. This layer is responsible for


generating the data and requesting connections. It acts on behalf of the sender and the Network
Access layer on the behalf of the receiver. During this article, we will be talking on the behalf of
the receiver.

2. Data Link Layer

The packet’s network protocol type, in this case, TCP/IP, is identified by the data-link layer.
Error prevention and “framing” are also provided by the data-link layer. Point-to-Point Protocol
(PPP) framing and Ethernet IEEE 802.2 framing are two examples of data-link layer protocols.

3. Internet Layer

This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for the logical transmission of data over the entire network. The main protocols
residing at this layer are as follows:
● IP: IP stands for Internet Protocol and it is responsible for delivering packets from the
source host to the destination host by looking at the IP addresses in the packet
headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most websites are
using currently. But IPv6 is growing as the number of IPv4 addresses is limited in
number when compared to the number of users.
● ICMP: ICMP stands for Internet Control Message Protocol. It is encapsulated within
IP datagrams and is responsible for providing hosts with information about network
problems.
● ARP: ARP stands for Address Resolution Protocol. Its job is to find the hardware
address of a host from a known IP address. ARP has several types: Reverse ARP,
Proxy ARP, Gratuitous ARP, and Inverse ARP.

The Internet Layer is a layer in the Internet Protocol (IP) suite, which is the set of protocols that
define the Internet. The Internet Layer is responsible for routing packets of data from one device
to another across a network. It does this by assigning each device a unique IP address, which is
used to identify the device and determine the route that packets should take to reach it.
Example: Imagine that you are using a computer to send an email to a friend. When you click
“send,” the email is broken down into smaller packets of data, which are then sent to the Internet
Layer for routing. The Internet Layer assigns an IP address to each packet and uses routing tables
to determine the best route for the packet to take to reach its destination. The packet is then
forwarded to the next hop on its route until it reaches its destination. When all of the packets
have been delivered, your friend’s computer can reassemble them into the original email
message.
In this example, the Internet Layer plays a crucial role in delivering the email from your
computer to your friend’s computer. It uses IP addresses and routing tables to determine the best
route for the packets to take, and it ensures that the packets are delivered to the correct
destination. Without the Internet Layer, it would not be possible to send data across the Internet.

4. Transport Layer

The TCP/IP transport layer protocols exchange data receipt acknowledgments and retransmit
missing packets to ensure that packets arrive in order and without error. End-to-end
communication is referred to as such. Transmission Control Protocol (TCP) and User Datagram
Protocol are transport layer protocols at this level (UDP).
● TCP: Applications can interact with one another using TCP as though they were
physically connected by a circuit. TCP transmits data in a way that resembles
character-by-character transmission rather than separate packets. A starting point that
establishes the connection, the whole transmission in byte order, and an ending point
that closes the connection make up this transmission.
● UDP: The datagram delivery service is provided by UDP, the other transport layer
protocol. Connections between receiving and sending hosts are not verified by UDP.
Applications that transport little amounts of data use UDP rather than TCP because it
eliminates the processes of establishing and validating connections.

5. Application Layer

This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-end
communication and error-free delivery of data. It shields the upper-layer applications from the
complexities of data. The three main protocols present in this layer are:
● HTTP and HTTPS: HTTP stands for Hypertext transfer protocol. It is used by the
World Wide Web to manage communications between web browsers and servers.
HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL(Secure
Socket Layer). It is efficient in cases where the browser needs to fill out forms, sign
in, authenticate, and carry out bank transactions.
● SSH: SSH stands for Secure Shell. It is a terminal emulations software similar to
Telnet. The reason SSH is preferred is because of its ability to maintain the encrypted
connection. It sets up a secure session over a TCP/IP connection.
● NTP: NTP stands for Network Time Protocol. It is used to synchronize the clocks on
our computer to one standard time source. It is very useful in situations like bank
transactions. Assume the following situation without the presence of NTP. Suppose
you carry out a transaction, where your computer reads the time at 2:30 PM while the
server records it at 2:28 PM. The server can crash very badly if it’s out of sync.

The host-to-host layer is a layer in the OSI (Open Systems Interconnection) model that is
responsible for providing communication between hosts (computers or other devices) on a
network. It is also known as the transport layer.
Some common use cases for the host-to-host layer include:

1. Reliable Data Transfer: The host-to-host layer ensures that data is transferred

reliably between hosts by using techniques like error correction and flow control. For
example, if a packet of data is lost during transmission, the host-to-host layer can
request that the packet be retransmitted to ensure that all data is received correctly.
2. Segmentation and Reassembly: The host-to-host layer is responsible for breaking

up large blocks of data into smaller segments that can be transmitted over the
network, and then reassembling the data at the destination. This allows data to be
transmitted more efficiently and helps to avoid overloading the network.
3. Multiplexing and Demultiplexing: The host-to-host layer is responsible for

multiplexing data from multiple sources onto a single network connection, and then
demultiplexing the data at the destination. This allows multiple devices to share the
same network connection and helps to improve the utilization of the network.
4. End-to-End Communication: The host-to-host layer provides a connection-oriented

service that allows hosts to communicate with each other end-to-end, without the
need for intermediate devices to be involved in the communication.

Example: Consider a network with two hosts, A and B. Host A wants to send a file to host B.
The host-to-host layer in host A will break the file into smaller segments, add error correction
and flow control information, and then transmit the segments over the network to host B. The
host-to-host layer in host B will receive the segments, check for errors, and reassemble the file.
Once the file has been transferred successfully, the host-to-host layer in host B will acknowledge
receipt of the file to host A.
In this example, the host-to-host layer is responsible for providing a reliable connection between
host A and host B, breaking the file into smaller segments, and reassembling the segments at the
destination. It is also responsible for multiplexing and demultiplexing the data and providing
end-to-end communication between the two hosts.
Other Common Internet Protocols
TCP/IP Model covers many Internet Protocols. The main rule of these Internet Protocols is how
the data is validated and sent over the Internet. Some Common Internet Protocols include:
● HTTP (Hypertext Transfer Protocol): HTTP takes care of Web Browsers and
Websites.
● FTP (File Transfer Protocol): FTP takes care of how the file is to be sent over the
Internet.
● SMTP (Simple Mail Transfer Protocol): SMTP is used to send and receive data.

Difference between TCP/IP and OSI Model

TCP/IP OSI
TCP refers to the Transmission
Control Protocol. OSI refers to Open Systems Interconnection.
TCP/IP uses both the session and
presentation layer in the application OSI uses different session and presentation
layer itself. layers.
TCP/IP follows a connectionless
horizontal approach. OSI follows a vertical approach.
The Transport layer in TCP/IP does
not provide assurance delivery of In the OSI model, the transport layer provides
packets. assurance delivery of packets.
While in the OSI model, Protocols are better
Protocols cannot be replaced easily covered and are easy to replace with the
in the TCP/IP model. technology change.
TCP/IP model network layer only
provides connectionless (IP) Connectionless and connection-oriented
services. The transport layer (TCP) services are provided by the network layer in
provides connections. the OSI model.

You might also like