Have you ever wondered how your chat message instantly in real time reaches your friend who lives in a separate state or country, how websites load effortlessly, how your email travels across the world in just mere seconds ? In the vast world of the internet communication is the backbone of every interaction that happens in the right way and have some set of rules or you would say a set of protocols known as TCP/IP which stands for Transmission Control Protocol. TCP/IP enables devices across the globe to communicate effortlessly and ensure the right way of data exchange.
But before you get into TCP/IP, you should know about some basic stuff like network protocols, the OSI model and in the next upcoming section you learn about UDP and how UDP differs from TCP. Lets start with network protocols first.
What are Network Protocols ?
Network protocols are a set of rules or protocols that devices use to communicate with other devices, servers, machines, etc and without network protocols, computers, smartphones and other devices would be unable to exchange data efficiently in the correct order. They act like a middleman that ensures smooth and reliable communication between devices. Protocols make it possible for the devices to understand each other just like a common language (english) enables people to communicate in most parts of the world. It defines how data is formatted, transmitted and received while following protocols. Protocols help manage data transfer to avoid confusion or data loss.
For example → when you search and browse a website your computer and the server follow HTTP/ HTTPS protocols to send and receive data securely.
(if you want to know more about HTTP/HTTPS, here is the link to blog where I explained HTTP/HTTPS )
What is the OSI Model ?
Before diving into TCP/IP it is important to understand the OSI model which is known for Open Systems Interconnection. The OSI model is like a blueprint for how data is transferred over a network. There are seven layers of OSI model (below to up).
1 → Physical Layer - Handles the actual transmission of raw data packets over cables, fiber optics, wireless, etc. Its like a road where a delivery truck travels to deliver the packages.
2 → Data Link Layer - Ensures data transfer between devices and finds any errors happen while transmission of data. Think is like the traffic rules which ensure smooth travel between two locations.
3 → Network Layer - Decides the best path for the data to travel across multiple networks. Its like GPS guiding you to your destination.
4 → Transport Layer - Manages data delivery and ensures it reaches the right application. Its like the packaging service that your package is safely and securely delivered.
5 → Session Layer - Establishes, manages and terminates communication sessions. Think as a conversation between you and the delivery service confirming your order details.
6 → Presentation Layer - Formats and encrypts data for the application layer. This is like translating the delivery label into a readable format thats it.
7 → Application Layer - Where users interact with applications like browser, chat app, etc. This is the store section where you place and receive your order.
Now you have some basic knowledge to understand TCP/IP.
What is TCP/IP ?
TCP/IP is a set of rules that control how information travels over the internet. Think of it as postal system for digital data just like you use envelopes, addresses and post office to send letter same as computers use TCP/IP to send information. It helps ensure that your data reaches the right destination safely and securely in the correct order. It ensures Interoperability means the standards, protocols, technologies, and mechanisms that allow data to flow between other device systems with minimal human intervention. An important process to establish a reliable connection between two devices over a TCP/IP network is known as the TCP 3-Way Handshake. SYN (Synchronize), SYN-ACK (Synchronize-Acknowledge) and ACK (Acknowledge) are the three steps required. The client and server confirm the connection establishment and exchange initial sequence numbers during the handshake.
Key Components of TCP/IP
TCP/IP model has layers and each layer has a specific role in delivering your data. Lets discuss each layer in simple words.
1 → Application Layer - This is the topmost layer where you interact with applications like web browsers, video streaming, email, etc. Think of it as the store where you place your order. Example - HTTP for web browsing, FTP for file transfer, etc.
2 → Transport Layer - This layer ensures your data gets to its destination reliably and securely. Think of it as the packaging service that ensures your order is safely boxed and labelled. Example - Protocols like TCP (for secure and reliable delivery) and UDP for faster delivery without checking much, etc. (Don’t worry you will get to know about UDP in the upcoming section).
3 → Internet Layer - This layer handles addressing and routing with ensuring your data finds the right path for its destination. Think of it as the address label on your package and the navigation system or manual of the delivery truck. Example - IP for assigns addresses to devices , ICMP for reporting the error, etc.
4 → Network Access Layer - This is the layer that deals with the actual transmission of data over wires, cables, fiber cables, wireless signals, etc. Think of it as the physical delivery process like the roads and vehicles used by delivery services. Example - Ethernet, wireless LAN, etc.
What is UDP ?
UDP stands for User Datagram Protocol is another important protocol used in the transport layer of networking. UDP is one of the core protocols of the internet protocol (IP). Unlike TCP, UDP is solely focused on speed rather than reliability. It allows data to be sent without establishing a connection and does not ensure that the data reaches its destination in the correct order. UDP sends data directly without checking all data packets or waiting for a confirmation which makes it faster than TCP and also there is no need to establish or maintain a connection which reduces the overhead but it does not guarantee data delivery fully so that’s why its best for application where some loss is acceptable. Example - online gaming like leauge of legends, valorant, csgo, etc.
Key Components of UDP
1 → Datagram Based - Data is sent in small piece of packets (data packets). Its like sending new year greeting cards to your friends where each card can take its own path to the destination and some might not arrive to some of yours friend.
2 → No Acknowledgements - UDP does not wait for confirmation that data was received. Its like shouting instruction to make a line in a crowded place but you are not sure if everyone heard it.
3 → Low Latency - UDP is faster and ideal for real time application like online gaming because it skips error checking and acknowledgement steps. Example - online gaming, video calling, etc.
4 → Broadcast and Multicast Support - UDP can send data to multiple devices at once. its like a TV broadcast where the signals are sent to many viewers simultaneously.
Why TCP/IP Matters
TCP/IP is lika a an universal language of the internet like english in international air travel. Without TCP/IP devices would struggle to communicate with each other like a traveller speaking a different language (Chinese) in London (English) so a traveller would struggle if he/she doesn’t know international language like english. Without TCP/IP the easy and securely exchange of data that powers the internet would be impossible and many of the services we rely on daily like from streaming to browsing the website would not function properly.
Conclusion
TCP/IP is like the delivery systems of the digital world which ensures data travels reliably and safely. Think of it as a postal (post office) system for digital data just like you use envelopes, addresses and post offices to send letters same as computers use TCP/IP to send information. Its like an organized delivery service that keeps the world connected as same as TCP/IP keeps our digital world running smoothly.
Thanks for reading this far.