Learning Internet Protocols: TCP, IP, and UDP for Beginners


Hello! Have you ever wondered how we transfer information over the internet? Whether you're browsing the web, sending an email to someone, or watching a video on the web, there's a lot of work going on behind the scenes. One of the most important parts of this work is the Internet Protocol (or IP), which enables computers to talk to each other. In this world of protocols, two others — TCP and UDP — are significant contributors.
But don't worry, I'm here to explain everything to you in the simplest language possible. Forget all the technical jargon — we'll keep it plain and simple. Okay, let's get going!
What Is an Internet Protocol (IP)?
Imagine that you want to send a letter to a friend. You would insert the letter into an envelope and then add their street address, city, and country on the envelope to mail it. This is how the letter reaches the recipient, wherever they might be.
On computers, Internet Protocol (IP) is similar to the mailing address system. IP helps data (your message, video, or website information) move from computer to computer on the internet. Each computer and attached device on the internet has a one-of-a-kind IP address, similar to your street address. An IP address ensures data arrives at the right location.
Let's keep it simple:
IP is like the mailing address on an envelope.
It tells the internet where to send information.
What is TCP (Transmission Control Protocol)?
Now, if you send that letter, instead of just tossing it into the mailbox and hoping for the best, you would want that letter to be delivered safely and in order. You might request the postman to confirm when the letter is delivered. If something goes wrong, like the letter gets lost or the pages become disarranged, you would want that fixed, wouldn't you?
This is what TCP does to data on the internet.
TCP (Transmission Control Protocol) makes sure that data from one computer to another gets there in the right order and in the right way. If some of the data is missing or out of place, TCP will ask it to be sent again.
For example, when you're sending a large file or a web page, TCP ensures that all the fragments (or packets) of data arrive in one piece and in the correct sequence. It's like an over-organized and nitpicky delivery service.
Here's the lowdown:
Segmenting the message: The message is broken up into infinitesimal "packets" of data.
Transmitting and acknowledging: A packet is sent and the sender waits to hear from the receiver.
Reordering: If packets are misordered, TCP arranges them in the proper order before delivering the data to you.
Retransmitting: If a packet is lost, TCP asks for it to be retransmitted.
Think of TCP as a secure, safe mail for important data.
What is UDP (User Datagram Protocol)?
Alright, let's take a step back and look at UDP, short for User Datagram Protocol.
Do you remember how TCP made sure the letter got there safely, in the proper manner, and in the proper order? Well, UDP does not care about any of that. It is like sending a postcard where you do not care if it gets lost or if it arrives in the proper order — you just send it quickly and pray it works out.
That is:
UDP is faster, but less reliable than TCP.
It does not check if the data arrives securely or in the right order.
It's a type of instant, no-strings-attached sending of data.
You might be wondering, why would we ever use UDP if it's unreliable? Well, UDP is ideal for uses like live video streaming, online gaming, or real-time communication (like voice calls). In these situations, it's better to keep it simple and not worry about lost packets — because if a little bit of data gets lost during a video call, it really isn't the end of the world, but if we wait for everything to be delivered flawlessly, the call freezes or lags.
How Do These Protocols Work Together?
You can think of these protocols as a team, each contributing its part in making the internet work.
IP gives the data the proper address so it arrives at the right place.
TCP ensures the data gets to the destination safely and in the proper sequence, essential for applications such as emails, file transfer, or web browsing.
UDP sends information in a quick way without paying very much mind to error or order, and that's perfect for applications involving real time, like a video game or a streamed video concert.
Real-Life Scenario
Let's suppose you're observing a concert broadcasted in real-time across your cell phone.
IP is making the information (video and sound, etc.) exactly sure of where to end up — at your phone.
UDP is used here because the concert is live and we have to send the audio and video as fast as we can without the data being error-free. We might not realize if a negligible amount of video or sound gets lost.
If you were downloading a song from the internet, TCP would be used because you want to guarantee that the whole file gets sent flawlessly and in sequence.
In Conclusion
IP: Think of it as the internet's address system. It makes sure the data arrives at the right place.
TCP: A conservative, reliable system that checks if the data is received properly and in order.
UDP: A faster system that does not check if the data is delivered perfectly, but it is appropriate for real-time applications like gaming or streaming.
Next time you're using the internet, remember that these protocols are working together to make sure your data reaches you safely and quickly — whether it's a slow and steady file download or a fast-paced video stream.
Subscribe to my newsletter
Read articles from ANKESH KUMAR SINGH directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
