The MAC layer is a section of the OSI Network Model. The OSI model manages data sent and received by the network access hardware within a computer or other network ready device. The network model is a diagram showing how data flows from the user of one PC through the model to arrive at another PCs user interface.
The OSI model and its MAC layer are best explained through an example:
Suppose computer user Fred is sitting at a computer and wants to share a photo with another computer user Grandma. Fred opens up his email and attaches the photo, sending it to Grandma with no delay. When the message arrives, Grandma sees the photo that Fred sent.
On the computer, the transactions between one or more users take very little time at all, but the process these transactions go through to get data to its destination is a bit more complex.
When Fred sends the email to Grandma containing the photo, it travels through the following path to get to the connection between Fred and its destination, upon arrival, the data packet travels through the same path in reverse order to display an email message and photo to Grandma.
the application layer, the first layer in the OSI process, moves the data from the user into the computer to be transmitted.
The presentation layer encrypts the data, converting it into a format that the other layers in the transmission stack can understand. The session layer coordinates communications. Applications on a computer are managed here. Communication between the application layer at both ends of a transmission is started and terminated at the session layer.
Note: There are seven layers within the OSI model and the MAC layer is deep within the process. The discussion includes the other layers to show where the MAC layer fits within the stack and how it contributes to the transmission of data.
The data link layer handles the breakdown of data packets into bits to be sent over the physical layer. This layer is where the MAC layer lives, assuring that data sent across a piece of network hardware gets to the correct hardware on the other end and any response data is returned to the appropriate location. Data is also collected here and receives permission needed to send the photo to grandma.
The physical layer is where the actual hardware, Ethernet cables, wireless radios, network cards, interaction is handled to send the data via electrical impulse, light or radio signals. This layer, at the very bottom of the stack actually transmits the data.
When the sent photo arrives at Grandmas computer, it traverses back up the stack from the physical layer to the application layer, being reconstructed from the raw bits and bytes into the photo that Fred originally sent.
The MAC layer plays an important role in every piece of data that is exchanged between two computer systems, ensuring that data is collected efficiently and passes to the physical level to be sent to its intended recipient.