1 medium access control in wireless networks. aloha slotted aloha csma maca ieee 802.11

30
1 Medium Access Control in Wireless networks

Upload: margaretmargaret-carpenter

Post on 16-Dec-2015

222 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

1

Medium Access Control in Wireless networks

Page 2: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Aloha Slotted Aloha CSMA MACA IEEE 802.11

Page 3: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Wireless MAC classification

WirelessMAC

Centralized Distributed

Guaranteedor

controlledaccess

Randomaccess

Polling

Aloha

CSMA

CSMA/CD

Page 4: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Aloha

A node transmits a packet whenever a packet arrives. In the absence of an acknowledgement, the node

retransmit after waiting for a randomly chosen interval.

Does this work well?

Page 5: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Slotted Aloha

arrive

Page 6: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Carrier Sensing Multiple Access Listen before talk(transmitting) A node can transmit only if the

channel is idle. Carrier sensing is useful to reduce the

possibility that a new transmission will collide with on-going transmission.

How to determine whether a channel is idle?

Page 7: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

SINR SINR is signal (S) to interference (I) and

noise (N) ratio SINR = S / (I + N) Decrease in SINR results in a decrease in

reliability of reception

AB C

D

distance

po

we

r

SI

Page 8: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Carrier Sensing(CS) threshold If receiver power <

CS threshold, then channel is idle

ABtr GPP

CSthesholdPr

thesholdNI

P

NI

S r

AB

distance

po

we

r

B’s CS Threshold

Page 9: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Carrier Sensing and p-Persistence It makes slots smaller than packet size. Transmit in each slot with probability p if a

channel is idle. What value should p be?

How long is the slot size? slot size = carrier sensing delay + prop delay

+ RX/Tx turnaround delay Smaller slot size reduces idle time comparing

with the slotted Aloha where a slot size is a maximum packet size.

Page 10: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Carrier Sensing is not enough Because of hidden terminals, this

doesn’t always work well in wireless. Because of exposed terminals, will

reduce throughput in wireless Collision occurs at the receiver, not

at the sender, so the sender listening isn’t very helpful.

Page 11: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Hidden terminal problem

Node B can communicate with A and C, but A and C cannot hear each other.

When A transmits to B, C cannot detect the transmission using carrier sensing. So if C transmits, collision will happen at node B.

A B C

Page 12: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Exposed terminal problem

When node B send a packet to node A, node C hears transmission and keeps quite.

But C does not need to be quiet for transmission between C and D.

B C DA

Page 13: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

How does CS threshold affect the two problems? If C’ threshold is lowered, then C can detect

A’s transmission. So C can defer transmission. (reduces hidden terminal problem)

But it can worsens the exposed terminal problem. Why?

AB C

D

distance

po

we

r

S

threshold

Page 14: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Then what is optimal threshold? What happens if we decrease the CS

threshold? Will it make the network throughput increased?

Page 15: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Busy Tone

It is a way of avoiding hidden terminal problem.

A receiver transmits busy tone when receiving data. All nodes hearing busy tone keep silent.

Busy tone is using a separate channel.

Page 16: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

MACA

Get rid of carrier sensing of CSMA, and adds collision avoidance.

Designed for packet radio networks

Page 17: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Collision avoidance in MACA

When node A wants to send a packet to node B, node A first sends a Request-to-Send(RTS) to node B.

On receiving RTS, node B responds by sending Clear-to-Send(CTS) if B can receive the packet.

When nodes overhear a CTS, they keep quiet for the duration of the transfer.

Does MACA eliminate all collisions due to hidden terminals?

Page 18: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

IEEE 802.11 MAC

There are distributed and centralized components. Distributed Coordinated Function (DCF) Point Coordination Function (PCF)

PCF uses polling where AP controls as a central node.

DCF uses a random access protocol called CSMA/CA which is a slightly modified version of MACA.

Page 19: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Why doesn’t collision detection work in wireless? Near/far problem

Transmission is so loud at sender it drowns out all other transmissions. (What I hear doesn’t exactly match what I talk.)

Receiver’s signal is much weaker than sender’s signal because of path loss.

Sender can’t necessarily hear what receiver is receiving, so can’t tell if collision occurred.

Page 20: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

IEEE 802.11 DCF

It uses RTS-CTS exchange to reduce the hidden terminal problem.

It uses ACK to achieve reliability. Any node receiving RTS and CTS can’t

transmit for the duration of the transfer.

This collision avoidance(CA) is used because collision cost is higher than in wired network(Ethernet). Should waste much longer idle time

Page 21: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

CSMA/CA Physical carrier sense and virtual carrier sense

using Network Allocation Vector (NAV) NAV is updated at each node based on the

overheard RTS/CTS/DATA/ACK packets, each of which specifies the duration of a pending transmission time.

Nodes keep silent when they sense virtually as well as physically.

A

B

C

D

RTS

CTS

DATA

ACK

Wait for NAV

Wait for NAV

Page 22: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

C FA B ED

RTS

CTSNAV=10 NAV< 10

Page 23: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

C FA B ED

Reserved area

DATA

ACKNAV<10 NAV<10

Page 24: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

In 802.11 physical carrier sense is mandatory, while virtual carrier sense is optional.

RTS-CTS exchange is overhead. But if data collision cost is high, it is

better to use RTS-CTS.

Page 25: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Backoff Interval

Backoff interval is similar to p-persistent implementation of Ethernet.

When transmitting a packet, a node chooses a backoff interval in the range [0,cw], where cw is contention window.

Decrement the backoff interval by 1 each slot when the channel is idle. But countdown is suspended if the channel is busy.

When backoff interval reaches 0, transmit a RTS.

Page 26: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Backoff interval example

RTS+DATA

waitCW1 = 5

CW2 = 15

CW1 = 25

CW2 = 20

RTS+DATA

wait

CW = [0, 31]

CW2 = 10

Node 1 and 2 have backoff interval CW1 and CW2 respectively.

Page 27: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Backoff interval

The length of the backoff interval affects throughput.

Choosing a large cw leads to large backoff interval and results in long waiting time.

Choosing a small cw leads to larger number of collisions.

Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to change cw is needed.

In IEEE 802.11 DCF, cw is chosen dynamically depending on collision occurrence.

Page 28: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Binary exponential backoff in 802.11 When a node fails to receive CTS in

response to its RTS, it doubles its cw. When a node transmits data

successfully, it restores cw to the initial cw (minimum cw). So cw reduces much faster than it increases.

If this is true, the binary exponential backoff is not fair.

Page 29: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

Backoff interval and fairness

RTS

RTS

[0,1]

RTS

RTS

[0,1]

[0,2]

[0,2]

[0,4]

data

[0,4]

cw=1 cw=2

cw=1 cw=2

wait

cw=4

[0,1]

data

wait

cw=2 cw=1 cw=1

A

B

Page 30: 1 Medium Access Control in Wireless networks. Aloha Slotted Aloha CSMA MACA IEEE 802.11

MACAW: Backoff algorithm

The packet header has the sender’s backoff counter. Then all nodes copy this value into their backoff coutners, and basically all have the same cw. Everyone starts from the same cw after

successful packet transmission. Mild decrease after success

After collision, increase interval by factor of 1.5 Upon success, decrease interval by 1