Syllabus Section: Computer Networks & Cloud (3/10)
Exam Focus: MAC addressing, error control mechanisms, CSMA/CD, and the transition from bits to frames.
1. Introduction to the Data Link Layer
The Data Link Layer (Layer 2 of the OSI model) is responsible for node-to-node data transfer—a link where data is moved between two directly connected nodes. In your NSCT Exam Prep, remember that while the Network Layer handles “Routing,” the Data Link Layer handles “Delivery” on a specific physical segment.
It is uniquely divided into two sublayers:
- Logical Link Control (LLC): Manages flow control, error control, and identifies network layer protocols.
- Media Access Control (MAC): Manages protocol access to the physical hardware and handles physical addressing.
2. Key Functions: Framing and Physical Addressing
The Data Link Layer takes the packets from the Network Layer and encapsulates them into Frames.
- Framing: The process of dividing the stream of bits from the physical layer into manageable data units. A frame typically consists of a Header (containing the source/destination MAC), the Payload (the data), and a Trailer.
- Physical Addressing: Unlike IP addresses (logical), the Data Link Layer uses MAC Addresses (Media Access Control). These are 48-bit (6-byte) permanent hardware addresses burned into the Network Interface Card (NIC).
3. Error and Flow Control Mechanisms
To ensure reliable communication over a single link, the Data Link Layer employs several techniques:
Error Control
- CRC (Cyclic Redundancy Check): A mathematical algorithm used to detect changes in the data during transmission. If the CRC calculated by the receiver doesn’t match the one in the frame trailer, the frame is dropped.
- Checkpoints: The layer can request retransmission of damaged or lost frames.
Flow Control
- This prevents a fast sender from “overwhelming” a slow receiver. It ensures that the buffer at the receiving end doesn’t overflow.
4. Media Access Control: How Devices Share the Wire
In a shared network (like a classic Ethernet Bus or Wi-Fi), devices must “take turns.” Two major protocols define this:
- CSMA/CD (Carrier Sense Multiple Access with Collision Detection): Used in wired Ethernet. Devices listen to the wire; if it’s quiet, they send. If a collision occurs, they stop, wait a random amount of time, and retry.
- CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance): Used in Wireless (802.11). Since collisions are harder to detect in the air, devices send a “request to send” signal first to avoid collisions entirely.
5. Network Devices at Layer 2
- Switches: The primary device of the Data Link Layer. Switches use a MAC Address Table to learn which device is connected to which port, allowing for efficient “point-to-point” communication instead of broadcasting to everyone.
- Bridges: Older devices used to connect two separate network segments into one single logical network.
6. Ethernet Standards (IEEE 802.3)
Ethernet is the most widely used Data Link Layer technology. For the exam, recognize these common speeds:
- Standard Ethernet: 10 Mbps
- Fast Ethernet: 100 Mbps
- Gigabit Ethernet: 1000 Mbps (1 Gbps)
- 10-Gigabit Ethernet: 10 Gbps
Next Topic: Network Layer & IP Addressing (IPv4/IPv6)