top of page

Guaranteeing Data Delivery Through TCP

Introduction


So far, we've talked about Internet Protocol (IP) and its role in distributing data from one machine to the other through packets and routers.


But there was one question left unanswered: what happens if a packet isn't delivered successfully?


Luckily for us, Transmission Control Protocol (TCP) ensures that all data sent is successfully received.


The Role of TCP


Where IP transfers information from one machine to the other, TCP is responsible for directing that information to the correct program on that machine.

  • "program" refers to some sort of browser or e-mail client, etc.

  • each program has a port number that it runs on

    • ex:

    • HTTP uses port 80

    • HTTPS uses port 443

    • DNS uses port 53


So, in short:

  • knowing the IP address (from IP) helps data reach the machine

  • knowing the port number (from TCP) helps data reach the program


Guaranteed Delivery


Another feature of TCP is its guaranteed delivery of packets, which IP does not do.


If the parking lot of packets isn't full--when all the data isn't delivered--TCP requests for that missing data to be sent again.



TCP keeps track of information like:

  • how many packets the receiver should expect

  • in what order they should arrive


So, if ever a router can't handle a packet and decides to "drop" it (because it's too congested or something went wrong), TCP will know that there is a missing packet and ask the sending machine for a replacement!


With all required packets together, TCP can assemble them and give them to the program, as intended.


Final Thoughts


As you can probably tell, both protocols are heavily interrelated and data transfer would likely be impossible without them, which is why people bunch them into one term: TCP / IP.


Thanks for reading!

Comments


bottom of page