Home > OSI Model Tutorial

OSI Model Tutorial

November 2nd, 2011 Go to comments

Welcome to the most basic tutorial for networker! Understanding about OSI model is one of the most important tools to help you grasp how networking devices like router, switch, PC… work.

Let’s take an example in our real life to demonstrate the OSI model. Maybe you have ever sent a mail to your friend, right? To do it, you have to follow these steps:

1. Write your letter
2. Insert it into an envelope
3. Write information about sender and receiver on that envelope
4. Stamp it
5. Go to the post office and drop it into a mail inbox

From the example above, I want to imply we have to go through some steps in a specific order to complete a task. It is also applied for two PCs to communicate with each other. They have to use a predefined model, named OSI, to complete each step. There are 7 steps in this model as listed below:

OSI_Model.jpg

This is also the well-known table of the OSI model so you must take time to learn by heart. A popular way to remember this table is to create a fun sentence with the first letters of each layer. For example: All People Seem To Need Data Processing or a more funny sentence sorted from layer 1 to layer 7: Please Do Not Throw Sausage Pizza Away.

There are two notices about this table:

1. First, the table is arranged from top to bottom (numbering from 7 to 1). Each step is called a “layer” so we have 7 layers (maybe we usually call them “layers” to make them more… technical ^^).

When a device wants to send information to another one, its data must go from top to bottom layer. But when a device receives this information, it must go from bottom to top to “decapsulate” it. In fact, the reverse action at the other end is very natural in our life. It is very similar when two people communicate via mail. First, the writer must write the letter, insert it into an envelope while the receiver must first open the envelope and then read the mail. The picture below shows the whole process of sending and receiving information.

OSI_Model_sending_receiving.jpg

Note: The OSI model layers are often referred to by number than by name (for example, we refer saying “layer 3″ to “network layer”) so you should learn the number of each layer as well.

2. When the information goes down through layers (from top to bottom), a header is added to it. This is called encapsulation because it is like wrapping an object in a capsule. Each header can be understood only by the corresponding layer at the receiving side. Other layers only see that layer’s header as a part of data.

OSI_Model_headers_added.jpg

At the receiving side, corresponding header is stripped off in the same layer it was attached.

Understand each layer

Layer 7 – Application layer

This is the closest layer to the end user. It provides the interface between the applications we use and the underlying layers. But notice that the programs you are using (like a web browser – IE, Firefox or Opera…) do not belong to Application layer. Telnet, FTP, email client (SMTP), HyperText Transfer Protocol (HTTP) are examples of Application layer.

Layer 6 – Presentation layer

This layer ensures the presentation of data, that the communications passing through are in the appropriate form for the recipient. In general, it acts as a translator of the network. For example, you want to send an email and the Presentation will format your data into email format. Or you want to send photos to your friend, the Presentation layer will format your data into GIF, JPG or PNG… format.

Layer 5 – Session layer

Layer 5 establishes, maintains and ends communication with the receiving device.

Layer 4 – Transport layer

This layer maintains flow control of data and provides for error checking and recovery of data between the devices. The most common example of Transport layer is Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

Layer 3 – Network layer

This layer provides logical addresses which routers will use to determine the path to the destination. In most cases, the logic addresses here means the IP addresses (including source & destination IP addresses).

Layer 2 – Data Link Layer

The Data Link layer formats the message into a data frame, and adds a header containing the hardware destination and source address to it. This header is responsible for finding the next destination device on a local network.

Notice that layer 3 is responsible for finding the path to the last destination (network) but it doesn’t care about who will be the next receiver. It is the Layer 2 that helps data to reach the next destination.

This layer is subdivide into 2 sub-layers: logical link control (LLC) and media access control (MAC).

The LLC functions include:
+ Managing frames to upper and lower layers
+ Error Control
+ Flow control

The MAC sublayer carries the physical address of each device on the network. This address is more commonly called a device’s MAC address. MAC address is a 48 bits address which is burned into the NIC card on the device by its manufacturer.

Layer 1 – Physical layer

The Physical Layer defines the physical characteristics of the network such as connections, voltage levels and timing.

To help you remember the functions of each layer more easily, I created a fun story in which Henry (English) wants to send a document to Charles (French) to demonstrate how the OSI model works.

OSI_7_layers_fun.jpg

 

Lastly, I summarize all the important functions of each layer in the table below (please remember them, they are very important knowledge you need to know about OSI model):

