The Data Link is where we handle Media Access Control operations. It’s also how we deal with routing traffic. The Network Layer is where we do the IP Addressing, but when we IP route, we need to work with MAC Addresses.
Before assembling packets into a frame, we take the destination IP address and look up our routing table. We then determine the next router and discover its MAC address. We now place the MAC of the interface of the next router as our destination MAC and the MAC address of our interface used to send the frames as the origin address. For every router that processes our Frame, we subtract the TTL value by one and recalculate the checksum as needed.
We repeat the process for every router we pass through until we reach the destination Swapping the Source and Destination MAC addresses along the way.
Routing data isn’t the only use of the Data Link Layer. We can also implement access controls to determine what devices are allowed to be on the network and which should be blocked. In Token Ring, we utilize MAC addresses to determine who has the token currently and who gets it next to transmit data.