Title: Is It Quiz Time
1Is It Quiz Time??
- What benefit do you get from replicating the root
node in a Distributed Hash Table (DHT)? - Answers due by 539PM
2CS176C Spring 2006Wireless MAC Protocols
- Administrivia / reminders
- Next Tues no class
- Project proposals due next Tues (5/9) midnight
- Email to krishnap_at_cs (cc me)
- HW 2 due next Sunday (5/14) midnight
- Email to krishnap_at_cs
- Today
- Media Access Control (MAC) protocols
- Tues no class
- Thur Proactive Wireless Routing (DSDV)
3MAC Protocols
- Media Access Control (MAC) Protocols
- Wireless networks use a shared medium air
- Protocol to determine who speaks, and when
- How is this handled in wired networks?
- Ethernet
- Multiple Access ProtocolCSMA/CD
- The acronyms
- CS carrier sense (listen before you talk)
- MA multiple access (multiple speakers)
- CD collision detection (detect instead of avoid)
4Ethernet
- A senses channel, if idle
- Transmit and monitor channel
- If detect another transmission (hear ! sent)
- Abort and send jam signal
- Update of collisions
- Delay according to exponential backoff algorithm
- Start again at beginning (channel sense)
- Else done with frame, set collisions to 0
- Elsewait until transmission over, then repeat
5CSMA/CD Details
- Jam signal
- Make sure all transmitters aware of collision
(48bits) - Exponential backoff
- Adapt retransmission attempts to current load
- Heavier load ? longer, random wait
- First collision choose K from 0,1delay is K
x 512 bit transmission times - Second collision choose K from 0,1,2,3
- After jth collision choose K from 0, ..., 2j
1 - After 10 or more collisions, choose K
from0,1,2,3,4,, 1023
6Why Not Collision Detection for Wireless?
- Most radios are half-duplex
- Send or receive, not both simultaneously
- Near-far problem
- Transmission so loud at sender it drowns out
others - Fundamental issues
- Sender cannot hear the same thing as the listener
- Hidden Terminal problem
- If medium is free near the sender, it may not be
free near the receiver - Exposed Terminal problem
- If medium is busy near sender, it may be free
near the receiver
7Hidden Terminal Problem
Senders A and C separated by obstacle. Each
thinks the medium is free.
Senders A and C out of range of each other.
Each thinks medium is free.
8Exposed Terminal Problem
Range of B
Range of C
sending
9Types of MAC Protocols
- MAC protocol design specific to application
- Fixed assignment approaches
- Allocate medium to a fixed number of transceivers
- Central server (AP) makes allocation assignment
- Great for cellular networks
- Examples TDMA, FDMA, CDMA
- Random assignment approaches
- Dynamic number of transceivers vie for medium
- Distributed (peer-to-peer) algorithms for
contention - Great for dynamic / unplanned or distributed
networks - Examples Aloha, CSMA, MACA
10Fixed Assignment MACs
- Given a static number of users
- Can schedule each user evenly across available
spectrum - Advantage
- Efficiently assign spectrum evenly to users
- Fair
- guaranteed slice of spectrum
- Minimal interference and conflicts
- Disadvantages
- Requires single (central) entity to perform
assignment - Does not adapt well to changing network
- Assumes equal use of B/W by each transceiver
- No contention
- Scales to large of users (hence ideal for
cellular)
11FDMA and TDMA
- FDMA Frequency division multiple access
- Divide frequency into channels
- Each user assigned to specific channel
- Guard band between channels to avoid interference
- Not scalable to large of users (very old
cellular systems) - TDMA Time division multiple access
- All users on same channel or frequency
- Divide time into many small slots
- Each user assigned a sequence of timeslots (or
fight for slots) - Requirement time synchronization between
user??AP - Basis for GSM cellular networks (Cingular,
T-Mobile etc)
12Cellular Networks
- Downlink (provider ? phone) is easy
- AP sends, appropriate phone listens
- Uplink (phone ? network)is harder
- Need to coordinatebetween users
- Large of users
- Contention ? bad
- Assignment ? good
- Roaming
- Overprovision for expectedroaming traffic
Wireless Cell
13Problem with Fixed Assignment
- Assignment for given set of users
- Can be recomputed over time by central entity
- Assumes uniform traffic model across users
- Every user has same slice of bandwidth
- What about data networks such as Wireless LAN?
- of users changes quickly over time
- Each users bandwidth requirement varies over
time - No central entity to compute assignment
- Need distributed approach to media access
14Basic Random Assignment (Aloha)
- Most of these assume single frequency, time
division - Designed by Abramson in 1970 for linking various
Hawaiian Islands - Protocol
- Transmit whenever you want
- Receiver acknowledges message
- If no ack, resend after random wait
- Low throughput peak performance is only 18
- Variant slotted Aloha
- Senders synchronized in time
- Time divided into slots
- Can only transmit at beginning of time slot
- Maximum throughput about 36
15Improving Throughput
- CSMA carrier sense multiple access
- Listen to channel first, transmit if not busy
- Improves over Aloha
- Problem in wireless networks
- Sender cannot hear what receiver hears
- Hidden terminals
- Collisions despite CS
- Exposed terminals
- Reduced throughput
16Fixing Carrier Sense w/ MACA
- Multiple Access with Collision Avoidance
- Replaces carrier sense with collision avoidance
- CSMA MA/CA ? MACA
- Eliminating carrier sense removes previous
problems - Hidden terminal, exposed terminal
- Add collision avoidance RTS/CTS signaling
between transmitting a packet - Small control packets announce your intention to
send - Neighbors hear, reduces collisions
17Collision Avoidance
- Replaces carrier sense with explicit signaling
- For unicast transmissions only
- Request to send (RTS) packet
- Is it ok to send to receiver?
- Clear to send (CTS) packet
- Receiver says OK to send
- RTS/CTS include length of upcoming packet
- Neighbors know how long to get out of the way
- Carrier sense ? sender-driven
- Collision avoidance ? receiver-driven
18Hidden Terminal Avoidance
- B sends RTS to C
- Neighbors hear RTS
- C responds with CTS
- Neighbors hear and back off
Range of C
Range of B
RTS
CTS
19CA as Virtual Carrier Sense
- B and C use RTS/CTS to reserve medium
- A overhears RTS, estimates backoff time
- D overhears CTS, estimates backoff time
A overhears RTS, knows to stay away
A
RTS
Data Frame
B
CTS
C
D
D overhears CTS, stays away
20Collisions Can Still Occur
- No carrier sense, so RTS messages can collide
- RTS messages sent random time after last
transmission - If collision, each sender performs random binary
exponential backoff - Any collisions are on short RTS messages, cheaper
than full message collision
Range of C
Range of B
RTS
RTS