Back to basics #2 – TCP/IP 101
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
ToggleAt 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.
Leave a Reply
You must be logged in to post a comment.