You are on page 1of 17

Medium Access Control

Gaurav S. Kasbekar Dept. of Electrical Engineering IIT Bombay

Introduction

1-1

Reference
These are a modified version of slides by

Kurose and Ross available at:

http://ctas.poly.asu.edu/millard/CET459/lectno/K% 20-%20R%20stuff/index.html

Introduction

1-2

Link Layer
Network layer transports
link

packets from one end system to other via several intermediate routers For transferring packet over an individual link, network layer uses services of link layer Terminology: refer to end system or router as node Link layer transfers packet from one node to adjacent node

over a single link

5: DataLink Layer

5-3

Types of Links
Point-to-point Link

single sender at one end of the link single receiver at other end of the link when sender has a packet for receiver, simply sends it over the link e.g., dial-up, DSL Broadcast Link N nodes connected to a shared medium (e.g., cable, wireless) When one node transmits, packet reaches every other node Broadcast medium E.g., Ethernet, Wireless LAN

Multiple Access Control Problem


N nodes connected to a broadcast medium If exactly one node transmits at a time, packet

successfully received Collision if transmissions of two or more nodes overlap

none of the packets can be decoded due to interference

Need a way to make sure that

at a time Multiple Access Control (MAC) Protocol

exactly one node transmits

Distributed algorithm that determines how nodes share

channel, i.e., determines when given node can transmit Key Challenge: Communication about channel sharing must use channel itself!

no out-of-band channel for coordination


5: DataLink Layer 5-5

Example

MAC Protocol should attempt to maximize successful transmissions minimize collisions minimize idle time intervals
5: DataLink Layer 5-6

Analogy
Telephone conference call N people, at different locations, all connected

via phone Each one can talk to and hear all others Confusion if two or more talk simultaneously

similar to collision

Need a way to make sure exactly one talks at

a time If the N people were all face-to-face in the same room, could raise hands to request permission to speak

similar to out-of-band channel


5: DataLink Layer 5-7

Examples
Ethernet: widely used in

company and university LANs In simplest version, each node connected to a shared cable

Broadcast medium

Wi-Fi: mobile nodes

and base station communicate over wireless channel

Base station

Broadcast medium
Ref: Kurose and Ross, Chapter 5

Mobile nodes
Introduction

1-8

Ideal MAC Protocol


Broadcast Channel of Rate R bps 1. When only one node has packets to send, it should be able to send at rate R. 2. When M nodes have packets, each should be able to send at average rate R/M 3. Decentralized: no special node to coordinate transmissions 4. No time synchronization required across nodes often difficult to achieve due to clock drifts

5: DataLink Layer

5-9

Classification of MAC Protocols


Channel Partitioning divide channel into smaller pieces (e.g., time slots, frequency slots) allocate piece to node for exclusive use Random Access channel not divided, collisions may occur each node with a packet to transmit refrains from transmitting with some probability to avoid collisions Taking Turns Nodes take turns, but nodes with more to send can take longer turns

5: DataLink Layer

5-10

Channel Partitioning MAC protocols: TDMA


TDMA: Time Division Multiple Access
Time divided into equal-sized frames; each

frame divided into N equal-sized slots Each node gets one slot in each frame Unused slots go idle Example: 6 nodes, 1,3,4 have packets, slots 2,5,6 idle

5: DataLink Layer

5-11

Channel Partitioning MAC protocols: FDMA


FDMA: Frequency Division Multiple Access
Channel spectrum divided into frequency bands

Each station assigned fixed frequency band


Unused transmission time in frequency bands go idle Example: 6 nodes, 1,3,4 have packets, frequency

bands 2,5,6 idle

frequency bands

5: DataLink Layer

5-12

Disadvantages of ChannelPartitioning Protocols


When all N nodes have packets to send,

each gets average rate R/N

full utilization of channel rate R

But when only M < N nodes have packets,

each still gets only R/N avg. rate

Net transmission rate only R (M/N)

Tight time synchronization needed in

TDMA

each time slot may be a few microseconds long

5: DataLink Layer

5-13

Random Access Protocols


Channel not partitioned into pieces

When node has packet to send, transmits

at full channel data rate R Node with a packet to send refrains from transmitting with some probability to avoid collisions Examples:
Slotted

ALOHA

ALOHA CSMA, CSMA/CD, CSMA/CA


5: DataLink Layer 5-14

Slotted ALOHA
Assumptions All packets same size Time is divided into equal size slots

Slot width = time to transmit 1 packet

Nodes are synchronized


Nodes start to transmit

packets only at beginnings of slots If 2 or more nodes transmit in slot, all nodes detect collision before slot ends

Operation At a Node When node obtains new packet from above, it transmits in next slot If no collision, node can send new packet (if available) in next slot If collision, node retransmits packet in each subsequent slot with prob. p until success

refrains w.p. 1-p to avoid collisions


5: DataLink Layer 5-15

Example

S: successful C: collision E: empty

5: DataLink Layer

5-16

Slotted ALOHA
Notice that a node sends
a

new packet w.p. 1 in next slot a packet involved in one or more collisions w.p. p
Why not send every packet w.p. p?

To ensure that when only one node has

packets to send, it can get throughput R

5: DataLink Layer

5-17

You might also like