So you are studying networking – and then you get to read about the OSI conceptual framework which explains how network communication happens…
Well, I don’t know about you but when I was studying this stuff, my head would start spinning very quickly!
So I thought I would make this blog post trying to put the whole idea slightly lighter, while still keeping the essence of it. So this is not a comprehensive analysis of the OSI Model. I was rather thinking this post could be complementary to what you understand already (or think you do).
The OSI model provides a framework for network communications and therefore, it provides a set of rules and guidelines which apply to any protocol stack – TCP/IP, Novell NetWare, Appletalk, etc.
With scalability in mind, the OSI model defines seven communication layers. In reality, each layer represents a set of functions (aka. protocols) implemented within the respective protocol stack towards achieving a common objective. For example:
Some devices, would only implement protocols up to Layer 2 – such as Switches; other devices implement functions up to Layer 3 – such as Routers; Operating Systems protocols up to Layer 7.
Do note that all layers implement more than one protocol – for example, SMTP (for sending emails), FTP (File transfer), HTTP (web) – all belong to the Application Layer 7.
The OSI model was later simplified into what is referred to as the TCP/IP Model. Since it’s simpler (4 layers only), going forward, I will refer to the latter – the concepts remain the same.
Below is a conceptual diagram of both models.
In the diagram, I am also showing how the actual data is referred to depending on the current layer – Frames, bits, packets, segments and data.
Sending an eMail …
In a very simplistic example, let’s see what happens when we send an email.
- Data is encapsulated into a special format defined by the SMTP protocol at the APPLICATION layer
- OS passes processing to the TRANSPORT layer / port 25) – which is also going to do its “magic” and encapsulates the Segment into a format defined by the TCP protocol
- Control is given to the INTERNET layer which, once again, will encapsulate the data into Packets, as defined by the IP protocol
- At the NETWORK ACCESS layer, data is converted into frames and later, into bits, to further be converted into electrical signals
- Decapsulation begins … At the remote end, the network card connected to the wire receives electrical signals and converts them back into bits; once all relevant bits are received, the frame is then revealed
- The frame is passed to the INTERNET layer – here the frame is now decapsulated and the IP packet is revealed
- The packet reaches the TRANSPORT layer where it is further decapsulated revealing the segment
- At the APPLICATION layer, the segment is one last time decapsulated and the email content is revealed to the email recipient
It is important to understand that layers communicate horizontally – i.e. when communication starts at Layer3, it will always terminate at Layer 3 – never above, never below. In practice, this really means that two protocols communicate together in a server-client fashion.