As discussed previously, an advantage of a layered model is that it breaks the process down into manageable units ”the layers . Each layer actually communicates with its peer layer on another host, so the Application layer on a host sends a message to the Application layer on another host; the fact that the message passes through the Transport, Internet, and Network Interface layers on the local host (and the same layers on the other host) is transparent to the user . The Internet layer, for example, where the IP addresses are added, talks to only the Internet layer on another host. The following section describes the process of encapsulation, which is what enables the corresponding layers to interpret the messages received. EncapsulationEach layer in the TCP/IP model communicates with its peer layer on another host. To do this, each layer must add some control information that will be understood by the receiving host, so that the message is dealt with correctly. This process of adding header information at each layer is known as encapsulation . Figure 2.2 describes what happens when a running application needs to send data to a remote host. Figure 2.2. The encapsulation process in the TCP/IP model.
As you can see from Figure 2.2, the running application has some data. The Application layer adds its own header information and passes the message to the Transport layer. This layer treats the entire message received as data (or its payload), because it doesn't differentiate (nor does it need to) between the application data and the Application layer header. The Transport layer adds such control information as sequencing and passes the message to the Internet layer, where the IP header is added, containing such items as the source and destination IP addresses. This process goes on until the Network Interface layer breaks the information down into manageable packets (Ethernet frames ) for transmission across the network. When the Ethernet frames reach the remote host, the reverse of the encapsulation process occurs, known as decapsulation . Here, header information is removed by the relevant layer and passed to the next highest layer, starting with the Network Interface layer. Eventually the data reaches the application running on the remote host, as the user intended.
|