OSI Model Flashcards
Translation
Presentation Layer explained - Presentation layer receives data from Application layer in raw form of character and numbers. So it translates the data in the format that a machine can understand (which is binary).
Encryption & Decryption
Presentation Layer explained - If two devices are communicating over an encrypted connection, then presentation layer encrypts the data on the sender before it is transmitted to the receiver. When data arrives at the receiving end, it decrypts the data back to its original form. Presentation layer provides the data security. If someone intercept (прихващам) the data when two devices are communicating, then data will not be visible in its original form. It will be encrypted. Data only gets decrypted at the destination Presentation layer.
Data Compression (it uses compress algorithms)
Presentation Layer explained - It compresses the data by reducing the number of bits that need to be transmitted. File compression allows the data transmission to be faster.
Creating & Terminating sessions
Session layer explained - It creates and manages sessions. Each session means the time when communication or connection started and ended. It handles opening and closing off communication between 2 devices. It makes sure that session remains open for long enough to transfer all the data. After transferring everything it terminates the session. Session layer only creates new session after a successful authentication.
Authentication
Session layer explained - Authentication basically verifies whether an authorized person is accessing or trying to access the system. Authentication is mostly performed by the server. For example when you log in your Amazon account. Termination of session will be when you log out of your Amazon’s account.
Authorization
Session layer explained - Authorization means things that you can and cannot access or use after successful authentication. For example when you are logged in your Amazon account you can browse and purchase items, this is your authority that Amazon has given you. But you cannot change the price.
Checkpoints
Session layer explained - It keeps the track of data that has been transferred or downloaded. Let’s say you are downloading a 20 megabyte file from internet. Then Session layer could set a checkpoint after downloading 5 megabytes. It will create 4 checkpoints of five megabytes in our case. Number varies from application to application. Each application set their checkpoint by their requirements. In the case of disconnection after downloading, let’s say 12 megabytes, when you start downloading again, downloading will start from the last checkpoint, which in our case is 10. So checkpoints help the Session layer to keep track of what has been transferred or downloaded. Real life examples of download managers are IDM or FDM.
Why first 3 layers are called Software layers | PDU (Protocol Data Unit)
The first 3 layers are called upper or software layers. The reason why is because functions of first three layers are implemented (изпълнява) by software’s network application (мрежово приложение на софтуера) such as web browser, Outlook or Zoom.
Segmentation
Transport layer explained - Data is divided into smaller parts at the Transport Layer, called segments. That’s why data unit is called segment (look the last picture).
How segments are created?
Transport Layer receives data from Session Layer in the raw form of binaries, zeroes and ones. Transport layer takes the bits, and then convert bits into bytes are put or grouped into segments. Transport Layer deals with data in the form of bytes. Each segment is a collection of certain number of bytes. After putting bytes in the segment, TCP assigns a unique sequence number to each byte in the segment. Sequence numbers help reassemble data in the correct order, even if segments reach out of order at the destination.
In simple words, transport layer takes the data or a file > breaks it into many segments > through IP protocol, each segment is sent separately to receiver in the form of packet > at the destination segments are reassembled with the help of sequence numbers to form the correct file or message.
Process to Process Delivery
Transport layer explained - After creating the segment the very next thing Transport Layer does is that, it adds the source and destination port number to each segment. Transport Layer, add two port numbers to each segment – source and destination. Source port number includes the port number of sender’s machine and destination number contains the port number of destination’s machine.
Port numbers help in directing or forwarding data to the correct process (a computer runs many processes simultaneously like sending an email, make a VoIP video or audio call and browse at the same time (all of this from different applications)) or application. Port numbers uniquely identifies each process that is running in a computer. A computer identifies each service or a process by a port number. Each process has a unique number assign to it. For example, port 80 handles the web pages or actually http request. Port 587 handles the secure emailed. Port 21 manages the file transfer.
Let’s say you send an email to your friend. When email reaches at your friend’s device than how the receiving device knows that where or to which process the email should be delivered? Receiver’s device is also running multiple processes. The Transport Layer takes the data segment and checks the destination port number in the segment. Then it forwards data to the specified port number. Transport Layer requires port number to correctly deliver the data segment to the correct process or application. This is also called Port to Port Delivery or End to end data delivery.
Flow control
Transport layer explained - Flow control decides the amount of data that needs to be transmitted. Transport Layer makes sure that sender does not send more data than a receiver can handle or process. For example you want to download a file from the internet. The server where you are downloading files from can transfer data at 200 Mbps speed, but your device has slow internet connection and it only accepts or processes data at 1 Mbps speed. If the server starts sending data at 100 Mbps rate, which is greater than what your device can handle, so obviously data is lost.
How flow control fix this problem?
So before receiving data, receiver informs sender about its receiving capacity. Then sender sends the data according to the rate that receiver advertised. Flow control is managed through window size.
Error control
Transport layer explained - Transport layer takes care of errors in the data. If data is corrupted (повреден) or does not reach to the destination, then it uses automatic rebate request method (автоматичен метод за заявка за отстъпка) to retransmit to the lost or corrupted data. Transport layer adds checksum (A checksum is a value that represents the number of bits in a transmission message and is used by IT professionals to detect high-level errors within data transmissions. [Контролни суми]) to make sure that added free data is delivered to their destination.
- Reliable & Unreliable Data Delivery
Transport layer explained - Reliable Data Delivery
Transport Layer provides both reliable and unreliable data delivery, depending of the application. We have two major protocols at the Transport Layer- TCP and UDP (also SCTP but UDP and TCP are the most used and dominant). Most applications need the guaranteed data delivery, but there are some applications that necessarily do not prioritize the guaranteed data delivery. Lost packets do not need to be retransmitted there. Transport Layer uses either TCP or UDP protocol for process to process data delivery, depending on the application. For example, Transport Layer uses TCP protocol, where data is a must. Service like sending email use TCP. Emails need the guaranteed data delivery rate. Anything you download from internet uses TCP. So TCP is a reliable protocol. TCP is a connection oriented protocol because in order to guarantee the data delivery, TCP establishes a connection between the sender and receiver before exchanging the data. It makes sure that a receiver is ready and willing to exchange the data. TCP uses a method called acknowledgement to guarantee a data delivery. When data is send through TCP, it waits for an acknowledgement from receiver whether their data has been received or not by the receiver. TCP retransmit the lost and corrupted data.
Unreliable Data Delivery
Transport Layer uses UDP protocol, where the guaranteed data delivery is not priority. Examples of application which don’t care about reliability are live streaming, VoIP audio or video calling. Let’s take an example of live streaming. If you are watching a live stream and your internet connection stops or disconnects for a few seconds and when you join back the live streaming, live streaming application will not resume where you left when you lost the connection. It will only show you what’s streaming at the moment. Lost packets will not be retransmitted here. UDP keeps sending the data. It doesn’t matter whether data reaches to destination or not. UDP is a connection, less protocol. That means it does not establish a connection with receiver like TCP does. UDP does not have any mechanism such as acknowledgement to check whether data has been received or not. It simply keeps sending the data, that makes it faster than TCP. Sites of UDP packet is also smaller than TCP.
Host to host delivery or Source to Destination Delivery
Network layer explained - Host to host delivery simply means delivering data from sender to receiver. In the Transport Layer we have process to process delivery. Process to process delivery only happens when data reaches at the destination, and network layer does that. It delivers data to the receiver, than passes data to the Transport Layer and Transport Layer forwards data to the correct process. At the receiving end data moves bottom to up, so Transport Layer is above Network Layer. Network Layer delivers data to Destination and Transport Layer delivers data to the correct process.
Logical Addressing
Network layer explained - Logical Addressing is the process of adding IP address of sender and receiver to the data segments. Network layer adds two IP addresses to form the received (from transport layer) packets. IP address basically locate where each device is. Each device that uses internet has unique IP address. IP addresses are added to data so packets can reach correct destination.