A critical concept to understand when looking at network communication models is the idea of peer layer communication. Peer layer communication is a way of defining how the different layers in the OSI model interact with one another when systems communicate. On a single system, each layer has one or two neighbouring layers – the layer above it, and the layer below it. For example, the Network layer will interact with both the layer above (Transport) and the layer below (Data Link). When preparing to send data over the network, the Network layer receives the data from the Transport layer, makes some additions, and then passes it down to the Data Link layer where it is formatted further.
When we extend the model over the network to include another system, you’ll need to consider what I call horizontal peering. In network communication models, any given layer communicates only with that same layer on another system. So, when the Data Link layer adds some information to the data prior to passing it over the network, this added information will be of use only to the Data Link layer (its peer) on the receiving system. Similarly, the information added by the sender at the Transport layer will only be of use to the Transport layer on the receiving system.
This concept may seem a little confusing at first, but think of it like this. Ultimately, a packet is going to be created that will be sent over the network and received by another system. It starts with data created at the Application layer, and layers add information (the whole process being referred to as encapsulation) as the data travels down the OSI model. The packet is then transmitted across the network. Once it arrives at the receiving system, parts that were added are now stripped away in reverse order at each layer. Remember that each layer on the sending system provides information that is used by the same layer on receiving system. If it all seems a little theoretical at the moment, do not worry – we’ll ultimately apply this to how a real TCP/IP packet is created.