OSI MODEL
OSI
MODEL
OSI stands for Open Systems Interconnection. It has been
developed by ISO – ‘International Organization for
Standardization‘, in the year 1984.
OSI model has 7 layers.
If we see 7 layer on sender side, first layer will be application layer.
If we see 7 layer on receiver side, physical layer will be first.
PDU Sender Receiver PDU
DATA L7H Application Layer L7H DATA
DATA DATA L7H L6H Presentation Layer L6H L7H DATA DATA
DATA L7H L6H L5H Session Layer L5H L6H L7H DATA
Segment DATA Header (S.P. + D.P.) Transport Layer Header (S.P. + D.P.) DATA Segment
Packet DATA Header (S.IP. + D.IP.) Network Layer Header (S.IP. + D.IP.) DATA Packet
Frame DATA Header (S.MAC + D.MAC) Data Link Layer Header (S.MAC + D.MAC) DATA Frame
Bitstream DATA => 010101010 Physical Layer DATA => 010101010 Bitstream
Transmission Media (Wires/Wireless)
1101011011010101010101010101010101011
TCP Header S. Port D. Port Sequence No. Ack No. Flags Window Size
IP Header S. IP D. IP TTL Protocol
Ethernet Header S. MAC D MAC
OSI 7. Application Layer
MODEL
• The Application layer deals with the computer application that is used by a user.
OSI 7. Application Layer
MODEL
Functions of Application Layer:
• File transfer access and management: Accessing files in a remote computer, retrieving the files, or managing the files from the remote computer are handled by
the application layer.
• Mail Services: This layer provides email forwarding and storage.
OSI 6. Presentation Layer
MODEL
• The Presentation layer role is used to determine the data that has been sent, to translate the data into the appropriate format, and then to present it.
For example, we send an MP3 file over the network and the file is split up into several segments. Then, using the header information on the segment, this layer will
construct the file by translating the segments.
OSI 6. Presentation Layer
MODEL
Functions of Presentation Layer:
• Translation: It does the work of converting the data from the sender format into a common format and changing the common format into the receiver format.
• Encryption/Decryption: This layer encrypts the data from the receiver into cipher text which will be harder to read by common eyes and is highly safe.
• Compression: This layer compresses the data like text, images, or audio. This data compression is much needed for media since it reduces the number of bits to be
transmitted over the network.
OSI 5. Session Layer
MODEL
• The Session layer is responsible for the establishment, maintenance, and termination of the session.
OSI 5. Session Layer
MODEL
Functions of Session Layer:
• Synchronization: This layer adds checkpoints while transmitting the data. If an error occurs at a point, then the transmission takes place from the checkpoint. This
is called Synchronization.
• Session maintenance: This layer maintains the session. Creation, and termination of the session are also handled by the Session layer.
• Dialog Control: This layer acts as a dialog controller which in turn creates a dialog between two processes. It allows communication either as half-duplex or full-
duplex communications.
OSI 4. Transport Layer
MODEL
• The Presentation layer role is used to determine the data that has been sent, to translate the data into the appropriate format, and then to present it.
• There are two main protocols that work in this layer: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).
OSI 4. Transport Layer
MODEL
Functions of Transport Layer:
• Flow control: This layer is also responsible for the flow control. Flow control is performed by the Transport layer from end to end and not across a single link.
• Error Control: This layer is also handling the error control. The sender of the transport layer make sure that message is reached at the destination without any
error.
• Port addressing: To deliver the message to the correct process, this layer adds an address called service point address or port address to it.This makes sure that
the message reaches the correct address.
OSI TCP vs UDP
MODEL
• TCP supplies the delivery of data by establishing a session.The data will not be transmitted until a session is established.
• TCP is also known as the connection-oriented protocol, which means that the session must be established before transmitting the data.
• Can sequence data (send in a specific order).
• Delivery is guaranteed.
• Slow, but complete data delivery.
• UDP is a method of delivering data with the best efforts but does not give a guaranteed delivery because it does not establish a session.
• Therefore, UDP is also known as the connection-less protocol.
• Cannot sequence or arrange data.
• Delivery is not guaranteed.
• Fast, but at risk of incomplete data delivery
OSI 3. Network Layer
MODEL
• This layer is responsible for managing the movement of data from one host computer to the next. It is also known as source to destination delivery.
• The Network layer is responsible for defining the best way to route the packets from a source to the destination device.
OSI 3. Network Layer
MODEL
• Network Layer Protocols :
- IPv4,
- IPv6,
- Apple Talk,
- IPX (Novell Internetwork Packet Exchange)
Functions of Network Layer:
• Routing: This layer decides the best route from source to destination, also called routing.
• Addressing: This layer adds the source and destination address to the header of the frame which is used to identify the device across the network.
• Internetworking: This layer provides a connection across devices in the network.
• Packet conversion: This layer receives data from the previous layer and converts them into packets.
OSI 2. Data Link Layer
MODEL
• The data link layer is very similar to the network layer, but it do physical (MAC) addressing in
this layer.
• DATA in this layer called as frame. The data link layer takes packets from the network layer
and breaks them into smaller pieces called frames.
• The data link layer is also responsible for flow control and error control.
Functions of Data Link Layer:
• Error Control: The data link layer detects and corrects errors that occur in the physical layer. Physical Addressing:
The frame is transmitted to the destination address which is added at the header of the frame by the data link layer.
• Framing: This layer translates the physical layer’s raw bitstream into packets called frames. It is done by adding special
bits to the beginning and end of the frame.
• MAC Addresses: This layer do the MAC addressing that includes the MAC address of source and destination.
OSI 2. Data Link Layer
MODEL
Functions of Data Link Layer:
• Access control: When two or more devices are connected in a network, then the data link layer protocol determines which device has control over the link at that time.
• Error Control: The data link layer detects and corrects errors that occur in the physical layer. Physical Addressing: The frame is transmitted to the destination address which
is added at the header of the frame by the data link layer.
• Framing: This layer translates the physical layer’s raw bitstream into packets called frames. It is done by adding special bits to the beginning and end of the frame.
OSI 1. Physical Layer
MODEL
• This layer includes the physical equipment involved in the data transfer, such as the cables
and switches.
• This is also the layer where the data gets converted into a bit stream like signals, wireless
waves.
• It indicates the transmission media, connector used.
Functions of Physical Layer:
• Bit rate: The physical layer is used to define the transmission rate which is the number of bits sent per
second.
• Topologies: The physical layer defines the topology, i.e., it specifies the way in which different
devices/nodes are arranged in a network.
• Transmission: The physical layer also used to define the way in which the data flows between the two
connected devices. Simplex, half-duplex, and full-duplex are the various transmission modes in the
physical layer.
OSI model has 7 layers.
NETWORK If we see 7 layer on sender side, first layer will be application layer. If we see
7 layer on receiver side, physical layer will be first.
TCP/IP MODEL
Step 1 (SYN): The client transmits a segment with
SYN (Synchronize Sequence Number) to the server
to establish a connection.
Step 2 (SYN+ACK): The server sends SYN-ACK
signal bits to the client. ACK indicates the segment's
answer, while SYN indicates the sequence number it
will likely start segments with.
Step 3 (ACK): In the final part, the client accepts the
server's response and they establish a reliable
connection to begin data transfer.
TCP/IP MODEL
TCP/IP was created by the DARPA (Defense
Advanced Research Projects Agency) in the 1970s
using standard protocols. The OSI paradigm is
condensed into TCP/IP. It has four layers, unlike the
OSI model's seven.
TCP/IP MODEL
Protocols Working on multiple Layers
OSI model has 7 layers.
NETWORK If we see 7 layer on sender side, first layer will be application layer. If we see
7 layer on receiver side, physical layer will be first.
Terminology:
1. Encapsulation - Encapsulation adds information to a packet as it travels to its destination.
2. Decapsulation - Decapsulation reverses the process by removing the info, so a destination device can read
the original data.
3. Routing – This is the method to finding the best path to the destination.