Modern computer networking relies upon a vast conglomeration of technical standards, concepts, and protocols.
Without these, devices would struggle to communicate with each other.
These agreed standards ensure that all devices can communicate with each other.
TheOSIconceptual model sets out seven layers of online grid communications.
They describe the functionality that needs to be covered by protocols and standards.
This means that numerous multi-layer protocols have blurred the distinction between some layers.
Still, it is a useful tool to wrap your head around whats needed to communicate.
The lowest layer, layer 1, is thephysical layer.
This covers standards for the actual mechanism for communicating.
Level three is the connection layer.
This level covers the designation and addressing of networks and communication between networks.
IP addresses operate at this layer, as do routing protocols such as RIP and OSPF.
You may have noticed the gap between the numbering system and the conceptual model.
Layer two is the data link layer.
This covers communications over individual links.
The easiest way to see the difference is in a connection using hubs.
Hubs are obsolete, thanks to the rise of switches.
A hub forwarded every message it received to every connected unit other than the one that sent it.
A switch checks if it needs to or not.
Switches are more complex, but they provide significant benefits over hubs.
The key difference between switches and hubs is in the size of a collision domain.
The data link layer operates at the level of a single connection media.
That may be point-to-point or have multiple devices.
Key Features
While point-to-point connections are straightforward, media with multiple connected devices are not.
Theoretically, a point-to-point connection could skip addressing entirely.
Any communication from one would be meant for the other.
Aside from hub-based connections, wireless connections involve multiple devices on the same connection.
That addressing scheme is called theMAC address.
MAC has no link at all to any Apple devices.
Instead, it stands for Media Access Control.
A MAC address can only transmit data to a gadget over a local data pipe.
IP addresses are used to route traffic outside of the connection.
The data link layer implements protocols such as CSMA/CD and CSMA/CA.
Those acronyms stand for Carrier Sense Multiple Access/Collision Detection and Collision Avoidance, respectively.
Collision detection is used in wired networks.
It detects when collisions have occurred, backs off, and retransmits.
Collision Avoidance is used in wireless networks and checks to see if the connection is free before transmitting.
On wireless networks, devices may be unable to see other devices leading to the hidden node problem.
This makes collision detection essentially impossible, instead forcing reliance on receipt notifications.
Sublayers
As previously mentioned, there are several issues with the OSI model.
A relatively standard modification is splitting the data link layer into two sublayers.
These are the Logical Link Control sublayer, LLC, and the Medium Access Control sublayer, or MAC.
The LLC sublayer provides error control and flow control.
Conclusion
The data link layer is the second layer of the OSI model.
It deals with addressing the physical connection level.
MAC addresses and collision detection/avoidance are some of the key features of the data link layer.
Switching protocols such as the Spanning Tree Protocol, STP, operate at this layer.