Clicky

How Encapsulation Works Within the TCP/IP Model

In the previous section we reviewed the TCP/IP and OSI model. For the sake of clarity, we will be using the TCP/IP model to demonstrate encapsulation, as compared to the OSI model. If you are still struggling with grasping concepts of the TCP/IP model you may wish to view the previous section once more. Otherwise, onward to the encapsulation process!

The TCP/IP Model

As we learned in the previous section, the TCP/IP model has four layers. You can view a diagram of the model below.

tcp ip model

Keep in mind that we divide the stack into four separate layers because they each perform a certain role or task. As data is being sent from one computer, it will pass from the top layer to the bottom. On the receiving end, the data will then be rebuilt from the bottom layer to the top. You can view an example of this process below.

tcp ip encapsulation

Each layer a packet of information travels through adds what is called a header. Think of it in terms of a Russian doll. You’re probably familiar with them: each doll has another smaller doll inside of it. Just like the dolls, each layer a sending packet passes through gains another header (or doll). When the packet is being rebuilt on the receiving end, each header is unpackaged the same way. You can see an example of a sending packet gaining header information below.

tcp ip headers

Note that at the receiving end, we would have the reverse process (Headers would be taken away at each layer, until the receiving packet is by itself.)

Since each layer of the TCP/IP model does a unique task separate of the other layers, we refer to the data package at each layer with different names. For instance, the data package at the Application Layer is called a message, while the same data package at the Internet Layer is called a datagram. Review the diagram below for the complete list of names.

datagram segment frame

Notice that the Transport Layer may have one of two names- a segment or a datagram. If the TCP protocol is being used, it is called a segment. If the UDP protocol is being used, it is called a Datagram.

The data then passes through the Internet Layer onto the Network Access Layer, where a frame is created. Once the data packet leaves this level it is converted into a bitstream of electrical pulses, commonly referred to as 1’s and 0’s.

Finally, you should note that Cisco demands CCNA students to know specific information on the Data Link Layer and encapsulation. As you can see, we haven’t used the OSI model, but the TCP/IP model (so we use the Network Access Layer as opposed to the Data Link and Physical Layer). Specifically, Cisco demands that students know that packets are packaged into frames at the Data Link Layer. And, like other layers, a header and trailer are added to the information at the Data Link Layer. You can see the encapsulation process with the OSI model below.

osi encapsulation

We know what you’re thinking- where’s a good pneumonic when you need it? The easiest one we could find was “Dirty Sick People Feel Bad,” whereas each letter of each word corresponds to Data, Segments, Packets, Frames, and Bits.

Putting it All Together

Now that we have the basics down, we can finally review the entire process of data encapsulation. Refer to the below list to see a real-life example of encapsulation. If needed, you can view the above diagrams if you get lost.

The Data Encapsulation Process


  • 1. One computer requests to send data to another over a network.
  • 2. The data message flows through the Application Layer by using a TCP or UDP port to pass onto the internet layer.
  • 3. The data segment obtains logical addressing at the Internet Layer via the IP protocol, and the data is then encapsulated into a datagram.
  • 4. The datagram enters the Network Access Layer, where software will interface with the physical network. A data frame encapsulates the datagram for entry onto the physical network. At the end of the process, the frame is converted to a stream of bits that is then transmitted to the receiving computer.
  • 5. The receiving computer removes the frame, and passes the packet onto the Internet Layer. The Internet Layer will then remove the header information and send the data to the Transport layer. Likewise, the Transport layer removes header information and passes data to the final layer. At this final layer the data is whole again, and can be read by the receiving computer if no errors are present.

And there you have it: encapsulation at its finest. We realize that encapsulation isn’t the easiest concept to grasp, but steady review of this and previous sections will ensure you will grasp the concept soon enough.

Closing Comments

Data encapsulation allows devices to communicate, and therefore, it is completely necessary to learn. It is present on networking exams such as the CCNA, so be sure to review these concepts before exam day.

In the following sections we’ll be looking at each layer in more specifics. The next section we will review the Network Access Layer in particular. Physical addresses, frames and LAN technology- clearly we will have our hands full!


There Are 22 Responses So Far. »

  1. Thank you.. I’ve been looking for encapsulation on wikipedia and it brings me to here, and this post looks much more interesting.

  2. Thank you…..!It is really good Information On Encapsultion…..
    Thanks Again!!!

  3. Thank you. I got better concept on encapsulation with this article.

  4. Thanks heaps for the great explanation. I understand the concept much better now.

  5. Very nice article to understand the concept!

  6. I understood the concept easily here, not so confusing in here.
    thanks

  7. thanks a lot.. now I understand a litle bit about encapsulation..
    btw, this encapsulation process only occur in TCP/IP model only or both?

    got final exam tomorrow evening…

    wish me success..

  8. Thank you.. I’ve been looking for encapsulation on wikipedia and it brings me to here, and this post looks much more interesting.

  9. Yes, this article is revealing. I think building on the fundamental knowledge I acquired herein will be sufficient to make a killer-presentation.I’m billed to make a classroom presentation to fellow students on this subject matter.

    Thanks.

  10. Thanks! it is very clear and understood by every one..

  11. Great, simply great! ;D

  12. Thanks, it really helped me understanding the concept.

  13. awesome…..very well xplained … thank u. Just wish that u r inspired to keep going on and on. Thanks for sharing ur knowledge … its been a gr8 help.

  14. Hi. thanks for the information but could you please have a definition of encapsulation and also a picture that can help me to visualise how encapsultion works.

    Many thanks

  15. Thank you very much. I wish to see more explanations from this website… Much appreciated

  16. Thank you!!

    Have an exam later today and although this concept was somewhat clear, it’s CRYSTAL clear now.

    Great article, Thanks again
    *Raises glass*

  17. Yes, this article is revealing. I think building on the fundamental knowledge I acquired herein will be sufficient to make a killer-presentation.I’m billed to make a classroom presentation to fellow students on this subject matter.
    thanks a lot.. now I understand a litle bit about encapsulation..

  18. Thanks nice and simple explanation

  19. great….we were looking for tcp/ip model todoour presentation on and i came across this ..its good reading thanks people..

  20. thank you– this is very nice information about data encapsulation

  21. Great article – however, in a real life implementation, are things done differently? Is that a good thing or bad?

  22. In “The Data Encapsulation Process” you seem to skip the Transport layer, that is, the message goes from the Application layer to the Internet layer. Did I miss something?

Comment on This Article