To get a better understanding of how the OSI layers function, it is important to know how data flows between the layers. In this section, we'll trace the data as it flows through the layers of the OSI model. As you will see in this section, each layer adds (or encapsulates) some form of header or trailer. (Layer 2, the Data Link layer, is responsible for adding a trailer.) Figure 2.2 shows the data flow from Device A to Device B.
Note: The example in Figure 2.2 demonstrates how end user packets (header and data) flow through the OSI model. The figure assumes there are no intermediate devices.
When the end system receives the unstructured bit stream from the physical wire, each layer removes the header information applicable to it until the application receives the data. The following depicts what occurs in the OSI model's layers when an email is sent from Device A to Device B:
1. An application, such as an email program, creates data that will be sent by an end user, such as an email message. The Application layer (layer 7) places a header (encapsulation) field that contains information such as screen size and fonts, and passes the data to the Presentation layer (layer 6).
2. The Presentation layer places layer 6 header information. For example, the text in the message might be converted to ASCII. The Presentation layer will then pass the new data to the Session layer (layer 5).
3. The Session layer follows the same process by adding layer 5 header information, such as information that the Session layer will manage the data flow, and passes this data to the Transport layer (layer 4).
4. The Transport layer places layer 4 information, such as an acknowledgment that the segment was received in the header, and passes it to the Network layer (layer 3).
5. The Network layer places layer 3 header information, such as the source and destination address so the Network layer can determine the best
delivery path for the packets, and passes this data to the Data Link layer (layer 2).
6. The Data Link layer places layer 2 header and trailer information, such as a Frame Check Sequence (FCS) to ensure that the information is not corrupt, and passes this new data to the Physical layer (layer 1) for transmission across the media.
7. The bit stream is then transmitted as ones and zeros on the Physical layer. It is at this point that the Physical layer ensures bit synchronization. Bit synchronization will ensure the end user data is assembled in the correct order it was sent.
8. Steps 1 through 7 occur in reverse order on the destination device. Device B collects the raw bits from the physical wire and passes them up the
Data Link layer. The Data Link layer removes the headers and trailers and passes the remaining information to the Network layer and so forth until data is received by the Application layer. Eventually, Device B will receive an email notification displaying a message to indicate that a new email message has been received.
Familiarize yourself with the OSI model and each layer's responsibility. You should be able to recognize a function of each layer of the OSI model. The seven layers of the OSI reference model are typically divided into two categories: upper layers (layers 4 through 7) and lower layers (layers 1 through 3).
As you can determine from the example of encapsulation, the OSI model provides a service that allows information to flow smoothly from one layer to another. Eventually, the information will be presented to the end device in a readable format. Now that we've reviewed the OSI model, the next section takes a look at how packets are sent across a network using a routing algorithm.
Was this article helpful?