To separate data at individual planes, the sender(or receiver) encapsulates/decapsulates data by adding or removing a header/ trailer at every layer and it is called by different names at different layers.
Considering the sender's end:
At the Application Layer, it is called a Message. The Specific Address is added in this layer.
The Transport Layer accepts data from Session layer, split it into segments(or User Datagrams) and send to the network layer. The Transport Layer follows an end-to-end communication and here the port numbers of the source and destination are added.
The Network Layer, since it provides data routing paths; it is needless to say that the Logical address/ IP Address(32-Bit) of the source and destination are added at this layer. This protocol exists in every host/ router and the router examines the header fields of all the IP packets that pass through it.
The Data Link Layer, takes packets from the Network Layer and encapsulates them into Frames. The Physical Address/ MAC Address(48-Bit) is added in this layer. .
A frame has the following parts −
-
Frame Header − It contains the source and the destination addresses of the frame.
-
Payload field − It contains the message to be delivered.
-
Trailer − It contains the error detection and error correction bits.
-
Flag − It marks the beginning and end of the frame.
At the Physical Layer, it is the Bits which is transmitted by the transmission medium.
This diagram below may clear the concept a bit more: