Data Link and MAC

The data-link layer delivers frames between directly connected nodes using MAC addresses, controls access to a shared medium (e.g. CSMA/CD), and detects transmission errors with checksums like CRC.

Key formulas & points

Skim these first — then read the full notes below.

  • A switch forwards by MAC table; a hub simply broadcasts
  • ARP resolves an IP address to a MAC address on a LAN
  • VLANs partition a network into separate broadcast domains

Topic details

Introduction

This Tanenbaum topic covers hop-by-hop delivery. You study framing and error detection with CRC, media-access control methods that arbitrate a shared channel, the role of MAC addresses, and how switches, ARP and VLANs organise a local network.

Key relations & formulas

Formulas (Indian textbook notation)

  • CSMACD:sensethemedium,transmit,andjamoncollision(legacyEthernet)\frac{CSMA}{CD}: sense the medium, transmit, and jam on collision (legacy Ethernet)

Formulas (Indian textbook notation)

  • MACaddress:48bits,globallyuniqueMAC address: 48 bits, globally unique

Formulas (Indian textbook notation)

  • CRCdetectserrorsviapolynomialdivisionremainderCRC detects errors via polynomial-division remainder

Notation and sign conventions

Relation 1 —
CSMACD:sensethemedium,transmit,andjamoncollision\frac{CSMA}{CD}: sense the medium, transmit, and jam on collision

Formulas (Indian textbook notation)

  • CSMACD:sensethemedium,transmit,andjamoncollision(legacyEthernet)\frac{CSMA}{CD}: sense the medium, transmit, and jam on collision (legacy Ethernet)
Write this relation with symbols exactly as in Data Communications & Networking — Behrouz Forouzan before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 2 —
MACaddress:48bits,globallyuniqueMAC address: 48 bits, globally unique

Formulas (Indian textbook notation)

  • MACaddress:48bits,globallyuniqueMAC address: 48 bits, globally unique
Write this relation with symbols exactly as in Data Communications & Networking — Behrouz Forouzan before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 3 —
CRCdetectserrorsviapolynomialdivisionremainderCRC detects errors via polynomial-division remainder

Formulas (Indian textbook notation)

  • CRCdetectserrorsviapolynomialdivisionremainderCRC detects errors via polynomial-division remainder
Write this relation with symbols exactly as in Data Communications & Networking — Behrouz Forouzan before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.

Concept in depth

The data-link layer turns a raw physical channel into a reliable link between neighbours. Framing marks message boundaries, and a CRC appended to each frame lets the receiver detect (not correct) bit errors cheaply through polynomial division. On a shared medium multiple senders would collide, so a MAC protocol arbitrates — classic Ethernet used CSMA/CD to sense the channel and back off after collisions, though modern switched Ethernet largely eliminates them. Switches learn which MAC address lives on which port and forward frames selectively, unlike hubs that broadcast, while ARP bridges the gap between an IP address and the MAC address needed to actually deliver the frame.

Assumptions and validity limits

State assumptions explicitly before using any relation for data link and mac — steady state, uniform properties, linear elastic material, ideal gas, incompressible flow, etc., as applicable.
Wrong assumptions invalidate the entire solution even when the formula is correct. In Computer Networks viva and GATE descriptive questions, listing valid assumptions often earns separate marks.

Step-by-step problem approach

1. Read the question and list given data with SI units (common in Computer Networks papers).
2. Draw a neat labelled diagram where applicable — examiners in Indian universities award diagram marks even when arithmetic slips.
3. Identify which relation from this topic applies to data link and mac.
4. Use equation 1:
CSMACD:sensethemedium,transmit,andjamoncollision\frac{CSMA}{CD}: sense the medium, transmit, and jam on collision
.
5. Use equation 2:
MACaddress:48bits,globallyuniqueMAC address: 48 bits, globally unique
.
6. Substitute values, compute, and verify units and sign (direction).
7. State conclusion in one line — e.g. safe/unsafe, stable/unstable, feasible/infeasible.

Applications & exam relevance

Data Link and MAC appears in internet and enterprise IT. In Indian it software curricula this topic is tested because it connects theory to layered network protocols.
GATE and semester exams often combine data link and mac with earlier units — revise prerequisites before attempting mixed problems.
Industry interview panels sometimes ask: "Where did you use data link and mac?" — answer with a lab, mini-project, or plant visit example if possible.

Common mistakes in exams

Students confuse MAC addresses (link-layer, local delivery) with IP addresses (network-layer, end-to-end), think CRC corrects errors (it only detects them), and mix up switch behaviour with hub behaviour. Forgetting that ARP operates only within a single LAN is common.

Quick revision checklist

Before attempting data link and mac problems, confirm you can:
1. A switch forwards by MAC table; a hub simply broadcasts
2. ARP resolves an IP address to a MAC address on a LAN
3. VLANs partition a network into separate broadcast domains
Revise the solved examples in Data Communications & Networking — Behrouz Forouzan and one previous-year GATE or university paper for this unit.

Worked examples

Try the problem first — open the solution when you are ready to check.

ARP purpose

Problem

A host knows the destination IP address on its LAN but cannot yet build the Ethernet frame. What must it obtain and how?

Solution

It needs the destination MAC address, obtained by broadcasting an ARP request for that IP; the owner replies with its MAC, which the sender caches and uses to address the frame.

Conceptual check — Data Link and MAC

Problem

In a Computer Networks semester or GATE paper you are asked: "State the main assumption, the governing relation, and one practical consequence of data link and mac." What should a complete answer include?

📖 Standard books (India)

  • Data Communications & NetworkingBehrouz Forouzan

    Read: Syllabus unit

    OSI, TCP/IP, and network protocols