
OSI model
During the data encapsulation process, theData Link layerof the OSI model is responsible for adding a header that contains MAC addressing information and a trailer used for error checking.The header typically includes the source and destination MAC addresses, while the trailer contains a Frame Check Sequence (FCS) which is used for error detection1.
The Data Link layer ensures that messages are delivered to the proper device on a LAN using hardware addresses and translates messages from the Network layer into bits for the Physical layer to transmit. It also controls how data is placed onto the medium and is received from the medium through the physical hardware.
References:=
* The OSI Model - The 7 Layers of Networking Explained in Plain English
* OSI Model - Network Direction
* Which layer adds both header and trailer to the data?
* What is OSI Model | 7 Layers Explained - GeeksforGeeks