FirstHack Learn
Log in Sign up free
Lessons in this course 0/6 All courses Computer Networks

CSE

Progress0 / 6 lessons
  1. 1. What happens when you type a URL and press enter
  2. 2. The layered model, without reciting it like a poem
  3. 3. IP addressing and subnetting, with worked examples
  4. 4. TCP vs UDP, and why each one exists
  5. 5. DNS, DHCP and ARP: the three protocols that make it work
  6. 6. HTTP, HTTPS, and what TLS actually protects

Courses › Computer Networks

TCP vs UDP, and why each one exists

What reliability costs, how TCP delivers it, and the cases where UDP is the correct choice.

13 min read · Lesson 4 of 6 · Pro

IP promises almost nothing

IP will try to deliver your packet. It may drop it, deliver it twice, deliver it out of order, or corrupt it. There is no acknowledgement and no retry. That is called best-effort delivery, and it is deliberate — keeping the network simple is what let it scale to the whole planet.

Everything anyone wants from a network beyond "try to deliver this" is built on top, at the transport layer, on the two end machines. That is where TCP and UDP live.

What a port is

Both protocols add port numbers. IP gets a packet to the right machine. The port gets it to the right program on that machine.

The rest of this lesson is Pro

The free lessons of Computer Networks finish what they start — read those first if you have not. This one goes further, and it is part of the paid half.

A pass opens the paid lessons of every course, the mock test papers and the company-wise series. It ends on its own date; nothing renews by itself.

Get a pass — from ₹29 for 7 days

Already bought one? Log in.