Layer Description Popular Protocols Protocol Data Unit Devices operate in this layer
Application + User interface HTTP, FTP, TFTP, Telnet, SNMP, DNS… Data  
Presentation + Data representation, encryption & decryption

+ Video (WMV, AVI…)
+ Bitmap (JPG, BMP, PNG…)
+ Audio (WAV, MP3, WMA…)
….

Data  
Session + Set up, monitor & terminate the connection session + SQL, RPC, NETBIOS names… Data  
Transport + Flow control (Buffering, Windowing, Congestion Avoidance) helps prevent the loss of segments on the network and the need for retransmission + TCP (Connection-Oriented, reliable)
+ UDP (Connectionless, unreliable)
Segment  
Network + Path determination
+ Source & Destination logical addresses
+ IP
+ IPX
+ AppleTalk
Packet/Datagram Router
Data Link

+ Physical addresses

Includes 2 layers:
+ Upper layer: Logical Link Control (LLC)
+ Lower layer: Media Access Control (MAC)

+ LAN
+ WAN (HDLC, PPP, Frame Relay…)
Frame Switch, Bridge
Physical

Encodes and transmits data bits

+ Electric signals
+ Radio signals

+ FDDI, Ethernet Bit (0, 1) Hub, Repeater…

Note: In fact, OSI is just is a theoretical model of networking. The practical model used in modern networks is the TCP/IP model. You may think “Hm, it’s just theoretic and has no use in real life! I don’t care!” but believe me, you will use this model more often than the TCP/IP model so take time to grasp it, you will not regret – I promise :)

