Internet Protocols : TCP/IP and UDP explained along with OSI Model:
Understanding the need of Internet Protocols…
Have you ever experienced outstation train journey? The answer will be mostly “Yes“ , as travelling through train is one of the affordable and reliable means of public transport. But have you ever wondered in this complex network of humans living together where millions and millions travel each second, how are you able to secure reservations for yourself on a particular seat of a particular train reaching on a particular station? The answer will be probably through secure transactions, ticketing systems , verification of identity etc.
In Simpler terms A set of rules/ protocols is introduced to maintain safety and reliability between you and train...and further train to the destined station and further more.
Similarly , in the complex network of internet where there are millions of users connected together ,A set of protocols was introduced by computer scientists Vinton Cerf and Bob Kahn to ensure data reliability , safety and seamless data transfer between two or more connected devices. Thus, the set of rules/standard that ensures how a data is exchanged between two devices are termed as “Internet protocols“.
What is OSI Model?
OSI model that stands for “Open System Interconnect” model consists of 7 layers that ensures reliable transfer of data between two connected devices that is present within a complex network .
In Simpler terms, A 7 step process that ensures the reliable transfer of data from one device to another.
Working of an OSI Model:-
The Open System Interconnect Model or simply OSI models consists of 7 layers for reliable transfer of data. The 7 layers include :
7)Application Layer : an interface to transfer the required data between frontend and backend.
6)Presentation Layer : checks for encryption, decryption, compression (TLS , SSP)
5)Session Layer : Monitors the connection/session between the connected devices.
4)Transport Layer : Ensures end to end connection and reliability of data Transfer.
3)Network Layer : Routes the data to the destination sever through Routing.
2)Data link : Frames the data, to ensure error free data transfer.
1)Physical layer : The layer that contains the required hardware for data transfer (wires, cables) that transfers data in form of bits (combination of 0s and 1s)
Note: Application layer, Presentation layer, Session layer can be generalized into a single layer termed as “Application layer“
Introduction to TCP :
TCP is a Transport layer Protocol that stands for Transmission Control Protocol is set of rules that checks the originality of data / verifies data and ensures reliability during data transfer.
It ensures every information given by the Client to the server is present and also ensures the order number / sequence / arrangement of data for reliable data transfer.
Some features of TCP include:
Reliability (No Data loss)
Data is ordered
3 way handshake
slower than UDP as it ensures reliability resulting in time loss (latency).
Introduction to UDP:
UDP is a Transport Layer protocol that stands for User Datagram Protocol. Unlike TCP that offer a reliable data transfer , UDP does not offers any reliability such as delivery of complete data or data in correct order, thus making it lightweight than TCP resulting in faster data transfer times as compared to TCP.
Some features of TCP include:
Not Reliable (Data loss may occur)
Data is unordered
lightweight than TCP and hence faster data transfer times.
Some examples of use Cases of TCP and UDP includes:
flowchart representing some real life examples of TCP and UDP
-End