CACS303 Computer Networking

Computer NetworkingUnit 1116 min read

Multiple Access Protocols & Channelization: Aloha, CSMA, TDMA, FDMA, CDMA

Unit 11 of Computer Networking explores how multiple devices share a single communication channel efficiently, covering random-access protocols (Aloha, slotted Aloha, CSMA/CD), controlled-access protocols (polling, token passing), and channelization techniques (TDMA, FDMA, CDMA). Real-world examples from Nepal’s teleco

TAKEAWAYS

  • Multiple access protocols solve the shared-medium problem by coordinating how devices transmit data without collisions.
  • Random-access protocols (Aloha, CSMA) let devices transmit anytime but risk collisions; controlled-access (polling, token passing) avoid collisions but introduce delays.
  • Channelization divides the channel into time slots (TDMA), frequencies (FDMA), or codes (CDMA) to share bandwidth efficiently.
  • CSMA/CD (used in Ethernet) listens before transmitting and stops if a collision occurs, reducing wasted bandwidth.
  • Slotted Aloha improves pure Aloha by synchronizing transmissions to slots, cutting collisions by half.
  • FDMA (e.g., Ncell’s 4G) assigns unique frequencies to users; TDMA (e.g., GSM) assigns time slots; CDMA (e.g., 5G) uses unique codes for simultaneous transmission.

Why Multiple Access Protocols?

In computer networks, multiple devices often share a single communication channel (e.g., a wireless network, coaxial cable, or satellite link). Without coordination, transmissions from different devices can collide, corrupting data. Multiple access protocols define rules for how devices access the shared medium fairly and efficiently.

collision domain in Ethernet hub network diagramReal-world collision domain in a 10BASE-T hub network (Image: Mattias.Campe, CC BY-SA 4.0, via Wikimedia Commons)

ethernet hub collision domain**Devices connected to a hub share the same collision domain. (Image: Mattias.Campe, CC BY-SA 4.0, via Wikimedia Commons)


1. Classification of Multiple Access Protocols

Protocols are broadly categorized into three types:

Pure AlohaSlotted Aloha1-persistentnon-persistentp-persistentCSMA/CD (Ethernet)CSMARandom AccessPollingToken Passing (Token Ring)Controlled AccessTDMA (Time Division)FDMA (Frequency Division)CDMA (Code Division)ChannelizationMultiple Access Protocols
Hierarchical classification of multiple access protocols

2. Random Access Protocols

Devices transmit whenever they have data, without prior coordination. Collisions are inevitable but handled via retransmission.

A. Pure Aloha

  • How it works:
    • Devices transmit as soon as they have data, regardless of others.
    • If a collision occurs, both devices wait a random time before retrying.
  • Throughput: Only 18.4% (theoretical max) due to high collisions.
  • Example:
    • In a satellite network, if two ground stations transmit simultaneously, their signals collide at the satellite.
sequenceDiagram
    participant A as Device A
    participant B as Device B
    participant Channel as Shared Channel
    A->>Channel: Transmit (Data 1)
    B->>Channel: Transmit (Data 2)  # Collision
    Channel-->>A: Collision detected
    Channel-->>B: Collision detected
    A->>Channel: Backoff (random delay: t1)
    B->>Channel: Backoff (random delay: t2)
    A->>Channel: Retransmit (Data 1)
    note right of Channel: Only 18.4% throughput due to collisions
    note right of A: Random delay = exponential backoff
Pure Aloha collision and exponential backoff

B. Slotted Aloha

  • Improvement over Pure Aloha:
    • Time is divided into fixed slots.
    • Devices transmit only at slot boundaries.
    • Throughput improves to 36.8% (twice Pure Aloha).
  • Example:
    • Ncell’s 2G network uses slotted Aloha for voice calls in low-traffic areas.
sequenceDiagram
    participant A as Device A
    participant B as Device B
    participant Channel as Shared Channel
    A->>Channel: Wait for slot start
    B->>Channel: Wait for slot start
    Channel-->>A: Slot 1 available
    A->>Channel: Transmit (Data 1)  # Only one transmits per slot
    Channel-->>B: Slot 2 available
    B->>Channel: Transmit (Data 2)
    note right of Channel: Throughput: 36.8%
    note right of Channel: Time synchronized slots
Slotted Aloha time-synchronized transmission

C. Carrier Sense Multiple Access (CSMA)

Devices listen before transmitting to avoid collisions.

  • 1-Persistent CSMA:

    • If the channel is idle, transmit immediately.
    • If busy, keep listening until idle, then transmit.
    • Problem: Can still collide if two devices sense idle at the same time.
  • Non-Persistent CSMA:

    • If the channel is busy, wait a random time before retrying.
    • Reduces collisions but introduces delay.
  • p-Persistent CSMA:

    • If the channel is idle, transmit with probability p; otherwise, wait one slot time.
    • Used in wireless LANs (Wi-Fi).

D. CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

Used in Ethernet (IEEE 802.3).

  • How it works:
    1. Listen before transmitting.
    2. If the channel is idle, transmit.
    3. While transmitting, monitor for collisions.
    4. If a collision is detected:
      • Send a jam signal to ensure all devices detect the collision.
      • Wait a random backoff time before retrying.
  • Example:
    • In a Kathmandu University campus network, two PCs connected to a hub transmit simultaneously → collision → both stop and retry after a random delay.
