Chapter 2 Multiple Access Protocols - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 2 Multiple Access Protocols

Description:

Previous lecture now online. Homework #1 is on the Web site, due Feb. 5 ... If channel is busy, then sense channel continuously until it becomes free, begin again ... – PowerPoint PPT presentation

Number of Views:245
Avg rating:3.0/5.0
Slides: 27
Provided by: profri
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2 Multiple Access Protocols


1
Chapter 2Multiple Access Protocols
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • Previous lecture now online
  • Homework 1 is on the Web site, due Feb. 5
  • Programming assignment 1 will be available on
    Web site on Tuesday, not today
  • Next, Chapter 2, MAC protocols

3
Recap of Previous Lecture
  • Designing reliable ARQ protocols
  • Acknowledgements
  • Timeouts
  • Sequence numbers
  • Designing efficient reliable protocols
  • Choose timeout wisely
  • Keep the pipe full
  • Stop-and-Wait one outstanding packet
  • Go-Back-N sliding window, cumulative ACK
  • Selective Repeat sliding window, selective ACK

4
Direct-Link or Point-to-Point Networks
  • Physical layer handles bits
  • Data-link layer handles packets
  • Framing
  • Error detection
  • Retransmission-based protocols
  • How do I send to N hosts?
  • N point-to-point links
  • Other possibilities?

5
Shared-Media or Broadcast Networks
  • N senders and receivers connected by a shared
    medium (copper wire, atmosphere-TV!)
  • Sharing access to the same media
  • Analogy How do N persons converse in a room or
    at the dinner table? At once, or one by one?
    What is the communications protocol?
  • Local Area Network (LAN)

802.11/Wireless Ethernet
Ethernet (802.3)
6
Multiple Access Protocols
  • Determine which host is allowed to transmit next
    to a shared medium
  • Channel reservation TDMA, FDMA, CDMA, Token
    Ring,
  • Random access ALOHA, CSMA/CD, CSMA/CA

802.11/Wireless Ethernet
Ethernet
7
Multiple Access Protocols (2)
  • Also called Medium-Access Control (MAC) protocols
  • Before data link-layer packets can be sent, a
    sender has to gain access to the media
  • MAC layer is often placed in the stack between
    layer 2 and layer 1

Host A
Data Link Layer
MAC Layer
Physical Layer
8
Time Division Multiple Access (TDMA)
  • Divide time into multiple slots
  • Each host sends in a pre-determined slot
  • Out-of-band reservation mechanism
  • Compare to Time Division Multiplexing (TDM)

9
Frequency Division Multiple Access (FDMA)
  • Divide spectrum into frequency bins
  • Each host sends in a pre-determined frequency bin
  • Out-of-band reservation mechanism
  • Also called Frequency Division Multiplexing (FDM)
  • Example AM/FM radio, TV

Host 1
Host 2
Host 3
Freq. (Hz)
AM 500-1700 KHz
FM 88-108 MHz
Satellite GHz range
10
Code Division Multiple Access (CDMA)
  • Use multiple orthogonal codes to partition a
    range of spectrum
  • Each host sends using a pre-determined code
  • Also called spread spectrum
  • Direct-sequence spread spectrum (802.11, cell)
  • Frequency-hopping spread spectrum (Bluetooth)

Host 1
Freq
F1
F2
F3
Hopping sequence F1, F3, F2, F1, F3, F2,
Host 2
Host 1s Code 132, Host 2s Code 321, Host 3s
Code 213 all 3 codes orthogonal
Bluetooth
Host 3
11
Random Access ALOHA Protocol
  • Developed at University of Hawaii in 1971 by
    Abramson
  • Ground-based UHF radios connect computers on
    several island campuses to main university
    computer on Oahu
  • pure ALOHA hosts transmit whenever they have
    information to send form of random access
  • Collision will occur when two hosts try to
    transmit packets at the same time
  • Hosts wait a timeout1 RTT for an ACK.
  • If no ACK by timeout, then wait a randomly
    selected delay to avoid repeated collisions, then
    retransmit

12
Random Access ALOHA Protocol (2)
  • Collision of packets can occur when a packet
    overlaps another packet

time
T0
Wasted Time Due to a Collision 2 packet
intervals
Collision
Collision
Wasted Time Colliding with B
13
Random Access Slotted ALOHA
  • Rather than sending a packet at any time, send
    along time slot boundaries
  • Collision are confined to one time slot

time
T0
Wasted Time Due to a Collision 1 packet interval
No Collision
Collision
14
Random Access Slotted ALOHA (2)
  • How do hosts synchronize to begin transmitting
    along time slot boundaries?
  • One central station transmits a synchronization
    pulse or beacon
  • Slotted ALOHA is more efficient than ALOHA
    because when there is a collision, the wasted
    time is confined to one time slot
  • Assuming Poisson packet arrivals (memoryless),
    can compute the maximum throughput of ALOHA to be
    18.
  • Maximum throughput of Slotted ALOHA is 37
  • Why are ALOHA slotted ALOHA so inefficient?

