Illustration of "Data link, flow control, error control"

Medium access Sublayer: how to allocate a channel if several device are on it ? (hub broadcast, ...)

MAC Protocols for guided LANs

 Static channel allocation

Each device has a slot. If it is not used, the slot is lost

Aloha methods

Pure Aloha

A device waits a random amount of time and send the frame. If lost, the device waits again a random amount of time and send it again. Collisions can occur at the beginning, the end, the middle, or the whole frame.

 Slotted Aloha

Same as Pure Aloha but the time is divided in slots. The frame is only vulnerable on the whole frame.

 CSMA/CD

There is a contention time before the frame transmission. The devices resolve the contention using a binary exponential back-off algorithm.

1-persistent CSMA

The device monitors the channel continuously. Transmit as soon as it is quiet. It waits a random amount of time before monitoring again if a collision occurs.

goes in front of the door and knock continuously and tries to come in immediately when it is open. If collision (2 folks come in the same time) it goes back in the bedroom, waits and then retry.

Nonpersistent CSMA

The device monitors the channel. If it is busy, it wait before retrying to monitor. If it is not busy, it transmit immediately.

goes in front of the door and knock once. It it is busy, it goes back to the room and wait before retrying. If it is not busy, it tries to come in, like the 1-persistent

N-persistent CSMA

Like the 1-persistent but it pull a coin to know if it must transmit, else it waits the next slot.

goest in front of the door and knock continuously and when it is open, it pull a coin to come in. Else, it waits 10 seconds (the next slot) and try again.

 Collision free

It is like the slotted channel allocation but before transiting a set of frame (1 for each device maximum), a bitmap is set (each device send a frame [1] to reserve its slot). At the end of the bitmap, each device which have reserved a slot can transmit when the slot reserved to him happen. It avoids to have unused slots.

Collision free VS CSMA

  • CSMA = better for light loading condition
  • CF = efficient under heavy loading conditions

Ethernet

Hub vs Switch:

  • hub = broadcast, quicker but more collision
  • switch = MAC address mapped to the device, slower but no collision

Propagation delay

two device can collide themself himself (response to the previous frame before receiving all the frames, ...)

Ethernet frame

Preamble | Dest | Source | Length | Data | Padding | CRC

Data-rates

  • 10, 40, 100 Gigabits/second Ethernet
  • short distance (UTP, 10m)
  • long distance (Fibre, 40km)

Mac Protocols for Wireless LANs

  • base station (access point)
  • Ad-hoc network

CSMA/CA

Collision Detection (CSMA/CD) impossible because wireless interfaces can't transmit AND monitor.

The sender monitors continuously. When it is not busy, is chooses a random period 0-8 short slots and waits before sending the data. It the channel becomes busy, it pauses the waiting. If a collision occurs, they choose a random period 0-15 short slots (and double).

Range problems

Hidden station problem

A and B are transmitting. C wants to transmit to B but do not monitors A (too far).

 Exposed station problem

A and B are transmitting. C wants to transmit to D but B occupies the chan.

MACAW Protocol

  • RTS: A send to B I want to transmit
  • CTS: B send to everyone A is transmitting (everyone must shut up)
  • Ack: B send to everyone A finished to transmit (you can ask to transmit)

Bands, Channels

  • 2.4 Ghz (better range, more congestion, more interferences)
  • 5 Ghz (greater capacity, not widely deployed) [802.11n/ac]
  • Each band is divided in channels

IEEE 802.11 MAC Frame

Control | Duration (microsec) | Addr(src) | Addr(dest) | Addr(base) | Seq | Addr | Data | CC`