sequenceDiagram
    participant A as PC A
    participant B as PC B
    participant Hub as Hub (Collision Domain)
    A->>Hub: Transmit (Data 1)
    B->>Hub: Transmit (Data 2)  # Collision
    Hub-->>A: Jam signal
    Hub-->>B: Jam signal
    A->>Hub: Backoff (random delay: 2^k * 512 bit times)
    B->>Hub: Backoff (random delay: 2^m * 512 bit times)
    A->>Hub: Retransmit (Data 1)
    note right of Hub: Ethernet CSMA/CD
    note right of Hub: Binary exponential backoff
CSMA/CD collision detection and jam signal

Advantages of CSMA/CD: ✅ Simple to implement. ✅ Efficient for local area networks (LANs) like Ethernet. ✅ No need for a central controller.

Disadvantages: ❌ Collision overhead wastes bandwidth. ❌ Not suitable for wireless networks (hard to detect collisions in radio signals).


3. Controlled Access Protocols

Devices take turns transmitting, eliminating collisions but introducing delay.

A. Polling

  • A central controller (master) polls each device in round-robin order.
  • Only the polled device can transmit.
  • Example:
    • Old telephone systems where a central switch polls each phone line.
sequenceDiagram
    participant Master as Central Controller
    participant A as Device A
    participant B as Device B
    participant C as Device C
    Master->>A: Poll (Can you transmit?)
    A-->>Master: No data
    Master->>B: Poll (Can you transmit?)
    B-->>Master: Yes, transmit (Data)
    B->>Master: Data
    Master->>C: Poll (Can you transmit?)
    note right of Master: Round-robin polling
    note right of Master: No collisions, but latency
Polling protocol with round-robin scheduling

Advantages: ✅ No collisions. ✅ Simple to implement.

Disadvantages: ❌ Inefficient if most devices have no data (wasted polling time). ❌ Single point of failure (if the master fails, the network stops).

B. Token Passing

  • A token circulates among devices.
  • Only the device holding the token can transmit.
  • Used in Token Ring (IEEE 802.5) and FDDI (Fiber Distributed Data Interface).
sequenceDiagram
    participant A as Device A
    participant B as Device B
    participant C as Device C
    participant Token as Token
    A->>B: Pass Token
    B->>C: Pass Token
    C->>A: Pass Token
    C->>B: Transmit (Data)  # Only when holding token
    note right of Token: Token Ring (IEEE 802.5)
    note right of Token: Fixed latency per device
Token passing mechanism in Token Ring

Advantages: ✅ No collisions. ✅ Fair access for all devices.

Disadvantages: ❌ Token loss can halt the network. ❌ Overhead in passing the token.


4. Channelization Protocols

The shared medium is divided among users using time, frequency, or code.

A. Time Division Multiple Access (TDMA)

  • The channel is divided into time slots.
  • Each user gets a unique time slot for transmission.
  • Used in 2G/3G mobile networks (GSM).
Slot 1User 1 transmitsSlot 2User 2 transmitsSlot 3User 1 transmitsSlot 4User 3 transmits
TDMA time slots for multiple users (GSM example)

Example:

  • Ncell’s 2G network assigns each call a time slot in a repeating frame.

B. Frequency Division Multiple Access (FDMA)

  • The channel is divided into frequency bands.
  • Each user gets a unique frequency for transmission.
  • Used in AM/FM radio, old telephone systems.
00.250.50.751User 1 (900 MHz)1User 2 (902 MHz)1User 3 (904 MHz)1
FDMA frequency bands for simultaneous transmission

Example:

  • Nepal Telecommunications Company (NTC) assigns different frequency bands to different mobile operators (Ncell, NTC, Smart).

C. Code Division Multiple Access (CDMA)

  • All users transmit simultaneously on the same frequency.
  • Each user is assigned a unique code (e.g., Walsh code).
  • Used in 3G/4G/5G (CDMA2000, LTE, 5G NR).
User 1 (Code A)User 2 (Code B)User 3 (Code C)Channel
CDMA simultaneous transmission with unique codes

Example:

  • Ncell’s 4G/LTE network uses CDMA to allow multiple users to share the same frequency band without interference.

Advantages of CDMA: ✅ Higher capacity (more users per channel). ✅ Better resistance to interference.

Disadvantages: ❌ Complex implementation (requires sophisticated signal processing). ❌ Higher power consumption.


## In the Real World

