1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The OSI model

Discussion in 'Programming' started by lionaneesh, Jun 18, 2010.

  1. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    "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]
     
  2. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Thanks Shabbir for Accepting my tutorial
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    The pleasure is all mine but try to keep the formatting as per the guidelines.
     
  4. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Cmn Guyz post some comments....

    How did you found this tutorial?
     
  5. mriganka

    mriganka New Member

    Joined:
    Jun 21, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    tutorial is good, but the topic is more important for students like me!
    :D
    thanks for sharing such content!
     
  6. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Welcome......
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
  9. silviya

    silviya New Member

    Joined:
    Aug 5, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    please tell about this subject.......
     
  10. silviya

    silviya New Member

    Joined:
    Aug 5, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    good to work............
     
  11. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    My article LOST again...

    Damn!!!!!
     
  12. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
  13. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    I had hard time choosing the winner though.
     
  14. silviya

    silviya New Member

    Joined:
    Aug 5, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    please clearly tell about this subject...............
     
  15. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    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:
     
  16. lenco12

    lenco12 New Member

    Joined:
    Sep 15, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    tutorial is good, but the topic is more important for students like me!
    :D
    thanks for sharing such content!
     
  17. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Guyz Please Keep the comments coming!!!!!!!!

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

    aryan123 New Member

    Joined:
    Jan 9, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    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...
     
  19. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Thanks...
    And you said that you are learning about protocols...
    Good!!

    Check out other articles on Protocols...

    See here
     
  20. kumarmannu

    kumarmannu Banned

    Joined:
    Feb 2, 2011
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    0
    Good article thanks for sahring...................
     

Share This Page