CSMA is a Multi-Access Protocol

Carrier Sense Multiple Access (CSMA) is like human conversation:

  • Carrier sense:
    • Listen before speaking and don’t interrupt
  • Collision detection:
    • Detect simultaneous talking and shut up
  • Random access:
    • Wait for a random period of time before trying to talk again
    • -persistent CSMA - if channel is idle, transmit the frame with probability

But collisions can still occur

  • Wasted transmissions

Collision Detection

The “CD” part of CSMA/CD

  • Collision happens when two packets overlap at receiver

Note

Ethernet does collision detection, but not WiFi

Worst-case scenario of collision:

  • Two farthest nodes in the LAN
  • Transmission time should be greater than or equal to 2 * propagation time for CSMA/CD to work
  • Formula for minimum packet size (P) or maximum length (L):
    • , where is the speed of propagation

What happens on collision

  • When receiver detects collision
    • Stop sending
    • Send jamming signal to ensure collision detection by all nodes in the link

CSMA for WiFi

802.11 does Collision Avoidance, but cannot do Collision Detection because of these two problems:

  1. Cannot detect all collisions
    • Hidden terminal problem
      • Happens because 802.11 uses physical carrier sensing, which is susceptible to the hidden terminal problem
      • Virtual Carrier Sensing can help with that
    • Signal strength fades over distance
    • (see WiFi Broadcast Limitations for more info)
  2. Cannot listen while sending
    • Strength of received signal is much smaller
    • Expensive to build hardware that detects collisions