Multiple access protocols are everywhere in Nepal’s tech landscape:

  1. Pathao (Ride-Hailing App)

    • Uses CSMA-like mechanisms in its backend servers to handle multiple user requests (e.g., ride bookings, driver assignments) without collisions in database transactions.
    • Channelization: Different API endpoints (e.g., /book-ride, /driver-location) act like FDMA channels, processing requests in parallel.
  2. Ncell’s 4G/5G Network

    • TDMA: Older 2G/3G networks divide time slots for voice calls.
    • FDMA: Different frequency bands for Ncell, NTC, and Smart to avoid interference.
    • CDMA: 4G/LTE and 5G use CDMA to allow multiple users to share the same spectrum efficiently.
  3. eSewa (Digital Payment System)

    • Token Passing: When multiple users request transactions simultaneously, eSewa’s servers use round-robin scheduling (like polling) to process payments one by one.
    • CSMA/CD: In the underlying network, routers use CSMA/CD-like mechanisms to manage data packet collisions.
  4. Kathmandu Traffic Management (Smart Traffic Lights)

    • TDMA: Traffic lights at busy intersections (e.g., Thapathali) use time slots to prioritize different directions, reducing congestion (similar to TDMA in networks).
  5. WhatsApp Group Chats

    • When multiple users send messages at once, WhatsApp’s servers use random backoff (like Aloha) to retry failed transmissions, ensuring no message is lost.

## Worked Example: CSMA/CD in a Campus Network

Scenario: Four PCs (A, B, C, D) are connected to a 10 Mbps Ethernet hub. At time t=0:

  • PC A starts transmitting a 1000-byte packet.
  • PC B also starts transmitting a 500-byte packet at t=0.001s (collision occurs).

Assumptions:

  • Propagation delay (time for a signal to travel from one PC to another) = 50 µs.
  • Transmission time for 1000 bytes at 10 Mbps = 800 µs.
  • Collision detection time = 50 µs.

Steps:

  1. Collision Detection:

    • PC A and PC B detect the collision at t=50 µs (propagation delay).
    • They send a 32-bit jam signal (48 µs) to ensure all devices detect the collision.
  2. Backoff:

    • Both PCs wait a random backoff time (e.g., A waits 200 µs, B waits 300 µs).
    • PC A retransmits at t=250 µs (successful, since B is still waiting).
  3. Bandwidth Wasted:

    • Total time wasted = 800 µs (transmission) + 50 µs (collision) + 48 µs (jam) = 898 µs.
    • Efficiency loss: ~9% for this collision.

Real-World Tie-In: This is exactly how Ethernet collisions work in a university lab network where multiple students share a hub. Modern switches (not hubs) avoid collisions entirely by using full-duplex communication, but CSMA/CD remains a key concept in networking exams.


## Comparison Table: Multiple Access Protocols

Protocol Type Collision Handling Efficiency Use Case Example
Pure Aloha Random Access Retransmit after collision 18.4% Satellite networks Early ARPANET
Slotted Aloha Random Access Retransmit after collision 36.8% Wireless sensor networks Ncell 2G (low traffic)
CSMA/CD Random Access Jam signal + backoff ~80-90% Ethernet (IEEE 802.3) Office LANs
Polling Controlled Access No collisions Low (polling overhead) Old telephone systems Legacy PBX systems
Token Passing Controlled Access No collisions Medium Token Ring (IEEE 802.5) FDDI networks
TDMA Channelization Time slots High 2G/3G mobile (GSM) Ncell 2G
FDMA Channelization Frequency bands Medium AM/FM radio, old telephony NTC frequency allocation
CDMA Channelization Unique codes Very High 3G/4G/5G (LTE, 5G NR) Ncell 4G/5G

## Channelization vs. Random/Controlled Access

Feature Random Access Controlled Access Channelization
Collision Risk High None None
Access Delay Low (transmit anytime) High (waiting turn) Medium (depends on slot/frequency)
Complexity Low Medium High (requires synchronization)
Efficiency Low-Medium Medium-High High
Example Aloha, CSMA/CD Polling, Token Ring TDMA, FDMA, CDMA
Random AccessCollision-proneControlled AccessCentralized controlChannelizationDedicated resources
Access method categories with key characteristics

## Exam Tip

  1. Define Clearly:

    • Always start with a precise definition (e.g., "CSMA/CD is a random access protocol where devices listen before transmitting and detect collisions during transmission.").
    • Marks are lost if the definition is vague.
  2. Draw Diagrams:

    • For Aloha, CSMA/CD, and token passing, draw sequence diagrams showing collisions/token passing.
    • For TDMA/FDMA/CDMA, draw timeline/frequency/code division diagrams.
  3. Compare Protocols:

    • Examiners love comparison tables (e.g., Pure Aloha vs. Slotted Aloha vs. CSMA/CD).
    • Highlight throughput, collision handling, and use cases.
  4. Real-World Examples:

    • Relate TDMA to Ncell 2G, CDMA to 4G/5G, and CSMA/CD to Ethernet.
    • 1 mark is often given for a relevant example.
  5. Worked Examples:

    • If asked about collision probability in Aloha, show calculations:
      • Pure Aloha: (where = traffic intensity).
      • Slotted Aloha: .
    • For CSMA/CD, calculate bandwidth wasted due to collisions.
  6. Avoid Common Mistakes:

    • ❌ Saying "Aloha has no collisions" (it does; collisions are handled via retransmission).
    • ❌ Confusing FDMA (frequency) with TDMA (time).
    • ❌ Forgetting jam signal in CSMA/CD.

Based on the TU BCA syllabus for Computer Networking (CACS303), unit 11.

Discussion

Loading…