Please Whitelist This Site?
I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)
If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.
If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.
Thanks for your understanding!
Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide
NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.
Data Encapsulation, Protocol Data Units (PDUs) and Service Data Units (SDUs)
(Page 2 of 3)
Data Encapsulation in TCP/IP
The N-1, N-2 stuff makes
this seem more difficult than it really is, so lets use a real-world
(simplified) example instead. The Transmission
Control Protocol (TCP) operates at layer
4 of the OSI model. It transmits messages called segments that
contain data encapsulated from higher-layer protocols. The layer below
TCP is the Internet
Protocol (IP) at layer 3. It receives
data from TCP and encapsulates it for transmission.
So, in the formal language of the
OSI Reference Model, TCP segments are created as layer 4 PDUs. When
passed to IP, they are treated as layer 3 SDUs. The IP software packages
these SDUs into messages called IP packets or IP datagrams,
which are layer 3 PDUs. These are in turn passed down to a layer 2 protocol,
say Ethernet, which treats IP datagrams as layer 2 SDUs, and packages
them into layer 2 PDUs (Ethernet frames) which are sent on layer 1.
(Actually, in some technologies further encapsulation even occurs at
layer one prior to transmission.)
On the receiving device, the process
of encapsulation is reversed. The Ethernet software inspects the layer
2 PDU (Ethernet frame) and removes from it the layer 2 SDU (IP datagram)
which it passes up to IP as a layer 3 PDU. The IP layer removes the
layer 3 SDU (TCP segment) and passes it to TCP as a layer 4 PDU. TCP
in turn continues the process, going back up the protocol layer stack.
The complete process is illustrated in Figure 16.
Figure 16: OSI Reference Model PDU and SDU Encapsulation
This example shows in more detail how OSI PDUs and SDUs are created and encapsulated. A TCP segment (layer 4 PDU) becomes a layer 3 SDU, which is encapsulated into a layer 3 PDU through the addition of an IP header. This becomes the payload of an Ethernet frame, which is a layer 2 PDU containing an Ethernet header, layer 2 SDU (the IP datagram) and Ethernet footer. The receiving device extracts the IP datagram from the Ethernet header and passes it to layer 3; the IP software extracts the TCP segment and passes it up to the TCP software.
This whole matter of passing
data up and down the protocol stack, encapsulation and so on may seem
needlessly complex. It also may appear to be rather inefficient; why
send a message with so many headers and footer? However, the notion
of data encapsulation is critical to creating modular, flexible networks.
|If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!|
Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.