Two types of Links: -> Point-To-Point (link between Ethernet switch, host) -> Broadcast (shared wired or medium)
collsions if node receives two or more signals at the same time
Multiple access protocol: → distributed algorithms that determines when nodes can transmit → fundamental component of the network
given: multiple access channel (MAC) of rate R bps desiderata:
- when one node wants to transmit, it can send at rate R.
- when M nodes want to transmit, each can send at average rate R/M
- fully decentralized: • no special node to coordinate transmissions • no synchronization of clocks, slots
- simple
MAC protocols: taxomony -> channel partitioning - devides channel into smaller exclusive use pieces -> random access - channel not divided, causing collisions to be solved -> taking turns - take turns, but nodes with more to send can take longer turns
TDMA: time division multiple access

FDMA : Frequency Division Multiple Access

Random access protocols
- when node has packet to send
-> transmit at full channel data rate R
-> no a priori coordination among nodes
- two or more transmitting nodes: “collision” - random access protocol specifies:
-> how to detect collisions
-> how to recover from collisions (e.g., via delayed retransmissions) - examples of random access MAC protocols:
-> ALOHA, slotted ALOHA
-> CSMA, CSMA/CD, CSMA/CA
Slotted ALOHA
- all frames same size
- time divided into equal size slots
- nodes start to transmit only at slot beginning
- nodes are synchronized
- if 2 or more nodes transmit in slot, all nodes detect collisions
When a node obtains fresh slot, transmits in next slot → if no collision - node can send new frame in next slot -> if collision - node re transmits frame in each subsequent slot with prob p until success

Pure (unslotted) ALOHA
- Simpler, no sync
- when frame first arrives transmits immediately
- collisions probability increases
- worse than slotted ALOHA
CSMA (carrier sense multiple access)
-
listen before transmit
-
If channel sensed idle: transmit entire frame
-
if channel sensed busy: defer transmission
-
collisons can still occur: two nodes may not hear each other causing delay
-
distance and propagation delay play role in determining collision probability → human analogy: donʼt interrupt others!
CSMA/CD (CSMA with colission detection)
- CSMA/CD reduces the amount of time wasted in collisions
- transmission aborted on collision detection
CSMA/CD: CSMA with collision detection
- collisions detected within short time
- colliding transmissions aborted, reducing channel wastage
- collision detection easy in wired, difficult with wireless -> human analogy: the polite conversationalist → better performance than ALOHA and cheaper and simples to implement


CSMA/CA
-
Used in wireless2
-
Listens to the channel (carrier sense)
-
Waits if the channel is busy (multiple access)
-
Random backoff time before sending (collision avoidance)
-
May use RTS/CTS (Request to Send / Clear to Send) to reduce risk of collision in hidden node scenarios
-
It does NOT detect collisions after they happen.
-
Unlike CSMA/CD (used in Ethernet), Wi-Fi devices cannot detect collisions while transmitting (half-duplex radios).
-
So, CSMA/CA tries to prevent them, but if a collision happens, the devices just don’t get an ACK and assume a failure.
-
O tamanho mínimo da trama Ethernet é 64 bytes (512 bits).
-
Esse valor foi definido para garantir que a colisão seja detectada mesmo na maior distância possível entre nós na rede
if a collision still occurs?
-
No acknowledgment (ACK) is received.
-
The sender waits and retries after a random backoff.
-
This is how Wi-Fi handles retries — not through detection, but through lack of ACK and retry logic.
-
CSMA/CA does not detect collisions, it avoids them
| Feature | CSMA/CD (Ethernet) | CSMA/CA (Wi-Fi) |
|---|---|---|
| Detects collisions? | Yes (during transmission) | No (tries to avoid them) |
| Handles collisions? | Jam signal + retry | Retry after no ACK |
| Used in? | Wired Ethernet | Wireless (Wi-Fi) |
| Name | Full Form | Purpose | Timing Priority |
|---|---|---|---|
| SIFS | Short Interframe Space | Used for immediate responses like ACKs | Highest priority |
| DIFS | Distributed Interframe Space | Used before starting new transmissions | Lower priority |

Taking Turns MAC
Polling:
- master node "invites" slave nodes transmit in turn
- typically used with "dumb" devices
- Cons: -> polling overhead -> latency -> single point of failure(master)
- Bluetooth uses polling

Token Passing:
- control token passed from one node to the other sequencially
- token message
- Cons: -> token overhead -> latency -> single point failure(token)

Summary of MAC protocols
- channel partitioning, by time, frequency or code -> Time Division, Frequency Division
- random access (dynamic), -> ALOHA, S-ALOHA, CSMA, CSMA/CD -> carrier sensing: easy in some technologies (wire), hard in others (wireless) -> CSMA/CD used in Ethernet -> CSMA/CA used in IEEE 802.11 (Wi-Fi)
- taking turns -> polling from central site, token passing -> Bluetooth, FDDI, token ring