Networking fundamentals tutorial – OSI and TCP/IP protocol stacks

Hello dear readers,
Today we will continue our journey discovering more interesting things in the networking field. To successfully transmit a message between two individuals we have to create the so called protocols. Protocols set the rules needed in communication. In networking we use protocols to determine how a piece of information is transmitted over the medium. To do this we use a group of protocols that are used in different layers. Protocols are related to each and each one plays a crucial part in communication. This set of communication protocols are called in networking protocol stacks and they are governing the behaviour in both hardware and software. These protocols are situated on top of each other in a layered hierarchy. A message must pass trough each layer in order to be processed from source to destination. We will describe each layer and it’s role in networking communication. In this post I will present the protocol stacks that are used in networking, based on the industry standards. These protocol suites describe how a message format and structure should look like, how this message is transmitted over the medium, the errors that can occur during communications and how the message should be terminated. The industry standards are set by companies like Institute of Electrical and Electronics Engineers (IEEE) or the Internet Engineering Task Force (IETF). This companies are dedicated in discovering and implementing network technologies. Implementing stacks in a layered model brings a lot of benefits, one of them is that using this kind of architecture each layer is independent from each other and each one can be implemented and developed independently. That’s why different companies that develop different hardware and software products can work together. In today’s networking standards there are two main protocol stacks used, the Open Systems Interconnection (OSI) model and the TCP/IP model. We will describe the differences between these two in a moment but for now I will create an image of the two models used in networking:
OSI and TCP models
As you can see the OSI Model is using a 7 layer architecture starting from top to bottom they are called Application, Presentation, Session, Transport, Network, Data Link and Physical layer. The TCP/IP Model is using only a 4 layer architecture, Application, Transport, Internet and Network Access. You can see that some names can be found in both of the stacks, we will describe these two protocol suits and how they are related to each other. In our days the TCP/IP model is mostly used in networking. Each layer from the stack has a determined role as follows: The Application layer incorporates the 3 upper layers in the OSI model , Application, Presentation and Session into a single layer. This layer is closest to the user and from here the data is first created and then send to the lower layers for further processing. The Transport layer is used to provide end-to-end communication services for applications across different devices over networks and it’s similar to the Transport layer in the OSI model. Internet layer is used to create the path that a message should follow from source to destination and it has the same functionality as the Network layer in the OSI model. Finally the Network Access layer is the one that controls the hardware devices that are used in networks. When a message is passed from source to destination it is first created at the Application layer at the source than passed to the Transport, Internet and Network Access layers. At the destination the information is passed from the Network Access to the Internet, Transport and in the end to the Application layer. At each layer the message is processed and new information is added, this process is called encapsulation. The whole processing information at each layer forms a PDU (protocol data unit). The PDUs have different names at each layer as follows:
Application layer PDU – Data
Transport layer PDU- Segment
Internet  layer PDU – Packet
Network Access Layer PDU – Frame
And of course when information is transmitted on the medium it is transmitted in bits.
I will create a post for each layer in the TCP/IP model and there you will understand each layer’s functionality.
If you look at information when is transmitted over the medium it will look like a stream of bits 1 and 0, something like 1100110101010111100000011 etc. This is not readable by humans but hardware devices know how to read and interpret the stream of bits. At each layer more information is added and each has a unique role:
At the Application, Presentation and Sessions layer the data is created and encoded, at the Transport layer the source and destination port numbers are added (we will talk about ports numbers in a future post). Network layer adds the source and destination logical addresses, Data Link layer adds source and destination physical addresses and the Physical layers deals with synchronization and timing.
Now let’s imagine the following example: You are a home user that is trying to access a web page.
The following image will interpret out scenario:
TCP model
As you can see when the user is trying to access the web page, the computer needs to communicate with the web server at the remote destination. The user can’t see what’s happening on the host in the communication level. His request (data) is processed by the Application layer and then is send to the Transport layer where the source and destination port is added, usually port 80 is used when accessing HTTP. At the Network layer the source and destination logical address is added also called IP (Internet protocol) address (example Data link layer adds the physical address also called MAC address ( this address is built in every network interface card). When the message is send over the medium timing and synchronization bits are used to successfully transmit the message from one end to another.
This is all for our third post, in the next one we will start talking about each layer. I hope this was an interesting post for now I wish you all the best.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s