Cs Project
Cs Project
1.INTRODUCTION
Physical Layer
The Physical Layer is
the first layer in the OSI
model, responsible for
transmitting raw bits over
a physical medium like
cables or wireless signals.
It handles the actual
movement of data bits
from one device to
another.
Key functions of the
physical layer include:
Draw it by youself
In a nutshell, the Data Link Layer is responsible for ensuring reliable communication
between devices on the same network. It takes the raw data and organizes it into frames,
checks for errors, and controls how data flows to prevent collisions. It also manages who
gets to send data when multiple devices are connected to the same link. This layer uses
hardware devices like switches and network interface cards (NICs) to handle the physical
transmission of data. Additionally, it ensures devices can communicate in different
Draw it by youself
topologies, like star or bus, and supports point-to-point connections for direct
communication.
NetworkLayer
1. Logical Addressing
Purpose: Assigns unique addresses (IP addresses) to devices so that the can be
identified easily throughout the network .
Types of Addresses:
2. Routing
Purpose: It simply means a path selection which may be the best path for data
communication. For example: Ram has two routes to get home, Route A and
Route B. He analyses the route such as the conditions of road , will he get taxi ,
nature of the neighborhood ,etc. Suppose , in all of those conditions he finds
route ‘B; as suitable ,so, it is obvious for him to take the route ‘B’ and Same
concept is considered in routing mechanism in network layer.
Draw it by youself
Mechanisms:
3. Packet Forwarding
Purpose: Transmits data packets from one node to the next, based on the
routing table and destination address.
Key Concept: It is the process of moving data packets from the sender to the
receiver across a network. Routers check their routing tables to find the best
path and forward the packet to the next router or device. This process continues
hop by hop until the packet reaches its destination, similar to how a letter moves
through post offices until it gets delivered.
Purpose: When data is sent over network they are divided into smaller units
called packets/fragments and need to be sent over different types of network ,
each with its own Maximum Transmission Unit (MTU). MTU (Maximum
Transmission Unit) is the largest data packet size a network can handle without
fragmentation, such as Ethernet's typical 1500 bytes. If a packet exceeds the
MTU, the Network Layer splits it into smaller fragments for smooth transmission.
Draw it by youself
Purpose: Ensure data packets are transmitted efficiently and meet specific
performance requirements based on their priority. For example, real-time
applications like video streaming or VoIP require higher priority to ensure smooth
delivery, while regular data can tolerate delays.
Key protocols in the Network Layer include IP (IPv4 and IPv6 for addressing and
routing data), ARP (maps IP addresses to MAC addresses), ICMP (for error
reporting and diagnostics like ping),Enables private IP addresses to communicate
with external networks by translating them into a public IP address and NAT
(converts private IP addresses to public ones for internet access).
Draw it by youself
Transport Layer
The transport layer is the fourth(4) layer in the OSI model manages data flow between
hosts and systems, ensuring smooth data transfer. It handles data volume, destination,
and rate through protocols like TCP, UDP, DCCP, and SCTP. It receives packets from the
network layer, checks for errors, and then forwards them to the session layer for use by
the application. The transport layer is responsible for the delivery of a message from
one process to another. Computer often runs several program or application at a time.
For this reason, the delivery of data not only means source-destination but also there
must be a way to recognize a process on both sides (for example: We are using FTP
which runs on port 20 & 21, to transfer a file to the receiver ; suppose there are several
other processes running on the both sides i.e sender and receive are running services
such as http:80, HTTPS: 443 SMTP: 25 SSH: 22. Etc so , it specifies the port
number to recognize the type of services.)A transport layer protocol can be either
connectionless or connection-oriented. A connectionless transport layer protocol treat
each segments as an independent packet and send it to the transport layer at
destination (uses commonly known protocol UDP) while A connection oriented transport
layer first makes a connection to the transport layer at the other end and then process
the data and at last connection is terminated and uses protocols like TCP and SCPT
(combination of the features of UDP and TCP) basically a hybrid with better
functionality.
Draw it by youself
Let say there are two network A and B and a device from network ‘A’ is
sending a mail through G-mail application as it uses SMTP protocol (Background
process) which runs on a port ‘25’ . The transport layer specify the port number
on data which the device is sending to a device in network ‘B’ and suppose both
devices at Network A as well as Network B are running several services , due to
the help of those port number which were specified by the transport layer device
in network B will be able to know which application data is being received .
2. Reliability :
Error control ensures that data transmitted between devices is free from errors and it
uses a checksum to detect errors in the data during transmission. The major concern is
detection of error if it fix it that would be best. A checksum is a calculated value based
on the data, and it’s sent along with the data packet. The receiver performs the same
calculation and compares the result with the received checksum value. If the value
matches then it is considered to be error free but if it doesn’t then there may be errors
and the packet will be discarded, and the retransmission request is sent by the receiver.
5. Segmentation :
SESSION LAYER
The Session Layer is the 5th layer in the Open System Interconnection (OSI) model. This
layer allows users on different machines to establish active communications sessions
between them. It is responsible for establishing, maintaining, synchronizing, terminating
sessions between end-user applications.
Moreover, once after a successful session connection quite often a term called
‘Authorization’ is used to simply explain , it refers to the process of giving someone
Draw it by youself
permission to have access over data.or authorization is the set of privileges
given where we can define range of data that can be accessed. Suppose , a
user is surfing an E-commerce website where he/she will be allowed to a
search items, add-to-cart, apply discount coupons and much more things but
will the user be allowed to edit the items , reduce the price , add or remove
items from the whole e-commerce store and the simple answer to it is ‘No’
because it is not allowed by the e-commerce store host/owner, that’s why
authorization is important.
1.Authentication:
When user 'A' wants to connect with user 'B,' 'A' sends a request to confirm if 'B' agrees
to the connection. If authentication is enabled, users may need to verify their identities
using credentials like usernames, passwords, or even more secure methods such as
two-factor authentication. This process ensures that only authorized users establish a
connection, preventing unauthorized access and enhancing security. If authentication is
not required, the connection is established once 'B' allows it.
2.Authorization:
Draw it by youself
3.Session Restoration:
Draw it by youself
It is a feature provided by the session layer to allow the user to resume or restore the
state of application or service which they were previously on . It can simply be achieved
by using the concept of ‘Checkpoint’ where it creates a checkpoint/mark within an
interval time (keeps tracks of) state of user. Suppose, Ram is doing his project work in
google excel sheet and all of a sudden his power supply connection cuts-off and his pc
turns off, now what will he be able to access all of his hard work ; Yes , Session layer
helps to restore a previous session or restore the lost state . Although session
restoration may play a crucial role but only limited services are using such functionality
it is because a malicious attacker can hijack the session info and use it to misuse your
data but this feature is quite often used by the popular services which we are using
nowadays . A time limit should be given so , that the user can restore their lost data
within a time and then a new session may be created for further security.
4.Synchronization:
Draw it by youself
Synchronization in the Session Layer means adding checkpoints in the data stream
during communication. Suppose, a user is in a webinar and he/she is speaking
simultaneously what if he speaks a word and it hears after 5 second or may be a second
later will it be any good , so , to prevent from such problems it adopts Synchronization
mechanism to ensure deliver data at the time when it is suppose to be
delivered.
PRESENTATION LAYER
Draw it by youself
Code Conversion:
Encryption/Decryption:
Compression:
Data format:
APPLICATION LAYER
Draw it by youself
Application Layer provides a facility by which users can forward several emails
and also provides a storage facility.
It allows users to access, retrieve, and manage files on a remote computer.
It provides services which include e-mail, transferring files, distributing results to
the user, directory services, network resources, and so on.
Remote Access and Communication
In this layer, data is presented in a visual form, which helps users understand the
data more intuitively, rather than remembering or visualizing it in binary format
(0’s or 1’s).
It receives and preserves data from the previous layer, which is the Presentation
Layer (which carries the syntax and semantics of the transmitted information).
Draw it by youself
Protocol and Host Initialization
The protocols used in this layer depend on the type of information users wish to
send or receive.
It generally performs host initialization followed by remote login to hosts.
The application layer is an abstraction layer that specifies the shared protocols
and interface methods used by hosts in a communication network.
Summary Paragraph: The Application Layer is a crucial part of the OSI model,
providing essential services such as email forwarding, file management, remote access,
and communication with other software applications. It manages network transparency
and resource allocation, while interacting with both the Operating System and the
Presentation Layer. This layer also ensures data is represented in a user-friendly format,
allowing for better understanding. It handles protocol management, remote host login,
and communication synchronization, ensuring smooth interactions within the network.