Page 1
1 Media Access Control (MAC) in Computer Networks
1.1 Introduction to MAC
The Media Access Control (MAC) sublayer, part of the Data Link Layer (Layer 2) in the
OSI model, manages access to the physical medium and ensures reliable data transfer
between nodes on the same network link. It handles framing, physical addressing, error
detection, and access control to prevent collisions on shared media.
1.2 Functions of MAC
• Framing: Converts a stream of bits from the Network Layer into manageable
frames, adding headers with source and destination MAC addresses.
• Physical Addressing: Assigns unique MAC addresses (48-bit, expressed as 12
hexadecimal digits) to devices for identi?cation on the network.
• AccessControl: Determineswhichdevicecantransmitdataoverasharedmedium,
using protocols like CSMA/CD or CSMA/CA to avoid collisions.
• Error Detection: Adds a trailer (e.g., CRC) to frames to detect transmission
errors, enabling retransmission if needed.
1.3 Ethernet (IEEE 802.3)
• A widely used wired LAN technology operating at the Data Link and Physical
Layers.
• UsesCSMA/CD(CarrierSenseMultipleAccesswithCollisionDetection)formedia
access in shared environments.
• Frame format includes preamble, destination/source MAC addresses, type/length,
data, and CRC.
• Supports speeds from 10 Mbps to 100 Gbps, using twisted pair, ?ber, or coaxial
cables.
1.4 Wi-Fi (IEEE 802.11)
• A wireless LAN standard using CSMA/CA (Carrier Sense Multiple Access with
Collision Avoidance) to manage access.
• Operates in 2.4 GHz, 5 GHz, or 6 GHz bands, supporting multiple devices via
access points.
• Includes security protocols like WPA3 for encryption and authentication.
• Variants include 802.11a/b/g/n/ac/ax, with increasing speeds and e?ciency.
1.5 Bluetooth (IEEE 802.15.1)
• A short-range wireless technology for personal area networks (PANs).
• Uses Frequency-Hopping Spread Spectrum (FHSS) to avoid interference in the 2.4
GHz band.
• Supports low-power, low-bandwidth communication for devices like headsets and
IoT gadgets.
• MAC layer handles device pairing, connection establishment, and data framing.
1
Page 2
1 Media Access Control (MAC) in Computer Networks
1.1 Introduction to MAC
The Media Access Control (MAC) sublayer, part of the Data Link Layer (Layer 2) in the
OSI model, manages access to the physical medium and ensures reliable data transfer
between nodes on the same network link. It handles framing, physical addressing, error
detection, and access control to prevent collisions on shared media.
1.2 Functions of MAC
• Framing: Converts a stream of bits from the Network Layer into manageable
frames, adding headers with source and destination MAC addresses.
• Physical Addressing: Assigns unique MAC addresses (48-bit, expressed as 12
hexadecimal digits) to devices for identi?cation on the network.
• AccessControl: Determineswhichdevicecantransmitdataoverasharedmedium,
using protocols like CSMA/CD or CSMA/CA to avoid collisions.
• Error Detection: Adds a trailer (e.g., CRC) to frames to detect transmission
errors, enabling retransmission if needed.
1.3 Ethernet (IEEE 802.3)
• A widely used wired LAN technology operating at the Data Link and Physical
Layers.
• UsesCSMA/CD(CarrierSenseMultipleAccesswithCollisionDetection)formedia
access in shared environments.
• Frame format includes preamble, destination/source MAC addresses, type/length,
data, and CRC.
• Supports speeds from 10 Mbps to 100 Gbps, using twisted pair, ?ber, or coaxial
cables.
1.4 Wi-Fi (IEEE 802.11)
• A wireless LAN standard using CSMA/CA (Carrier Sense Multiple Access with
Collision Avoidance) to manage access.
• Operates in 2.4 GHz, 5 GHz, or 6 GHz bands, supporting multiple devices via
access points.
• Includes security protocols like WPA3 for encryption and authentication.
• Variants include 802.11a/b/g/n/ac/ax, with increasing speeds and e?ciency.
1.5 Bluetooth (IEEE 802.15.1)
• A short-range wireless technology for personal area networks (PANs).
• Uses Frequency-Hopping Spread Spectrum (FHSS) to avoid interference in the 2.4
GHz band.
• Supports low-power, low-bandwidth communication for devices like headsets and
IoT gadgets.
• MAC layer handles device pairing, connection establishment, and data framing.
1
1.6 Media Access Protocols
• CSMA/CD: Used in Ethernet; devices listen before transmitting and stop if a
collision is detected.
• CSMA/CA: Used in Wi-Fi; devices request permission to send, reducing collision
probability.
• TokenPassing: UsedinTokenRing; atokencirculates, andonlythetokenholder
transmits, ensuring collision-free access.
1.7 Switching and Bridging
• Switches: OperateattheMAClayer, forwardingframesbasedonMACaddresses,
reducing collisions in LANs.
• Bridges: Connect network segments, ?ltering tra?c using MAC address tables to
improve e?ciency.
• Both use store-and-forward or cut-through switching to process frames.
1.8 Related Concepts
• IP and MAC Interaction: The Network Layer (IP) relies on the MAC layer
for local delivery. ARP (Address Resolution Protocol) maps IP addresses to MAC
addresses.
• CIDR: Used in IP addressing for e?cient allocation, but MAC addresses remain
unique for Layer 2 communication.
1.9 Key Protocols and Hardware
• Protocols: Ethernet, Wi-Fi, Bluetooth, ARP, HDLC.
• Hardware: NICs(NetworkInterfaceCards), switches, bridges, andwirelessaccess
points.
1.10 Short Questions and Answers
1. What is the role of the MAC sublayer? It manages access to the physical
medium, handles framing, addressing, and error detection.
2. How does CSMA/CD di?er from CSMA/CA? CSMA/CD detects collisions
andstopstransmission,whileCSMA/CAavoidscollisionsbyrequestingpermission.
3. WhatisaMACaddress? A 48-bit unique identi?er assigned to networkdevices
for Layer 2 communication.
4. Why is Ethernet widely used? It is reliable, scalable, and supports high-speed
data transfer across various media.
2
Read More