15
Random Access CSMA
  • ALOHA slotted ALOHA are inefficient because
    hosts dont take into account what other hosts
    are doing before they transmit
  • Example at party, everyone speaks whenever they
    want to, regardless of whether another person is
    speaking
  • Instead, listen before you talk Carrier Sense
    Multiple Access (CSMA)
  • Sense for carriers (see if anyone else is
    transmitting) before you begin transmitting

time
Host B listens
delay
Collision still possible over long prop. delays
Host B sends
16
Random Access 1-Persistent CSMA
  • If channel is busy,
  • A host listens continuously
  • When channel becomes free, a host transmits its
    packet immediately (with probability 1)
  • Collision scenarios
  • Hosts A and B are far apart (long prop. delay).
    As signal takes a long time to reach B. So, B
    thinks channel is free, and begins transmitting.
  • Hosts B and C transmit as soon as A finishes
  • Still, CSMA is more efficient than ALOHA variants

time
Host B listens
Host B sends
Collision
17
Random Access p-Persistent CSMA
  • Generalization of 1-persistent CSMA
  • Typically applied to slotted channels
  • Slot length is chosen as maximum propagation
    delay
  • A host senses the channel, and
  • If slot is idle, transmit with probability p, or
    defer with probability q1-p
  • If next slot is idle, transmit with probability
    p, or defer with probability 1-p, repeat
  • If channel is busy, then sense channel
    continuously until it becomes free, begin again

18
Random Access Non-Persistent CSMA
  • Host does not sense channel continuously
  • Instead, if channel is busy,
  • Wait/sleep a random interval before sensing again
  • As with 1-persistent CSMA, as soon as channel is
    idle, then send a packet
  • Random interval reduces collisions
  • Higher throughput than 1-persistent CSMA when
    many senders

time
Host B listens
Random Sleep
Host B sends
19
Random Access Ethernet CSMA/CD
  • Ethernet uses CSMA/CD, i.e. CSMA with Collision
    Detection (CD)
  • Listen-while-talk protocol
  • A host listens even while it is transmitting, and
    if a collision is detected, stops transmitting

time
Host B senses carrier
20
Random Access Ethernet CSMA/CD (2)
  • Can abort transmission sooner than end-of-packet
    if there is a collision
  • Can happen if prop. delays are long
  • Better efficiency than pure CSMA
  • CSMA/CD doesnt require explicit acknowledgement
  • Unlike CSMA, which requires an ACK or timeout to
    detect a collision
  • Collision detection is built into the transmitter
  • When collision detected, begin retransmission

21
Random Access Ethernet CSMA/CD (3)
  • Exponential backoff strategy
  • When a collision is detected, a host waits for
    some randomly chosen time, then retransmits a
    packet
  • If a second collision is detected, a host doubles
    the original wait time, then retransmits the
    packet
  • Each time there is another collision, the wait
    time is doubled before retransmission
  • Variants
  • At each retransmission, choose a random value
    from the exponentially increasing wait time.
  • At each retransmission, choose randomly from
    among a discrete set of values within
    exponentially increasing wait time
  • Retransmit a finite of times

22
Random Access Ethernet CSMA/CD (4)
  • CSMA/CD can be used with nonpersistent,
    1-persistent, or p-persistent variants of CSMA
  • Ethernet is synonymous with the IEEE 802.3
    standard
  • Initial work on Ethernet at Xerox in early 70s
  • Ethernet specifies 1-persistent CSMA/CD
  • To extend an Ethernet, repeaters are placed.
  • Start to run into propagation delay issues and
    noise amplification issues
  • Ethernet keeps its maximum length to 2500 m to
    keep prop. delays tight, so that CSMA/CD responds
    well

23
Random Access 802.11 Wireless Ethernet
  • Employs CSMA/CA, i.e. CSMA with Collision
    Avoidance (CA)
  • Hidden terminal effect
  • Example B can hear A and C, but A and C cant
    hear each other. If A is sending B, C thinks
    channel is clear and starts sending gt collision!
  • Doesnt happen in wired Ethernet, because hosts
    can hear each other

Host A
Host B
Host C
Collision
24
Random Access 802.11 Wireless Ethernet (2)
  • How to handle the hidden terminal effect?
  • Host A sends a Request-To-Send (RTS)
  • Host B sends a Clear-To-Send (CTS)
  • Host C hears the CTS, and does not interrupt
    transmission between A and B
  • This helps implement Collision Avoidance

RTS
Host A
Host B
Host C
CTS
CTS
Data
Host C Suppresses Its Data
25
Random Access 802.11 Wireless Ethernet (3)
  • Acknowledgements are still needed
  • After Host A has finished sending its data, Host
    B sends an ACK
  • Host C hears this ACK, and sends its RTS

Data
Host A
Host B
Host C
ACK
ACK
RTS
26
Random Access 802.11 Wireless Ethernet (4)
  • 802.11 does not support Collision Detection
  • In a wired LAN, transmitter can check voltage
    levels to see if there is a collision. A remote
    transmitters power doesnt attenuate severely.
  • In a wireless LAN, the transmitters power
    overwhelms a distant transmitters power, so its
    difficult to detect collision.
  • What happens if two RTSs collide?
  • Senders realize after timeout that CTS did not
    come back, and then practice exponential backoff
    in trying to send new RTSs
Write a Comment
User Comments (0)
About PowerShow.com