Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/articles/programming/)
-   -   The OSI model (http://www.go4expert.com/articles/the-osi-model-t22471/)

lionaneesh 18Jun2010 12:10

The OSI model
 
"What is The OSI model? Is this related to any of the atom models done in old school ? Huh!" No, my friend the OSI model [OPEN SYSTEM INTERCONNECTION ] is a way of subdividing a system into smaller or simpler parts [ with respect to the communications ] called layers.

Things to remember
  1. A layer is a collection of services/functions .
  2. Each layer provides services to the layer above it and receive services from the layer below it.
  3. It have 7 layers coming to that in a minute.
Layers of the OSI model:-
  1. Application
  2. Presentation
  3. Session
  4. Transport
  5. Network
  6. Data-Link
  7. Physical layer
How to remember all these layers....

Yeah! I know that you guyz would be thinking how do I remember these stuff..

As usual I'll make it easy:-

Here comes the acronym to remember these layers with their orders . I came to know about this from a youtube video...
Code:

All        : application
People    : presentation
Seem      : session
to        : transport
need      : network
Data      : data-link
processing : physical

What are these layers man What do they do..

Lets start explaining them 1 by 1 :-
  1. Application layer



    This layer is basically there so that you can interact with any application on the WWW or the world wide web or on your own network. Protocols in there are : HTTP , FTP , SMTP etc etc.........

  2. Presentation Layer



    This layer is the easiest one it deals with the ANCII code means it deals with the relationship between binary and letters.. We'll be doing the byte-ordering and conversion topics few pages down. Then you'll be able to properly understand this..

  3. Session Layer



    This one's easy too.. The dictionary meaning of session is : A period of time spend on a particular activity. What a session in OSI model means that it finds the destination PC on the network .

    Ask about can they initiate a connection between our comp's and theirs.

    In easy language it just there to establish a connection between the source computer to the destination.

    I'll make it easy :-

    Imagine you make a chat server program and decide to establish a connection between you and your friend so in that ,the role of this layer will be to carry the request from your computer to your friend's computer "knock knock" and ask him "Sir can we initiate a connection between each other and do some chat,if you dont mind"

    So that was the session layer.

  4. Transport



    In our case this is the most Important stuff . It contains the two most important protocols for us :- TCP and UDP .. I'll explain these two in a healthy 2 pages topic .. Which is coming next in the next tutorial.

    After this.

  5. Network layer



    This layer is also a very important layer. This is where IP : INETERNET PROTOCOL is found …

    We all know that net is like a matrix it is the most complex network so it has lots and lots of webs of wires so what the IP and other protocols here does that they find or actually they know the shortest and the most reliable way to connect host and the destination . I'll explain you this topic more clearly through the following "kind of picture"
    Code:

    ******                  Route 2nd                        ******
    * C1 *-------->------>------------>---------------------->* C2 *
    ******                                                    ******
    |                                                              |
    |                      1st route                              |
    |                                                              |
    ******                                                        |
    * C3 *---------<---------------<--------------<----------<------
    ******

    In the above diagram there is a network of 3 computers C1,C2 and C3.

    We want to initiate a connection between C1 and C3. There are 2 routes :-

    The straight and the shorter route is "route 1st"

    The coiled , complex and the longer route is "route 2nd".

    You'll have a better understanding of this topic while in the next section. "When I'll talk about TCP/IP in more detail".

  6. Data-Link layer



    According to me it is the most confusing layer . It contains two sub-layers MAC and LLC:-

    MAC :- The id given to every network card manufactured.

    Is known as MAC address.

    Don't be confused between logical address and physical address .

    They both are different logical addresses are what we call IP addresses and physical addresses are one associated with this layer.

  7. Physical layer



    This is the most easy layer according to me It only deals with zeroes and ones yeah! Binary.. The ethernet cable , hub , switch , modem , etc etc all come in this layer....

Where he is getting us with all this stuff!!!" Sorry guyz but it is important if you want to be a good and a successful socket programmer you have to know about all this stuff so Fix in your seat and bear it with me....

Ip versions:-



Till date there are two IP VERSIONS :-

1.IPv4 [The old one but still the dominant one]
2.IPv6 [The new and the complex one]

The reason why we needed to get this new ip versions is that we were getting short of it "what" yes we were getting short of it..
Day by day the net was spreading more and more faster which lead to creation of new Ip version that is Ipv6...

What are thes Ipv4 and Ipv6 :-

See before getting what are these different versions and differentiate them i'd like you to introduce about.

What is an IP?

IP is known as Internet protocol it is the primary protocol in the Internet layer. It have many uses like incapsulation [ explained above ] , addressing , etc , etc....

But I'll only cover the basics:-

TCP/IP in terms of Addressing

Before talking in terms of the biggy big net I'll talk this topic with respect to a smaller network let call it "The tutorial network" .

What I did is that I connected 3 of my computers with each other . Ok . You are sitting at comp no.1 I'm at comp no.2 and my uncle "Mr Sachin Sharma " is sitting on the third . I requested to download a file name "blah blah blah.jpg " on the Sachin's computer [3rd computer] . Now suppose that you are the [3rd computer ] how will you find who wanted to download that file.

Here when the ip's comes in work .. You can actually suppose IP's as the names of computer.

Now when I'll make a request to read a file on comp 3rd The computer will respond back to my ip address .

The exact definition of IP address :-

It is a numeric address given to every device including/participating in a computer network.

That was IP in terms on Addressing.

More about ip :- http://en.wikipedia.org/wiki/Internet_Protocol

IPV4 and IPV6:-

As I explained above that IP is a numeric address given to every device participating in a computer network .whether its a mobile phone , a PSP etc etc..

IPV4 : It is a 32 bit ip version and the old one.

Eg:- 127.0.0.1

Yeah I'll explain you what is 32 bit.

Actually its a 4 byte address.

As there are 8 bits in each byte . And 8*4=32 . Got it …

Wait a sec I'll make it easy.

234.44.55.22

here:-

234 = 11101010 ? 8 bits
44 = 00101100 ? 8 bits
55 = 00110111 ? 8 bits
22 = 00010110 ? 8 bits

IPV6 :

See as, I said above we needed IPV6 as we were getting short of IPV4 addresses .

IPV6 are a 128 bit IP version . And they were invented in 1995 …

"Whats so cool about that" I was born in the same year... Yupiii!!!

LOL...

eg:-

1001:0bb8:65a3:08c1:1339:9b2d:1370:5434
You can also see a IP like this :-
0000:0000:0000:0000:1339:9b2d:1370:5434

in the form of this:-

::::1339:9b2d:1370:5434
or:-
::1339:9b2d:1370:5434

This is because the zeros in the IPV6 can be omitted.

Note:- One more difference between IPV4 and IPV6 is that when in case of IPV4 you enter a puplic ip in the address bar of your browser you write it as :- http://127.0.0.1 But in case of ipv6 you have to wite it enclosed in brackets. Eg :- http://[::1]

lionaneesh 18Jun2010 16:54

Re: The OSI model
 
Thanks Shabbir for Accepting my tutorial

shabbir 18Jun2010 18:42

Re: The OSI model
 
The pleasure is all mine but try to keep the formatting as per the guidelines.

lionaneesh 20Jun2010 00:15

Re: The OSI model
 
Cmn Guyz post some comments....

How did you found this tutorial?

mriganka 21Jun2010 08:46

Re: The OSI model
 
tutorial is good, but the topic is more important for students like me!
:D
thanks for sharing such content!

lionaneesh 21Jun2010 10:12

Re: The OSI model
 
Welcome......

shabbir 4Jul2010 12:03

Re: The OSI model
 
Nominate this article for Article of the month - Jun 2010

shabbir 17Jul2010 15:14

Re: The OSI model
 
Vote for this Article for Article of the month - Jun 2010

silviya 5Aug2010 11:09

Re: The OSI model
 
please tell about this subject.......

silviya 5Aug2010 11:12

Re: The OSI model
 
good to work............

lionaneesh 6Aug2010 00:25

Re: The OSI model
 
My article LOST again...

Damn!!!!!

lionaneesh 6Aug2010 00:26

Re: The OSI model
 
;( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :( :(

shabbir 6Aug2010 08:28

Re: The OSI model
 
Quote:

Originally Posted by lionaneesh (Post 71223)
My article LOST again...

Damn!!!!!

I had hard time choosing the winner though.

silviya 6Aug2010 10:36

Re: The OSI model
 
please clearly tell about this subject...............

lionaneesh 6Aug2010 21:07

Re: The OSI model
 
Quote:

Originally Posted by shabbir (Post 71229)
I had hard time choosing the winner though.

LOL
:thinking::thinking::thinking::thinking::thinking: :thinking::thinking::thinking::thinking::thinking: :thinking::thinking::thinking::thinking::thinking: :thinking::thinking::thinking::thinking::thinking: :thinking::thinking::thinking::thinking:

lenco12 15Sep2010 22:31

Re: The OSI model
 
Quote:

Originally Posted by lionaneesh (Post 69454)
Cmn Guyz post some comments....

How did you found this tutorial?

tutorial is good, but the topic is more important for students like me!
:D
thanks for sharing such content!

lionaneesh 16Sep2010 00:17

Re: The OSI model
 
Guyz Please Keep the comments coming!!!!!!!!

Really need them for writing future Articles ........

aryan123 6Feb2011 19:30

Re: The OSI model
 
vry informative post for engineers! Gr8 lionaneesh

I had just started reading about protocols from my notes but I am not able to get the exact meaning of following lines..

" If we implement rules using single module then we can't change any single rule. Thus it is better to use different modules for different rules implementation.
So protocols are developed in different modules."

OSI : protocol suite created by ISO
It contains 7 modules in form of layers.

Can anyone explain what is written in double codes...

lionaneesh 6Feb2011 19:38

Re: The OSI model
 
Quote:

Originally Posted by aryan123 (Post 78863)
vry informative post for engineers! Gr8 lionaneesh

I had just started reading about protocols from my notes but I am not able to get the exact meaning of following lines..

" If we implement rules using single module then we can't change any single rule. Thus it is better to use different modules for different rules implementation.
So protocols are developed in different modules."

OSI : protocol suite created by ISO
It contains 7 modules in form of layers.

Can anyone explain what is written in double codes...

Thanks...
And you said that you are learning about protocols...
Good!!

Check out other articles on Protocols...

See here

kumarmannu 7Feb2011 13:04

Re: The OSI model
 
Good article thanks for sahring...................

lionaneesh 7Feb2011 14:31

Re: The OSI model
 
Quote:

Originally Posted by kumarmannu (Post 78889)
Good article thanks for sahring...................

My pleasure...Thanks for reading an commenting :D:D:D

jennyjackson 25May2011 18:02

Re: The OSI model
 
Thanks, it is a very nice way to learn all the layers.

lionaneesh 26May2011 18:44

Re: The OSI model
 
Quote:

Originally Posted by jennyjackson (Post 83462)
Thanks, it is a very nice way to learn all the layers.

Welcome Sir , Please read my other articles too and If you like this article , Press the Thanks button below the article!


All times are GMT +5.5. The time now is 00:37.