OSI model
Open system interconnection model
Communication between two computers connected through a cable and RJ connectors.
Each layer is a package of protocols
7 Layer model
Application Layer: Uses protocols to access net
Presentation Layer: Convert text/audio/video into binary
Session Layer: Establishes the connection
Transport Layer: Converts into segments and adds port number and sequence number into each segment.
Network Layer: Convert segments into packets by adding logical address
Data link Layer: Converts packets into frame by adding physical address
Physical Layer: Transmits the data by converting into signals
Application layer
Is used by applications that use the internet like Google chrome, skype.
Application layer provides services to network applications with the help of protocols to perform user activities.
Protocols: HTTP /HTTPS (Web surfing), FTP (File transfer), NFS, DHCP, SMTP (Emails), TELNET (Virtual terminal), POP3, IRC, NNTP
Presentation layer:
Session Layer:
Just like party planners and helpers, Session layers has its own helpers, Called APIs. NETBIOS (Network basic input output system) is an example of \API which helps application running on different computers to connect with each other.
Process:
Before establishing a connection with the server, the server does the authentication(to check who you are) by using the username and password provided.
Post authentication, user’s authorization(If you have the access to sess the desired resource) is checked.
Session management
YOUR WEB BROWSER DOES ALL THE OPERATION OF “SESSION, PRESENTATION AND APPLICATION LAYER”
TRANSPORT LAYER passes the data segments to NETWORK LAYER
Network layer
Works for the transmission of data segments from one computer to another located in a diff network.
Data send is called as packets.
It’s the layer where the routes determines.
Duties
NETWORK LAYER passes the data packets to DATA LINK LAYER
Data link:
Two kind of addressing
Logical addressing: Done at Network layer. This is assigning of IP address of the sender and the receiver.
Physical addressing: Done at data link layer. Mac address(12 digits alphanumeric address embedded in Network interface card by the computer manufacturer) of receiver and sender assigned to data packet.
Data you read in Data link layer is FRAME.
Data packet → [IP1 IP2 |Segment | TAIL]
Frame → [MAC1 MAC2 | Packet ] which is
[MAC1 MAC2 | IP1 IP2 | Segment | TAIL ]
Data link layer is embedded as a software in the Network interface card of a computer and provides means to transfer data from one comp to another via local media (copper wire, fiber or air for radio signals).
NIC (sender) -----------(MEDIA like copper wire, fiber or air) ------------------ NIC (receiver)
Two duties: (Fig 1)
But why we don't use OSI model?
OSI is actually not an implementation but a concept model or references, TCP just implement the layer 4 (transport layer) of it. When we implement a communication protocol, we often make decision of which layer in OSI should be implemented, and you can merge some layer together.
Here is a example when we design a new communication system:
First, we will define which kind of physical media we need, e.g. differential signal, or TTL, and how long distance it can transmit, i.e. Physical Layer (OSI Layer 1).
Second, we need addressing linked devices, so a device knows what data should be received or just bypass, i.e. Data Link Layer (OSI Layer 2).
Third, if data don’t needs to be routed cross networks, we can just put Application Data on it (OSI Layer 6-7). Or if it should be routed across networks, we define a routable protocol e.g. IP or any else custom protocols you like (OSI Layer 3).
Forth, now, you may be concerned about data consistency, sequences, validate, traffic control, so you implement the TCP protocol to keep your data safe. i.e. Transport Layer (OSI Layer 4)
Fifth, your customer never want to make their communication be seen by others, so you would give them something (e.g. a token, certification..) to distinguish each customer, make sure you making a private conversation. i.e. Session Layer (OSI Layer 5)
Sixth, data format defined at Presentation Layer, so your system know how to decode/encode your data. (OSI Layer 6)
Last, your actual data here. Application Layer (OSI Layer 7).
So, OSI defined what things you need to concern in a communication system, but you can choose not to.
3.4k views · View Upvoters
Srcs: