Tuesday, February 24, 2015

Computer Networking 101 Part 1: The 7 Layers of the OSI model.



Most people are familiar with this icon.  This is the icon of wireless network but to most people this means, "I have connection to the internet" which translate to I can surf the web and get information.

My definition of computer networking is connecting 2 end points allowing them to communication with each other

There are different kinds of networks.  The most famous and popular is the internet.  There is local area network (LAN), wireless network, Metropolitan Area Network (MAN).  Regardless of what they are called or how they are implemented they serve one purpose – provide connection between end points so they can exchange information.

In the coming few blog series, I am going to bring out some basis networking concepts and terminologies.

When it comes to networking, the most important concept is the 7 Layers of the OSI model. I major in Computer Information Systems when I was in college.  Half of my classes are computer programming and half of them are business classes.  There was one elective class call “Data Communication”.  I fall in love with data communication/computer networking ever since and this one class changed my whole life.  One thing that was taught in that class was the “7 Layers of the OSI model”.

I am a software developer for networking equipment. In specific I develop firmware for enterprise grade switch and router.  I will go into switch and router later in the series.  What I found is that able to master the 7 Layers of the OSI model helps me to design and write communication software.

The definition of the 7 Layers of the OSI model can easily be found on the web (such as here) and I will not go into detail in this post but I will try to address how is the 7 Layers of the OSI model important in understanding networking?

Extracting from this website the definition of the 7 Layers of the OSI model are:

  • Layer 7: The application layer. This is the layer at which communication partners are identified (Is there someone to talk to?), network capacity is assessed (Will the network let me talk to them right now?), and that creates a thing to send or opens the thing received.  (This layer is not the application itself, it is the set of services an application should be able to make use of directly, although some applications may perform application layer functions.
  • Layer 6: The presentation layer. This layer is usually part of an operating system (OS) and converts incoming and outgoing data from one presentation format to another (for example, from clear text to encrypted text at one end and back to clear text at the other).
  • Layer 5: The session layer. This layer sets up, coordinates and terminates conversations. Services include authentication and reconnection after an interruption. On the Internet, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) provide these services for most applications.
  • Layer 4: The transport layer. This layer manages packetization of data, then the delivery of the packets, including checking for errors in the data once it arrives. On the Internet, TCP and UDP provide these services for most applications as well.
  • Layer 3: The network layer. This layer handles the addressing and routing of the data (sending it in the right direction to the right destination on outgoing transmissions and receiving incoming transmissions at the packet level). IP is the network layer for the Internet.
  • Layer 2: The data-link layer. This layer sets up links across the physical network, putting packets into network frames. This layer has two sub-layers, the Logical Link Control Layer and the Media Access Control Layer. Ethernet is the main data link layer in use.
  • Layer 1: The physical layer. This layer conveys the bit stream through the network at the electrical, optical or radio level. It provides the hardware means of sending and receiving data on a carrier network.

The importance of the 7 Layers of the OSI model comes with these 2 key words – Layer and protocol.

Layer
The OSI model  has clear definitions for each layer and each layer has it own unique function. 

It is the concept of layering that makes this 7 Layers of OSI model is so useful.  Each layer build on top of another layer. 




image source: http://media.techtarget.com/digitalguide/images/Misc/osi.gif

Communication starts from layer 7 of Host A, going down to layer 6, layer 5, layer 4, layer 3 , layer 2 and then to layer 1 with more information encoded as the data travel down the stack and then sent to Host B in which information are decoded within each layer starting from layer 1 and then go up the stack to layer 7. 

Each layer is responsible for encoding and decoding information specifically to its layer. 

This 7 Layers of OSI model is useful when applied to both hosts that are trying to communication to each other as information are encoded on each layer on the sending host and decoded accordingly on the parallel layer on the receiving host. I.E. information encoded on layer 3 of the sending host is decoded on layer 3 of the receiving host.

Protocol
Each layer has its own protocol – how to talk to the corresponding layer of the remote device. 

Protocol is essential in helping the networking equipment to make decision on how to send the information from Device A to Device B over a “network”.   What is a protocol?  Most communication protocol are defined by RFC (Request for Comment) published by IETF (Internet Engineering Task Force).  It is how all networking equipment vendor implement their features.  One time our equipment has problem with a Cisco router and after investigation, we found that the Cisco router is not doing what the RFC specified and even we are a small company, we are able to make Cisco change their router according to what RFC has specified.  This is how powerful these RFCs are.

IP is a protocol.  TCP is another protocol that builds on top of IP even we often sees TCP/IP.  UDP is another protocol that builds on top of IP. Networking functions such as firewall or load balancer also relies on these protocol definitions to provide their network services.
 
There are also a few more concepts that is related to layer and protocol and they are
  1. MAC address:

  2. IP address

  3. TCP/UDP ports

These are unique identifiers on the network and they are like your house address such that information can be delivered to you.  Without these unique addresses, data will not be send correctly to the destination.

 

Reference:

"What Is OSI Reference Model (Open Systems Interconnection)? - Definition from WhatIs.com." SearchNetworking. N.p., n.d. Web. 24 Feb. 2015.

4 comments:

  1. This is very important information which is shared on the topic as networking. This is very comprehensively explained and happy to read this article having valuable information.

    ReplyDelete
  2. Thank you for sharing. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!


    ReplyDelete
  3. Really inspirational to hear someone pursuing their dreams and becoming successful instead of following the traditional path. I have read your article about This topic. I think it's good and impressed to know your service. Thanks for share this Information.
    HPE ProLiant DL580 Gen9

    ReplyDelete
  4. This blog presented itself in a very easy and clear way. Owner of this blog found a very simple way to express its view but when you read this blog completely, you would get to know about how hard it could be to express such in a easy way.Dell Media Tape Cartridge for LTO6

    ReplyDelete