Encapsulation and Decapsulation
When you use the Internet you are constantly sending and receiving data from your computer. Expanding a little, data is being sent across a series of switches, routers, and servers, to another computer (server) somewhere out in the wild, that then sends data back through these to your computer.
In order for the data to correctly make its way from place A to place B, the data itself isn't enough. Much like when you send a package you need to first wrap it in something, then write an address on it, then pay for postage, the data from your computer needs to go through a series of steps (or layers) that give it this information in order for it to get to its destination, this process is called encapsulation and its inverse is called decapsulation. Have a look at the image below:
In order for the data to correctly make its way from place A to place B, the data itself isn't enough. Much like when you send a package you need to first wrap it in something, then write an address on it, then pay for postage, the data from your computer needs to go through a series of steps (or layers) that give it this information in order for it to get to its destination, this process is called encapsulation and its inverse is called decapsulation. Have a look at the image below:
Encapsulation happens as we move down through the layers, with more header data being added at each layer. Referring to the image above, the steps of encapsulation are as follows:
When a computer receives a packet of data, its network card starts the decapsulation process:
4. The network card looks at the frame header/footer to see where the internals of the packet (the header/data) start and end. It then hands the packet up.
3. The Internet Layer checks the header to see that it has been sent to the right place. If it's a wrong address it just discards the packet, otherwise it sends it up again.
2. The Transport Layer looks at the header and either carefully pieces it together with other packets (if it used the TCP protocol) before sending it on, or it just sends it (the best way to describe it would be a "yeet") on to the application layer and hopes for the best (if it was the UDP protocol).
1. The Application Layer takes the data and decrypts it (if it was encrypted) and then uses it - shows you the webpage/message/video etc.
Tasks:
1) Make your own notes on the process of encapsulation/decapsulation.
2) Explain in your own words what is happening to a packet when it gets encapsulated.
3) Write a paragraph (150 words) about what happens to a packet that the YouTube servers send to your computer.
- The top layer (the Application Layer) deals simply with the data itself, forming the data and potentially encrypting it.
- The Transport Layer takes the data and its protocols add on some header information about it and how it is to be sent.
- The data is then passed to the Internet Layer (sometimes called the Network layer) which adds on some more header information, specifically where it is to be sent.
- Finally the packet is handed to the Link Layer (at the network card of the computer) where it adds a frame header AND a frame footer (or trailer) and sends it off on its way into the Internet.
When a computer receives a packet of data, its network card starts the decapsulation process:
4. The network card looks at the frame header/footer to see where the internals of the packet (the header/data) start and end. It then hands the packet up.
3. The Internet Layer checks the header to see that it has been sent to the right place. If it's a wrong address it just discards the packet, otherwise it sends it up again.
2. The Transport Layer looks at the header and either carefully pieces it together with other packets (if it used the TCP protocol) before sending it on, or it just sends it (the best way to describe it would be a "yeet") on to the application layer and hopes for the best (if it was the UDP protocol).
1. The Application Layer takes the data and decrypts it (if it was encrypted) and then uses it - shows you the webpage/message/video etc.
Tasks:
1) Make your own notes on the process of encapsulation/decapsulation.
2) Explain in your own words what is happening to a packet when it gets encapsulated.
3) Write a paragraph (150 words) about what happens to a packet that the YouTube servers send to your computer.