Wednesday, 8 March 2017

What is ISO-OSI model ?

The Open Systems Interconnection model (OSI model) implementation is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to their underlying internal structure and technology. Its goal is the interoperability of diverse communication systems with standard protocols. The model partitions a communication system into abstraction layers. The original version of the model defined seven layers.
A layer serves the layer above it and is served by the layer below it. For example, a layer that provides error-free communications across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that comprise the contents of that path. Two instances at the same layer are visualized as connected by a horizontal connection in that layer.
Data processing by two communicating OSI-compatible devices is done as such:
  1. The data to be transmitted is composed at the topmost layer of the transmitting device (layer N) into a protocol data unit (PDU).
  2. The PDU is passed to layer N-1, where it is known as the service data unit (SDU).
  3. At layer N-1 the SDU is concatenated with a header, a footer, or both, producing a layer N-1 PDU. It is then passed to layer N-2.
  4. The process continues until reaching the lowermost level, from which the data is transmitted to the receiving device.
  5. At the receiving device the data is passed from the lowest to the highest layer as a series of SDUs while being successively stripped from each layer’s header and/or footer, until reaching the topmost layer, where the last of the data is consumed.

Implementation of ISO-OSI model in c


//OSI Model (encapsulation and decapsulation process)
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>//for linux to run sleep command
#include<windows.h>//for windows to run sleep command
main(){
printf("\n\t\t ISO-OSI Model");
printf("\nLAYERS Sender Side");
printf("\nAPPLICATION LAYER !! AH !! DATA");
Sleep(1);
printf("\nPRESENTATION LAYER !! PH!!AH!!DATA");
Sleep(1);
printf("\nSESSION LAYER !! SH !!PH!!AH!!DATA");
Sleep(1);
printf("\nTRANSPORT LAYER!!TH!!SH!!PH!!AH!!DATA");
Sleep(1);
printf("\nNETWORK LAYER!!NH!!TH!!SH!!PH!!AH!!DATA");
Sleep(1);
printf("\nDATALINK LAYER!!DH!!NH!!TH!!SH!!PH!!AH!!DATA!!CRC");
Sleep(1);
printf("\nPHYSICAL LAYER 100100101010101110001010010");
Sleep(1);
printf("\n\nLAYERS Receiver Side");
printf("\nPHYSICAL LAYER 100100101010101110001010010");
Sleep(1);
printf("\nDATALINK LAYER!!DH!!NH!!TH!!SH!!PH!!AH!!DATA!!CRC");
Sleep(1);
printf("\nNETWORK LAYER!!NH!!TH!!SH!!PH!!AH!!DATA");
Sleep(1);
printf("\nTRANSPORT LAYER!!TH!!SH!!PH!!AH!!DATA");
Sleep(1);
printf("\nSESSION LAYER !! SH !!PH!!AH!!DATA");
Sleep(1);
printf("\nPRESENTATION LAYER !! PH!!AH!!DATA");
Sleep(1);
printf("\nAPPLICATION LAYER !! AH !! DATA");
Sleep(1);
}

OUTPUT:


Implementation of ISO-OSI Model
Implementation of ISO-OSI Model
References:
  • https://en.wikipedia.org/wiki/OSI_model

No comments:

Post a Comment