Skip to content

Menu

  • About me
  • Chlebik Reviews

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024

Calendar

July 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jun   Aug »

Categories

  • AWS
  • Back To Basics
  • Blog
  • Book Review
  • Certification
  • Erlang
  • GC Theory
  • Go
  • Java
  • Kubernetes
  • Monthly summary
  • Valuable links
  • Weekly summary

Copyright Michał 'Chlebik' Piotrowski 2025 | Theme by ThemeinProgress | Proudly powered by WordPress

Michał 'Chlebik' Piotrowskiprogrammer, blogger, wizard apprentice
  • About me
  • Chlebik Reviews
Written by Michał Piotrowski2024-07-22

Back to basics #2 – TCP/IP 101

Back To Basics Article

Recently, as I was preparing for AWS certifications, all kinds of networking concepts seemed to pop out everywhere. I was afraid to open the fridge. I was worried that some kind of VPC configuration and routing table will jump right at me 😉 Building on that let’s dive into the very basics of what this whole TCP/IP is. Pure back-to-basics stuff.

Table of Contents

Toggle
  • At the beginning there was a network
  • So what are you doing here exactly TCP/IP?
  • Pieces, moar pieces
  • What’s next for TCP/IP?

At the beginning there was a network

Let’s assume that everyone reading this article knows what the network is, so we can concentrate directly on TCP/IP stuff. Network in in order to operate, needs some rules, that all the participants using the network should follow. The word that is being used a lot in this context is protocol. I think that right now decrypting TCP/IP will be easier. It stands for Transmission Control Protocol/Internet Protocol. In short, those protocols form a standard, that specific software providers should implement. In the real world, it is usually operating system’s/hardware job, to provide that kind of low-level stuff. It is also quite often a simplistic, hands-on excersise in programming at the universities. Obviously, it is not about implementing the whole stack, but some parts of it.

 

So what are you doing here exactly TCP/IP?

Rules are rules, but they’re there for the specific reason. TCP/IP main goals are:

    • portioning message into smaller chunks
    • ensuring that the communication is constant, and the data is consise
    • finding right target for the communication
    • forwarding messages between applications

In order to handle all that goals, the overall stack was divided into smaller layers, which are independent of each other. When I was learning this stuff for the first time (long time ago), the dominant layering model was OSI – which consists of 7 separate layers. Nowadays it seems, that simplistic, 4-layer model is getting more traction. Below image shows the difference (thanks to Wikimedia)

 

In short, whatever is below “host to host” line is low-level as possible, and we can skip it (unless you’re thinking about passing some CISCO networking certs 😉 ). For all the layers above, that’s what we are mostly dealing with. Application layer from TCP/IP model is responsible establishing a session between the source and the target, parsing messages to the standard format, encryption and all the other application-level operations. The above image also nicely explains the TCP/IP combo. TCP is coming from transport layer, and IP from the network layer.

Pieces, moar pieces

Presented model is simplistic, and in order to make it more useful we need to dive a little bit deeper. Wikipedia gives us this simple image.

What interests us most here, are TCP, UDP and IP. In short – whatever message application layer creates, it gets transformed into a segment (for TCP) or datagram (for UDP). I assume that the difference between TCP and UDP is known to the reader. No matter the input, next step is performed by the internet layer, which uses IP (version 4 or 6) to properly set the target address, and the rest is going down to the network layers.

What’s next for TCP/IP?

I intend for this blog series to contain short entries, so I am going to stop right here. More to come, especially around addressing/CIDR, tracing and TCP&UDP.

Tags: internet, ip, layer, network, osi, port, protocol, tcp, tcp/ip

1 comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024

Calendar

July 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jun   Aug »

Categories

  • AWS
  • Back To Basics
  • Blog
  • Book Review
  • Certification
  • Erlang
  • GC Theory
  • Go
  • Java
  • Kubernetes
  • Monthly summary
  • Valuable links
  • Weekly summary

All the images (unless stated otherwise) come from Freepik.com

TwitterGithubLinkedinMail

Recent Posts

  • Valuable links #52 – PostgreSQL internals free book
  • Valuable links #51 – Is this post-developer era?
  • Valuable links #50 – Confessions of an Impostor
  • Valuable links #49 – The career craftsman manifesto
  • Garbage collection theory – Generational algorithms

Recent Comments

  1. Monthly summary #1 - June 2024 - Michał 'Chlebik' Piotrowski on About me
  2. Back to basics #3 - IP - Michał 'Chlebik' Piotrowski on Back to basics #2 – TCP/IP 101
  3. Weekly summary #6 - Michał 'Chlebik' Piotrowski on “Mastering API architecture” book review
  4. Weekly summary #5 - Michał 'Chlebik' Piotrowski on Back to basics #1 – Big O notation
  5. Weekly summary #5 - Michał 'Chlebik' Piotrowski on “Designing Data Intensive Applications” by Martin Kleppmann

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024

Categories

  • AWS
  • Back To Basics
  • Blog
  • Book Review
  • Certification
  • Erlang
  • GC Theory
  • Go
  • Java
  • Kubernetes
  • Monthly summary
  • Valuable links
  • Weekly summary

Copyright Michał 'Chlebik' Piotrowski 2025 | Theme by ThemeinProgress | Proudly powered by WordPress