The Osi Stack. the number Seven. the Parsley and Katy Perry

The Osi stack model is like parsley  in Italian cooking (for my fellow non Italian SAs: I have to say you something. Please, have a seat and try to control your reactions. We Italians do not use parsley everywhere like you think we do. I.e. we do not use it in Bolognese sauce or as pizza’s toppings. Parsley is allowed in Marinara sauce and, generally, in combination with garlic -not too much if you want to kiss someone instead of having dessert – but parsley is absolutely forbidden everywhere onions are used and you have to add it at the end to avoid parsley to be overcooked. Now, you know the truth and you have the power. Use it with responsibility).

So let’s start again in a more precise way: the Osi stack model is like parsley in overseas people’s idea of Italian cooking. Every book that you open, every article that you read, every blog (including this one), when starts talking of networking then pulls the Osi Stack rabbit out of the hat.
Really there is a good reason. As we already know (please see this post), network management is a complicated issue, and layering the tasks is a good way to split a big problem in less and more manageable ones.
The Osi stack model is organized in 7 levels. The reader can fairly asks himself why just seven, not  six, eight or forty two (that’s at least the answer to life the universe and everything). That’s a damn good question.
On another hand, the frugal TCP/IP model has only 4 levels according rfc1122 (5 levels for some lavish authors and just three for the more stingy others). There is a precise scientific answer for this important question: the layers are numbered after The Magical Number Seven, Plus or Minus Two, so please do not ask more and let’s go ahead.
After explaining some secrets about parsley and the number seven is time to coming back to technical language. Honest.
Please, trust me, I want to be professional, but I found this great picture on the Italian Wikipedia Osi Stack page and I’m going to explain layers meanings using it. It will be quite difficult to stay fully serious.
At the seventh level we find the boss:  he is a company A manager, so he only thinks at the higher levels. He doesn’t know too much about how things work, he just imagines, creates, letting other people doing the “implementation details” (and consequently sweat). For some mysterious reasons, he decides that a gift have to be sent to his company B fellow manager. In our world, this level is the application level. A telnet client that wants to send a packet to a telnet server. He doesn’t care how, the just give the gift (the data) to the sixth level, the assistant, with the destination address and some other information formatted by the manager personal style (a telnet client can format information in a different way than an ftp one).  The assistant plays the presentation level of Osi stack. Several managers have to use the same secretary, then assistants have to correct errors and standardize managers directives in order to avoid secretary to be overloaded by different calligraphy or by bizarre directives.
The secretary on the fifth layer, starts the delivery mechanism. It means that now someone is in charge to control that the gift will be delivered knowing everything about expedition number, date of departure and departments involved in the procedure. So a “session” is established.
Now is time to carry the gift at the post office. The control passes to the fourth level, that obviously is called “transport” (they tried to name the level after one of Santa Claus’s reindeer, but it didn’t look so professional. The obvious “transport” easily won the game). The “chauffeur” is the first employee that physically leaves the company building and establishes a kind of connection with the destination. he is in charge of taking care of the box, avoid traffic congestion on the route to the post office and keep company car well-functioning. In the data transmission world this is a really important level where a lot of interesting stuff happen like packets fragmentation control and routing congestion management.
When the gift arrives at the post office located at the third level, the responsibility of the procedures is now on on post office workers. It means that no one of the sending company employees  knows exactly what happens in the postal office back office.This is great. The parcel service can choose to use a stagecoach, atomize the box and send it via a teleportation portal or rent a warp speed star ship. The only things that sender knows are the forms that have to be filled and times and prices agreed with the parcel service. By the technical point of view, it means that the network level obscures what happens after the gift delivery to the front office. This is a great feature because you can be a telnet client or a tso connection, but you doesn’t have to worry about how your gift will be worked by parcel service.
Now, at level two, we are in the post office back office. The gift needs to be packed to be safely delivered to its destination. It means that if you are a lucky guy, you are going to receive some bubble wrap to play with. In the network world, the datalink layer assemble data to travel over physical layer. It means adding headers, control sequences and setting flow control to manage transmission speed. We are here, at the frame layer.
The first level is the physical one. As you can see by the picture, it is necessary to carry boxes so a kind of physical attitude is required. No too much useless talk about esoteric questions, just muscles. Not considering the funny picture, the first level is about the media used to carry data. So it can be everything capable to transmit information: native Americans smoke signals, warning beacons, the thin cable connecting tin can phones a wireless 4G network or even a standard Ethernet cable. It doesn’t really matter. The only interesting thing is that someone is taking care of carrying data.
Really, here, the electromagnetism rules in all its incarnations. Cables, FC-AL, wireless networks, the whole repertoire of particles, which have mass, but also waves, which transfer energy. But this is matter of quantum physics so, better to stop here.
When the parcel arrives in the post office of the town of company B, the process starts, this time, from the lower layer to the higher, where every layer plays exactly the same tasks, this time as receiving side.
The internal beauty of this kind of approach stays in the fact that, layering the  task, everyone needs only to know how to talk with the higher level and the lower one without any worrying about other levels. So, can specialize his approach to the best he can do. Within the layer, he can organize his work in the better way he can. The only obligation is to respect borders rules when accepting immigrants from other levels and when sending stuff outside.
The layering in network communications marked a great point detaching the high level applications and  transmission of data, encouraging specialization, parallelizing layers implementation and making higher level applications free to be debeloped without any idea of the mess that is used to bring the new +Katy Perry video to your 21″ monitor.
And if something is useful to allow me to see +Katy Perry eyes, I like it at most.
No tcp-3way handshake was harmed to bring this picture in this blog