05 OSI Model
05 OSI Model
05 OSI Model
➢Each lower layer adds its services to the higher layer to provide a full
set of services to manage communications and run the applications.
➢Easy to test: Each layer of the layered architecture can be analyzed and tested
individually.
Characteristics of OSI Model:
🢝Layer 7 Application
🢝Layer 6 Presentation
🢝Layer 5 Session
🢝Layer 4 Transport
🢝Layer 3 Network
🢝Layer 1 Physical
Characteristics of OSI Model:
OSI and TCP/IP
Characteristics of OSI Model:
➢The OSI model is divided into two layers:
➢Upper Layers
➢Lower Layers
Upper Layers
➢The upper layer of the OSI model mainly deals with the application
related issues, and they are implemented only in the software.
➢Both the end user and the application layer interact with the software
applications.
➢An upper layer refers to the layer just above another layer.
Lower Layers
➢The lower layer of the OSI model deals with the data transport issues.
➢The data link layer and the physical layer are implemented in
hardware and software.
➢The physical layer is the lowest layer of the OSI model and is closest
to the physical medium.
➢It determines the best path to move data from source to the destination
based on the network conditions, the priority of service, and other factors.
Network Layer
➢The Network layer is responsible for routing and forwarding the
packets.
➢Routers are the layer 3 devices, they are specified in this layer and used
to provide the routing services within an internetwork.
➢The protocols used to route the network traffic are known as Network
layer protocols. Examples of protocols are IP and Ipv6.
Functions of Network Layer:
➢Internetworking: An internetworking is the main responsibility of the network
layer. It provides a logical connection between different devices.
➢Addressing: A Network layer adds the source and destination address to the
header of the frame. Addressing is used to identify the device on the internet.
➢Routing: Routing is the major component of the network layer, and it determines
the best optimal path out of the multiple paths from source to the destination.
➢Packetizing: A Network Layer receives the data from the upper layer and converts
them into packets. This process is known as Packetizing. It is achieved by internet
protocol (IP).
Network Layer Protocol
➢IP:- Internet Protocol
➢ICMP:- Internet Control Message Protocol
➢DVMRP :- Distance Vector Multicast Routing Protocol
➢IGMP :- Internet Group Management Protocol
➢RIP :- Routing Information Protocol
➢IPSEC :- Internet Protocol Security
➢OSPF:- Open Shortest Path First
➢EIGRP :- Enhanced Interior Gateway Routing Protocol
Internet Protocol (IP)
➢Internet Protocol (IP) is the method or protocol by which data is sent
from one computer to another on the internet.
➢An IP address is a unique identifier assigned to the computer which is
connected to the internet.
➢An IP protocol provides the connectionless service, which is
accompanied by two transport protocols, i.e., TCP/IP and UDP/IP, so
internet protocol is also known as TCP/IP or UDP/IP.
➢There are four types of IP addresses: public, private, static, and
dynamic.
Types of IP Address
➢IPv4 (Internet Protocol Version 4)
➢IPv6 (Internet Protocol Version 6)
IPv4 (Internet Protocol Version 4)
• IPv4 address consists of two things that are the network address and
the host address.
• It stands for Internet Protocol version four.
• IPv4 addresses are 32-bit integers that have to be expressed in
Decimal Notation.
• It is represented by 4 numbers separated by dots in the range of 0-255,
which have to be converted to 0 and 1, to be understood by
Computers. For Example, An IPv4 Address can be written
as 189.123.123.90.
Internet Protocol (IP)
➢Internet Protocol hierarchy contains several classes of IP Addresses to
be used efficiently in various situations as per the requirement of hosts
per network.
➢Broadly, the IPv4 Addressing system is divided into five classes of IP
Addresses.
➢All the five classes are identified by the first octet of IP Address.
IPv4 (Internet Protocol Version 4)
• The first octet referred here is the left most of all. The octets numbered
as follows depicting dotted decimal notation of IP Address −
• The number of networks and the number of hosts per class can be
derived by this formula −
Types of IPv4
➢Classful:- In classful IP addressing, some bits are reserved for
network id, and the remaining bits are used to represent the host in the
network.
➢The classful IP addressing can be further classified into five classes: class A,
class B, class C, class D, and class E.
➢Classless:- In classless IP, addessing the number of network bits and
number of host bits is variable and can be modified according to need.
➢Classless addressing avoids the problem of IP address exhaustion that can
arise with classful addressing.
➢The format of classless IP addressing is x.u.v.z/n, where n represents the
number of network bits.
Classful IP addressing
➢In the IPv4 IP address space, there are five classes: A, B, C, D and E.
Each class has a specific range of IP addresses (and ultimately dictates
the number of devices you can have on your network). Primarily, class
A, B, and C are used by the majority of devices on the Internet. Class
D and class E are for special uses.
Class A Address
• The first bit of the first octet is always set to 0 (zero). Thus the first
octet ranges from 1 – 127, i.e.
range of −
reserved for Multicasting. In multicasting data is not destined for a particular host,
that is why there is no need to extract host address from the IP address, and Class D
Fields IPv4 is a numeric address that consists of 4 fields IPv6 is an alphanumeric address
which are separated by dot (.). that consists of 8 fields, which are
separated by colon.
Classes IPv4 has 5 different classes of IP address that IPv6 does not contain classes of IP
includes Class A, Class B, Class C, Class D, and addresses.
Class E.
Number of IP IPv4 has a limited number of IP addresses. IPv6 has a large number of IP
address addresses.
VLSM It supports VLSM (Virtual Length Subnet Mask). It does not support VLSM.
Here, VLSM means that Ipv4 converts IP
addresses into a subnet of different sizes.
IP V 4 IP v6
Address It supports manual and DHCP configuration. It supports manual, DHCP, auto-
configuration configuration, and renumbering.
Address space It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.
End-to-end In IPv4, end-to-end connection integrity is In the case of IPv6, end-to-end connection
connection unachievable. integrity is achievable.
integrity
Security In IPv4, security depends on the application. In IPv6, IPSEC is developed for security
features This IP address is not developed in keeping the purposes.
security feature in mind.
Address In IPv4, the IP address is represented in decimal. In IPv6, the representation of the IP
representation address in hexadecimal.
IP Sec (Internet Protocol Security)
➢IPsec is a group of protocols that are used together to set up secure
connections between devices at layer 3 of the OSI model
➢IP Sec (Internet Protocol Security) is an Internet Engineering Task
Force (IETF) standard Suite of protocols between two communication
points across the IP network
➢it provide data authentication, integrity, and confidentiality.
➢It also defines the encrypted, decrypted, and authenticated packets.
➢The protocols needed for secure key exchange and key management
are defined in it.
Uses of IP Security
➢To encrypt application layer data.
➢To provide security for routers sending routing data across the public
internet.
➢Error-reporting messages
➢The error-reporting message means that the router encounters a problem when it
processes an IP packet then it reports a message.
➢Query messages
➢The query messages are those messages that help the host to get the specific
information of another host. For example, suppose there are a client and a server,
and the client wants to know whether the server is live or not, then it sends the
ICMP message to the server.
➢Routing Information Protocol (RIP) is a dynamic routing protocol
that uses hop count as a routing metric to find the best path between
the source and the destination network.
➢RIP cannot be used for very large networks.
Transport Layer
➢The Transport layer is a Layer 4 ensures that messages are transmitted in
the order in which they are sent and there is no duplication of data.
➢It receives the data from the upper layer and converts them into smaller
units known as segments.
➢When data is sent over the TCP connection, then the TCP protocol
divides the data into smaller units known as segments. Each segment
travels over the internet using multiple routes, and they arrive in different
orders at the destination. The transmission control protocol reorders the
packets in the correct order at the receiving end.
User Datagram Protocol(UDP)
➢User Datagram Protocol is a transport layer protocol.
➢It is an unreliable transport protocol as in this case receiver does not
send any acknowledgment when the packet is received, the sender
does not wait for any acknowledgment. Therefore, this makes a
protocol unreliable.
TCP and UDP
Service TCP UDP
It is a connection-oriented protocol, It is a connectionless protocol,
which means that the connection needs to which means that it sends the
be established before the data is data without checking whether
Type of Connection transmitted over the network the system is ready to receive or
not.
It provides assurance for the delivery of UDP is an unreliable protocol as
Reliable it does not take the guarantee
data packets.
for the delivery of packets.
In this concept, if the sender receives the UDP does not wait for any
ACK, then the sender will send the data. TCP acknowledgment; it just sends the
Acknowledgment
also has the ability to resend the lost data. data.
TCP performs error checking by using a
It does not perform any error
checksum. When the data is corrected, then
Error checking checking, and also does not resend
the data is retransmitted to the receiver.
the lost data packets.
This protocol is used where fast
communication is required and does
This protocol is mainly used where a secure
not care about the reliability like VoIP,
and reliable communication process is
game streaming, video conference
required, like military services, web
Applications and music streaming, DHCP, DNS etc.
browsing, and e-mail.
TCP and UDP
TCP and UDP
Functions of Transport Layer:
➢Service-point addressing: Computers run several programs
simultaneously due to this reason, the transmission of data from
source to the destination not only from one computer to another
computer but also from one process to another process. The transport
layer adds the header that contains the address known as a service-
point address or port address. The responsibility of the network layer
is to transmit the data from one computer to another computer and the
responsibility of the transport layer is to transmit the message to the
correct process.
Functions of Transport Layer:
➢Segmentation and reassembly: When the transport layer receives the
message from the upper layer, it divides the message into multiple
segments, and each segment is assigned with a sequence number that
uniquely identifies each segment. When the message has arrived at the
destination, then the transport layer reassembles the message based on
their sequence numbers.
➢Flow control: The transport layer also responsible for flow control
but it is performed end-to-end rather than across a single link.
Functions of Transport Layer:
➢Connection control: Transport layer provides two services Connection-
oriented service and connectionless service. A connectionless service treats
each segment as an individual packet, and they all travel in different routes
to reach the destination. A connection-oriented service makes a connection
with the transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in the single
route.
➢Error control: The transport layer is also responsible for Error control.
Error control is performed end-to-end rather than across the single link.
The sender transport layer ensures that message reach at the destination
without any error.
Session Layer
➢The session layer is Layer 5 layer in the OSI model.
➢The job of the session layer is to control and maintain connections
between systems to share data.
➢The Session layer is used to establish, maintain and synchronizes the
interaction between communicating devices.
➢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.
Session Layer
➢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 is 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.
Functions of the Session Layer:
• 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.
• 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.
Functions of the Session Layer:
• 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
• Authorization: It grants privileges after authentication of the user.
Authorization means providing access to the data that is authorized to the
specific user.
Session Layer Protocol
• ADSP :- AppleTalk Data Stream Protocol
• NETBIOS :- Network Basic Input/Output System
• PAP:- Password Authentication Protocol
• RPC :- Remote Procedure Call
• PPTP :- Point-to-Point Tunneling Protocol
• SMB:- Server Message Block
• SMPP:- Short Message Peer-to-Peer
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.
➢This layer is also called the translation layer.
➢The Presentation layer is also known as the syntax layer.
➢It uses operations such as data compression, data encryption & decryption,
data conversion, etc.
Functions of the presentation layer:
➢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.
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.