**What is the Open Systems Interconnection (OSI) model?**
The OSI model is *a conceptual model created by the ISO that enables diverse communication systems to communicate using standard protocols.*
> **What is the Open Systems Interconnection (OSI) model based on?**
> The OSI model is based on *the concept of splitting up a communication system into a stack of seven abstract layers.*
>
> **What are the seven layers of the Open Systems Interconnection (OSI) model in order from lowest to highest?**
> The seven layers of the OSI model are:
> 1. Physical layer - Transmits raw bit stream over the physical medium.
> 2. Data link layer - Defines the format of data on the network.
> 3. Network layer - Decides which physical path the data will take.
> 4. Transport layer - Transmits data using transmission protocols including TCP and UDP.
> 5. Session layer - Maintains connections and is responsible for controlling ports and sessions.
> 6. Presentation layer - Ensures that data is in a usable format and is where data encryption occurs.
> 7. Application - Human-computer interaction layer, where applications can access network services.
...
# Why does the OSI model matter?
**Does the modern Internet use the Open Systems Interconnection (OSI) model?**
*No*, the modern Internet doesn't use the OSI model.
> **What is the Open Systems Interconnection (OSI) model useful for and why?**
> The OSI model is useful for *troubleshooting because isolating the problem to a specific layer avoids a lot of unnecessary work.*
# 7. The application layer
**What does the application layer do?**
The application layer *provides the protocols and data manipulation that client software relies on.*
> **Are client software applications a part of the application layer?**
> *No*, client software applications aren't part of the application layer.
> [!example] Examples of client software applications which rely on the application layer
> * Web browsers.
> * Email clients.
> [!example] Examples of application layer protocols
> * Hypertext Transport Protocol (HTTP).
> * Simple Mail Transfer Protocol (SMTP).
# 6. The presentation layer
**What does the presentation layer do?**
The presentation layer *prepares data so that it can be used by the application layer.*
> **What three things does the presentation layer do to data?**
> The three things that the presentation layer does to data are:
> 1. Translation.
> 2. Encryption.
> 3. Compression.
...
# 5. The session layer
**What does the session layer do?**
The session layer *ensures that sessions stay open long enough to transfer all the data being exchanged and then closed to avoid wasting resources.*
> **What is a session?**
> A session is *the time between when communication is opened and closed.*
>
> **What can the session layer do with large data transfers?**
> With large data transfers, the session layer can *set checkpoints to resume from in case the session is interrupted.*
# 4. The transport layer
**What does the transport layer do?**
The transport layer *takes data from the session layer and breaks it up into chunks to send to the network layer.*
> **What are the chunks of data from the session layer called?**
> The chunks of data from the session layer are called *segments.*
>
> **What does the receiving device do with segments?**
> With segments, the receiving device *reassembles the segments into data that the session layer can consume.*
>
> **What two types of controls does the transport layer have over the transmission of data?**
> The two types of controls that the transport layer has over the transmission of data are:
> 1. Flow control - Ensuring the speed of transmission doesn't overwhelm the receiving device.
> 2. Error control - Ensuring the data on the receiving device is complete and re-transmitting otherwise.
> [!example] Examples of transport layer protocols
> * Transmission Control Protocol (TCP).
> * User Datagram Protocol (UDP).
# 3. The network layer
**What does the network layer do?**
The network layer *facilitates data transfer between two different networks.*
> **Is the network layer necessary if two devices are on the same network?**
> *No*, the network layer is unnecessary if two devices are on the same network.
>
> **What does the network layer do with segments from the transport layer?**
> With segments from the transport layer, the network layer *breaks them up into packets on the sender and reassembles them on the receiver.*
>
> **What is the process of finding the best physical path for data to reach the receiver?**
> The process of finding the best physical path for data to reach the receiver is *routing.*
> [!example] Examples of network layer protocols
> * Internet Protocol (IP).
> * Internet Control Message Protocol (ICMP).
> * Internet Group Message Protocol (IGMP).
> * IPsec suite.
# 2. The data link layer
**What does the data link layer do?**
The data link layer *facilitates data transfer on the same network.*
> **What does the data link layer do with packets from the network layer?**
> With packets from the network layer, the data link layer *breaks them up into frames.*
# 1. The physical layer
**What is the physical layer comprised of?**
The physical layer is comprised of *the physical equipment involved in data transfer.*
> [!example] Examples of physical equipment in the physical layer
> * Cables.
> * Switches.
# How data flows through the OSI model
**How does comprehensible information need to be transferred over a network from one device to another?**
Comprehensible information needs to be to be transferred over a network from one device to another *by travelling down the seven layers of the OSI model on the sender and up the seven layers on the receiver.*
> [!example] Example of how comprehensible information is transferred over a network from one device to another using the OSI model
> This is what it looks like whenever you send an email to your friend:
> * The email software - You write the email and click the send button.
> * Application layer - Since you're sending an email, the SMTP protocol is picked.
> * Presentation layer - The raw data of the email is compressed.
> * Session layer - A communication session is opened.
> * Transportation layer - The compressed data of the email is broken up into segments.
> * Network layer - The segments are broken up into packets.
> * Data link layer - The packets are broken up into frames.
> * Physical layer - The frames are converted to a bitstream and transmitted through a cable.
>
> On the receiving end:
> * Physical layer - Your friend's computer receives a bitstream over Wi-Fi and converts it to frames.
> * Data link layer - The frames are assembled into packets.
> * Network layer - The packets are assembled into segments.
> * Transportation layer - The segments are assembled into the compressed data of the email.
> * Session layer - The communication session is closed.
> * Presentation layer - The compressed data of the email is decompressed.
> * Application layer - The raw data of the email is given to the email software.
> * The email software - The email shows up in the inbox of your friend where it can be read.