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 2 3 4 5 10 912
  1. Ben
    October 6th, 2012

    Nice work 9Tut – thanks for the concise explanation :)

  2. ALOK KUMAR
    October 10th, 2012

    very nice in easy wat:-) thnx dude:)

  3. ALOK KUMAR
    October 10th, 2012

    wat*= way

  4. Excellent information with best example
    October 15th, 2012

    Gokul kasturi rangan

  5. ANITA
    October 24th, 2012

    I’ll give CCNA exam in first week of November..
    please contact me who recently passed CCNA exam or planning to give CCNA exam…
    please tell me which dump is good and sims…

    er.anita.annu@gmail.com

  6. Neo
    November 9th, 2012

    first thnX very much 4 your effort
    but i got note about layer 7
    i think “IE, Firefox or Opera” are layer 7 ((applications))

    & “telnet, ssh, ftp,… ” are layer 7 ((protocols))

  7. Zafar Abbas
    November 11th, 2012

    Very nice approach to explain. Thanks

  8. umesh shelar
    November 20th, 2012

    this is best lesson.. thank you so much 9tut

  9. AKbar
    November 20th, 2012

    goooodddddddddddd example use here

  10. Ayodele Adegboye
    November 23rd, 2012

    This is simple enough for me to know, i believe others too

  11. NILESH SEN
    November 25th, 2012

    good job……………………………..thnx

  12. Nifras
    December 1st, 2012

    Hi,
    Thanks to add this is , more helpful

  13. hema
    December 3rd, 2012

    مفيش ليها pdf

  14. Balakumar.M
    December 10th, 2012

    tnx for d tutorial

  15. HARSHIT
    December 13th, 2012

    dude…. what an explaination… i ll surely donate a huge amount to 9tut.com …best coaching

  16. Manzoor Ali Khuhawar
    December 14th, 2012

    Nice Explanation

  17. heba
    December 14th, 2012

    please can you send the latest dump for me please?
    hebaothman50@live.com

  18. jaswinder singh
    December 14th, 2012

    Plz can anybody senf me latedt ccna exam dump…..jaswindersidbu2@gmail.com

  19. namrata
    December 17th, 2012

    awsm!!!thnx a lot for grt explaination

  20. Vijay Suthar
    December 19th, 2012

    I love you 9tut, really awesome concept & Explanation…

  21. Ismail
    December 21st, 2012

    good one… really apprecialbe

  22. Chatan
    December 22nd, 2012

    I got better knowledge about OSI model, thank u 9Tut team

  23. serge
    December 28th, 2012

    It’s the best example I have ever seen! Thank’s

  24. sasikanta swain
    December 28th, 2012

    it is the best trick to remember osi model. thanks to him who make it. thanx a lot.

  25. ALI JASSIM
    December 31st, 2012

    Greetings to you

    Very good guys

  26. krish
    January 2nd, 2013

    it’s very useful thanks very much very easy to remember :)

  27. Mike
    January 2nd, 2013

    Clear and understandable… thanks much.

  28. yuyudcumi
    January 3rd, 2013

    good knowledge.. thanks 9tut.com team

  29. senthil
    January 6th, 2013

    simple…super….

  30. Anonymous
    January 8th, 2013

    I hv certified..bt studying agn to refresh my concepts

  31. virendra
    January 9th, 2013

    Thanks it is very esay and simple to understand….

  32. Junaid
    January 15th, 2013

    Good Knowledge.

  33. navdeep
    January 19th, 2013

    very nice

  34. kutukupret
    January 20th, 2013

    this is keren banget lho

  35. Majeed
    January 24th, 2013

    Hi All,

    Can any one help me out by clearly explaining what happens exactly in each OSI layer when we browse any website like http://www.google.com

    Thanks,
    Majeed.

  36. Aman
    January 29th, 2013

    Nice Work, now i i have easily understand the basic concept of OSI Model

  37. ellie
    January 31st, 2013

    Nice job!!
    now I understand what is OSI!!

    TTTThhhank you!!

  38. Imran
    February 3rd, 2013

    Thanks!!!

    Very nice and easy way of explanation :-)

  39. Anonymous
    February 4th, 2013

    It is very good way to understand ,thanks for this now I can understand the meaning of OSI model—Rakesh Gupta

  40. Fred
    February 7th, 2013

    Thanks so much for this concise explanation.

  41. hemalatha
    February 9th, 2013

    different way of teaching. i understand and easily remember too. thank you

  42. ahamed
    February 13th, 2013

    AWWESOME (y)

  43. chidi rose
    February 14th, 2013

    Please can u send me the latest dumps.

  44. Dini
    February 17th, 2013

    nice work….!!!!!
    easy way to remember…
    thanks :)

  45. calvin kuria
    February 19th, 2013

    perfect .. easy to remember .organise work.thanks

  46. rajan maretha
    February 23rd, 2013

    amazing !!!!!!!!!!!!!

  47. JIGAR PATEL
    February 26th, 2013

    IN’S A NICE PRESENTATION DONE

  48. urmi patel
    February 27th, 2013

    very nice and very easy to presentation

  49. nobody
    February 27th, 2013

    eeee keval chupppp rehhh

  50. nobody
    February 27th, 2013

    keVAL BADHAAA BOLE VAKO VADIIII JAAAAA

Comment pages
1 2 3 4 5 10 912
Add a Comment