Comments (463) Comments
Comment pages
1 3 4 5 6 7 10 912
  1. Anonymous
    June 5th, 2013

    Great Job! Job Well Done.Thank you very Much.

  2. Anonymous
    June 7th, 2013

    this is such an explicit piece of information. i think i no longer have the fear i used to have when i thought of the OSI model

  3. Ahtasham
    June 9th, 2013

    thanks its very good to understand from basic to advance for all

  4. Anonymous
    June 12th, 2013

    many thanks

  5. Alan Boyle
    June 19th, 2013

    Hi, thanks for sharing. I’m wondering if it’s OK to copy some of the text in my site?

  6. Anonymous
    June 28th, 2013

    thanks for sharing

  7. Lester Cash
    July 1st, 2013

    would you allow we copy some content from the article? Thanks.

  8. sabir khan
    July 1st, 2013

    nice post and helpfull

  9. Vineya.Bulago
    July 2nd, 2013

    I really enjoyed reading this link.It really helps ne understand the OSI model.Thank You so much for the information, really appreciated.

    cheers!!

  10. madhubala
    July 3rd, 2013

    good job. thank You.
    But I have some clarification.
    I would like to know where this layers use to maintain.
    Transport layer is an end to end protocol, it means is it available in our device….???
    then what about N/W layer, DL layer and physical layer….?? if suppose from transport layer to application layer maintain in our own system, then the other layers might be at the networks like managing at airtel office or BSNL office???? can u give me how it works while we r sending mail??

  11. Mary Morse
    July 4th, 2013

    Hi, thanks for sharing. I’m wondering if it’s OK to copy some of the text in my site?

  12. Chalapati
    July 8th, 2013

    Thanks.
    But i m expecting more about tcp and udp protocols . where can we get it

  13. Anonymous
    July 10th, 2013

    thank u ccna

  14. Anonymous
    July 12th, 2013

    I really appreciate this piece of work. Thanks.

  15. Anonymous
    July 13th, 2013

    it must be free

  16. Anonymous
    July 16th, 2013

    This is Awsome ! Thanks 9Tut !

  17. Jebaraj
    July 17th, 2013

    very nice easy to understand

  18. Fijian Boy
    July 21st, 2013

    i really passed my ccna exam papers….thanks

  19. mythily
    July 24th, 2013

    thank you very much ccna…..

  20. Parkash Pemani
    July 24th, 2013

    Now I have got Perfact knowledge of OSI Model, Thank you Very Much

  21. Durga
    July 25th, 2013

    Easily explained….very useful…..
    Thanks a lot….

  22. Vivek Ravikumar
    August 1st, 2013

    It’s very useful to understand the concept with live example.

  23. ishan verma
    August 4th, 2013

    thanks for giving me these appropriate tutorials of o.s.i model

  24. Stewart
    August 5th, 2013

    After tearing my hair out looking for a clear, concise explanation, there it was. Thank you so much!

  25. Sergej
    August 7th, 2013

    Flow control both in Transport and Data Link layer? :|

  26. Pankaj
    August 11th, 2013

    Thanks DUDE Well Done …

  27. hgh
    August 12th, 2013

    ii have cleared the exam .the dumps available in this site http://ruturl.com/tja

  28. MANRIQUE
    August 12th, 2013

    amazing, thanks a lot whoever makes this tutorial!

  29. Jane
    August 13th, 2013

    Please can someone send me CCNA dumps my exam comes up next week email uzorjeremiah@yahoo.com

  30. Paul
    August 14th, 2013

    Great

  31. Aman Verma
    August 29th, 2013

    Best explanation for osi model.
    Best path to learn osi.
    Very Gud :-)

  32. mike
    August 29th, 2013

    I REALLY APPRECIATE HOW YOU EXPLAINED THIS MODEL. IT WILL HELP ME MUCH AS A BEGINNER. THUMBS
    UP!!!!

  33. Rhemie
    September 2nd, 2013

    Thanks! This explanation really works for me. Good job!

  34. Meghana
    September 2nd, 2013

    After looking into many explanations I felt yours was the best of all .THANK YOU.

  35. Anonymous
    September 6th, 2013

    good

  36. Kusum
    September 7th, 2013

    Well done. Realy, I understood well.Thanx

  37. Joshua
    September 10th, 2013

    Hello

    I’ve NEVER done anything/been interested in Computer Networking at all before.

    These 9tut pages immediately start talking about things that I feel I’m SUPPOSED to already know about before the lesson…is that true?

    Assuming I put fort the effort, can I successfully grasp this subject coming TOTALLY from scratch?

    Do I have a shot at becoming at least an ENTRY LEVEL ‘Network Guy’?

  38. Claudiu
    September 12th, 2013

    What is unclear to me and maybe someone can help:

    In the Encapsulation Process Layer 2 = Switch and Layer 3 = Router.

    In Decapsulation Process what devices are Layer 2 and Layer 3 ? I cannot understand where the decapsulation is been made. By the end-device solely ?

    RECEIVING PC

    => Frame is received at the Physical Layer (NIC). Then the Physical Layer forwards => the frame to the Data Link Layer (which is what device ? where? ) which is the Switch from where it received it first ? And then this switch => forwards it to the Router at which it is connected ? And then the Router sends it back to the host ? Can’t understand, please help, it’s CRUCIAL!

    Its a mess up in my head, maybe someone could help! Thanks!

  39. reebs
    September 16th, 2013

    thnx its useful …

  40. Sathish M
    September 19th, 2013

    Very useful info.. I have ICND 640-822 exam next month.. could you guys please share me the experience and dumps, if you have..

    That would be a great help.. Please share to ersathish.1987@gmail.com

  41. Anonymous
    September 20th, 2013

    Wonderfull….Great job done here…… Thank you :)

  42. Joe
    September 23rd, 2013

    Perfect explanation!

    Thank You

  43. Anonymous
    September 24th, 2013

    Name

  44. Waymond
    September 24th, 2013

    This was great. Thanks!

  45. abhishek kumar(g.p.dbg in cse)
    September 25th, 2013

    it is very effective for me .thanks alot

  46. subhash
    September 25th, 2013

    thanks bro…gud one..

  47. Anonymous
    September 28th, 2013

    9tut I looked at this thinking I would find a clear definition of tcp protocols. THis would knowledge would be used for applying acls. I have been looking for if it says telnet , ftp ….. then use tcp on your access list if it needs to be extended. Otherwise use ip. It would be helpful to have a list of what is what. any rules you have for applying this informationto accesslists that work?

  48. 9tut
    September 29th, 2013

    @Anonymous: That knowledge is not covered in this tutorial. We will add the protocols and classify them in another tutorial. Thanks for your opinion!

  49. Anonymous
    September 29th, 2013

    9tut where can I find that classification of protocol information. I have general ideas but need to know before Mondays exam.

  50. rafiullah omar
    October 1st, 2013

    i have searched most of the websites but the best one is this about osi model

Comment pages
1 3 4 5 6 7 10 912
Add a Comment