OSI Model
September 19, 2023 11:44 AM
OSI Model
OSI Model is used to describe how data gets from one computer to another through a network
(connection between things)
• Devices communicate with each other via set protocols
There are 7 Layers in the OSI Model
• Layer 7 - Application
• Layer 6 - Presentation
• Layer 5 - Session
• Layer 4 - Transport
• Layer 3 - Network
• Layer 2 - Data Link
• Layer 1 - Physical
Layer 7, 6, 5 - Application, Presentation, Session
• Application layer is the layer that users see (Microsoft Word, Google Chrome)
• Layer 6 takes data from layer 7 and makes sure that the application layer of the recipient
can understand it
○ e.g. | Presentation Layer
▪ When you open up any application in notepad, it is a bunch of code that most
people won't understand
▪ The job of the presentation layer is to take that code and present it in a way
that humans can understand, something that the application layer can present
• Layer 5 - Session Layer
○ Responsible for managing and controlling communication sessions between two
devices on a network
○ Main job is to establish, maintain, and terminate sessions between end-users
▪ Your computer most of the time doesn't connect to the end-user
□ e.g. | Email
When you send an email, your computer would contact the email
server with your email, then the email server would send the email
to the recipient
Layer 4 - Transport Layer
• Transport layer takes data from the session layer and breaks it into pieces and sends it to
the recipient
○ e.g. | Email1 :
▪ Transport layer on your side: Taken an email, splits it into chunks, numbers the
chunks, and sends each chunk separately to the recipient
▪ The recipient has already agreed to receive the chunks due to the session that
has already been established by the layers above
▪ Transport layer on the recipients side: responsible for putting the chunks back
together in correct order
▪ If a chunk doesn't show up, the transport layer resends the chunks
▪ Transport layer also puts the IP address of the recipient on each chunk
• Transport layer is responsible for the reliability of communication through Segmentation,
Flow Control, Error Control
○ Segmentation - data received from session layer is divided into small data units called
segments
▪ Each segment has a source and destination Port Number
□ Port numbers help direct each segment to the correct application
▪ Each segment has a Segment Number
□ Segment numbers help assemble the segments in the correct order
○ Flow Control - transport layers control the amount of data transmitted
▪ e.g. | Server transfers data @ 100Mbps; phone receives data at 10Mbps
□ The phone with the help of the transport layer, tells the server to slow
down the rate at which data is being sent to 10Mbps
○ Error Control - if some data doesn't reach the recipients computer, the transport
layer uses Automatic Repeat Request to retransmit the lost or corrupt data
▪ Checksum - group of bits added to each segment to see if it received a
corrupted segment
• Protocols in the Transport Layer
○ Transmission Control Protocol (TCP) - Connection-Oriented Transmission
▪ TCP is used over web services, websites, and email. Application that would
require for all segments to arrive
○ User Datagram Protocol (UDP) - Connectionless Transmission
▪ UDP is faster than TCP because there is no feedback provided (no check to see if
everything was received)
▪ UDP is for streaming or video calls, where time cannot be paused
• Transport layer passes data segments through the network layer
Layer 3 - Network Layer
• Network layer is responsible for routing the 'packets' from sender to recipient
○ When data is sent through a network, it doesn't go straight from sender's destination
to the recipient's destination, there are routers involved
○ Network layer manages the routes that packets will travel to get to the starting point
to the destination
○ Network layer is also responsible for managing traffic problems such as switching,
routing, and congestion of packets
○ Network layers translates the Logical Address to the Physical Addresses
▪ Logical Address: used for network communication and routing. They help
identify devices on a network in a way that is independent of their physical
location or characteristics
▪ Physical: also know as MAC address, are used to identify devices on a local
network (LAN). They are specific to the hardware (NIC) of a device
• Functions of the Network Layer: Logical Addressing, Path Determination, Routing
○ Logical Addressing: every computer in a network has an IP address; IP addresses are
assigned to make sure that each packet arrives at the correct destination
▪ Network layer assigns the senders and receivers IP address to each segment to
form an IP Packet
New Section 2 Page 1
• Functions of the Network Layer: Logical Addressing, Path Determination, Routing
○ Logical Addressing: every computer in a network has an IP address; IP addresses are
assigned to make sure that each packet arrives at the correct destination
▪ Network layer assigns the senders and receivers IP address to each segment to
form an IP Packet
○ Routing - method of moving data packet from source to destination; based on the
logical format of IPv4 and IPv6
○ Path Determination: choosing the best possible path for data delivery from source to
destination
▪ Protocols Used to determine the best possible path
□ OSPF (Open Shortest Path First)
□ BGP (Border Gateway Protocol)
□ IS-IS (Intermediate System - Intermediate System)
Layer 2 - Data Link Layer
• Layer 2 allows 2 devices to directly communicate. Each device has a unique MAC address:
Unique for every single computer there is
○ A compute doesn't know the direct way to get to a destination address, but only what
the next route is
• Data link layer receives packets from the work layer
○ Data packets contains the IP addresses of sender and receiver
○ Two Types of Addressing:
▪ Logical Addressing | Network Layer
□ Senders and receivers IP addresses are assigned to each segment to form
a data packet
□ Physical Addressing | Data Link Layer
MAC addresses are added to each data packet to form a frame
• DLL is software embedded to the NIC, and provides means to transfer data from one
computer to another via a Local Media
○ Local Media: copper wire, optical fibre, air (radio signals)
○ Media: physical links between two or more computers or networks
• Functions of Data Link Layer
○ Allows upper layer of OSI models to access media using methods such as framing
○ Controls how data is placed and received from the media; techniques used: Media
access control & error detection
Layer 1 - Physical Layer
• Everything up to the physical layer is done over bits, and sequences of binary numbers
• Physical layer converts bits into signals (electrical, copper cable, light signal)
• This is then transmitted over local media
New Section 2 Page 2