cmpe 255: advanced computer communication lecture 2:

32
Jun 18, 2022 UCSC cmpe255 1 CMPE 255: Advanced Computer Communication LECTURE 2: Medium Access Control Protocols forAd Hoc Networks

Upload: dingbang-lio

Post on 31-Dec-2015

37 views

Category:

Documents


4 download

DESCRIPTION

CMPE 255: Advanced Computer Communication LECTURE 2:. Medium Access Control Protocols forAd Hoc Networks. RTS. RTS. CTS. CTS. S to R. R to S. S. S. S. RTS. CTS. time. RTS. H to R. noise is heard. FAMA: Floor Acquisition Multiple Access. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 1

CMPE 255: Advanced Computer Communication

LECTURE 2:

Medium Access Control Protocols forAd Hoc Networks

Page 2: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 2

FAMA: Floor Acquisition Multiple Access

Stations use carrier sensing to send any packet. The CTS lasts much longer than an RTS to force the

interfering sources to detect carrier (from the receiver) and back off.

timeRTS

S to R

CTS

R to S

RTS

2

noise is heardH to R

RTS from S arrives at R with no collisions.RTS from H must start within one prop. delay from CTS from R to S.H must hear noise from CTS and backs off!

S S SRTS

CTS CTS

RTS

Page 3: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 3

Basic FAMA Protocol

send RTS

no

wait for a round-trip time

CTSback?yes

compute randombackoff integer kno

delay packettransmission

k times

Packetready

Floor Taken?

yes

send packet

Non-persistent strategy.Same basic algorithm for all CSMA/CA schemes

Page 4: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 4

Throughput of FAMATwo mutually exclusive events: packet is successful or a collision occurs. Therefore: CPPPB SS )1()(

A packet is successful with probability ePPS }in packets 0{

For P we can approximate:

)2)(1()3'( ePeB

The utilization period is only that portion of a packet transmission that has no overhead, that is:PeU

)'(21

Pe

PeSSubstituting:

Notice the impact of the RTS-CTS overhead!

Page 5: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 5

Throughput of FAMA

FAMA (and all collision-avoidance protocols) is always below CSMA/CD.

Page 6: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 6

RIMA-DP timing diagrams

RTR NTR

Noise detected at Z

BACKOFFX

Z interference

RTRWaiting period

DATA

CTS

X

Z

RTRWaiting period

DATAX

Z

RTR

RTR

collision

X

Z

channel BACKOFF

Node X sends an RTR and after seconds receives a DATA packet and then sends its DATA

Node X sends an RTR and node Z replies with a CTS; node X sends its DATA

Nodes X and Z send RTRs within seconds and therefore a collision occurs

Due to interference from node Z, node X sends an NTR to stop the handshake

DATA

Page 7: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 7

Throughput of RIMA-DP The probability of success is the probability that an RTR is sent in the clear, because any RTR produces one or two data packets, i.e.,

The probability with which the polled node has data is The probability with which the poled node has no data is

The length of an average busy period always includes an RTR, a prop delay, and the average time between the first and the last RTR of the busy period; therefore,

ePS

e

NPS

11

e

NPS

112

2)(11

2

)2()22(1

2 21

Ne

eB

PPe

B SS

Page 8: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 8

Throughput of RIMA-DP

2YCcollision interval: successful packet:

3'Pidle period:

/1I

first packet starts (A)

Y

'

last interfering packet starts (B)

idleperiod

time

DATANEWAB

NEWRTR NEWCTS

NePPU SS

11)()2( 21

The length of the average idle period is simply 1/lambda The average utilization period is

Page 9: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 9

Throughput of RIMA-DP

The throughput is simple the length of the ave. utilization period divided by the length of the average cycle:

)2()(1

21

)1

1(

eN

NBI

US

Page 10: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 10

Throughput Analysis

500 Byte data packets; 1Mbps network speed; maximum distance between nodes is 1 mile; on the left a 10 node network; on the right a 50 node network

10-3

10-2

10-1

100

101

102

103

104

105

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1a = 0.00025; b = 0.04; c = 0.005

Offered Load: G

S (T

hrou

ghpu

t)

MACA oooFAMA-NCS ---MACA-BI -.-RIMA-SP +++RIMA-DP ___

RIMA-BP xxx

10-3

10-2

10-1

100

101

102

103

104

105

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1a = 0.00025; b = 0.04; c = 0.005

Offered Load: G

S (T

hrou

ghpu

t)

MACA oooFAMA-NCS ---MACA-BI -.-RIMA-SP +++RIMA-DP ___

RIMA-BP xxx

Page 11: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 11

Limitations of Colision Avoidance

Collision avoidance is meant for unicast packets.

A large number of network-level control and data packets are multicast and broadcast in nature.

Page 12: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 12

Collision-Avoidance Transmission Scheduling (CATS)

A contention and reservation based topology-dependent multi-channel scheduling protocol.

Schedules unicasting, multicasting and broadcasting traffics simultaneously.

Data packets are sent collision-free in the presence of hidden terminals.

Supports real-time applications and node mobility. Provides better spatial reuse than topology-

independent scheduling since frame length depends only on node degree.

Works well with commercial SFH radios in ISM bands.

Page 13: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 13

Time and Channel Organization

Time is slotted and slots are grouped into frames. A slot is further divided into six mini-slots.

Multiple channels are available: one signaling channel (SCH), one broadcast data channel (BCH) and a number of other data channels (DCHs).

A data link refers to a particular DCH or the BCH in a particular slot.

Small control packets called beacons are used to contend for and reserve data links.

Page 14: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 14

Identifying Reservations and Data Transmission

slot 3 slot Lslot 2slot 1Frame

Unicast

Broadcast

Broadcast CHSignaling CH

Multicast

LRB: Link Reservation Beacon

LRB LRB

LRB LRB

LRB

Reserved Data CH's

MS1 MS2 MS3 MS4 MS5 MS6

Unicast Data Packet

Multicast Data Packet

Broadcast Data Packet

Page 15: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 15

Making Reservations for Data Transmissions

slot 3 slot Lslot 2slot 1Frame

RUB

RUB CUB

Unsuccessfulunicast contention

Successfulunicast contention

RUB: Request Unicast Beacon, RMB: Request Multicast Beacon, RBB: Request Broadcast BeaconCUB: Concur with Unicast Breacon, SMB: Stop Multicast Beacon, SBB: Stop Broadcast Beacon

UCD: UniCast Data, MCD: MultiCast Data, BCD: BroadCast Data, SL: Sender ListensRL: Receiver Listens, C/N: Clear/Noise

SL

SL

RL

RL UCD

Signaling CH Data CH

MS1 MS2 MS3 MS4 MS5 MS6

SL

SL

C/N

slot 4

RMB

RMB Clear

Unsuccessfulmulticast contention

Successful multicastcontention

SL

SL MCD

SL

SL

SMB/N

RBB

RBB

Unsuccessfulbroadcast contention

Successfulbroadcast contention

SL

SL

SBB/N

Clear BCD

SL

SL

RLSL

RLSL

Broadcast CH

Page 16: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 16

Frame Length

For broadcast: L = d 2 + 1.

For unicast:

Worst-case minimum frame length L and number of DCHs C (assuming N > d

2, d: the max node degree, and N: the node population in the network):

L = 2d, C = d, if each node unicasts once in each frame; Or

L = 2(2d -1), C = 2d -1, if each node unicasts to each neighbor once in each frame.

Page 17: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 17

Approximate Unicast Throughput Analysis Results

L: frame lengthd: node degree

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.2 0.4 0.6 0.8 1 1.2

Thr

ough

put

per

Nod

e S

Offered Load per Node G

BAMA: d=10, L=20 slots, C=10 DCH's, AFL in slots

AFL=100AFL=10

AFL=2AFL=1

AFL: average flow (message) length

Page 18: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 18

Approximate Broadcast Throughput Analysis Results

AFL: average flow (message) lengthN: number of nodes

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Thr

ough

put

per

Nod

e S

Offered Load per Node G

BAMA: N=16 nodes, L=16 slots, AFL in slots

AFL=100AFL=10

AFL=2AFL=1

L: frame length

Page 19: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 19

Approximate Performance Analysis

Throughput is analyzed for two cases: unicast traffic over a hyper-cube topology and broadcast traffic over a fully-connected topology.

Each node can reserve at most one slot for transmission in each frame with the worst-case minimum frame length and number of data channels.

We consider Poison sources and geometrically distributed variable-length flows (messages).

Throughput is defined as the probability that a node has a reserved link for transmission in a frame.

Page 20: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 20

Likmitations in CATS

Collision avoidance dialogue is needed! How can we eliminate the CA in CATS? Goal is to have a topology-dependent

transmission schedule! Protocol needs to implement a

distributed election of schedules and such schedules must be transmitted persistently without eating too much bandwidth!

Page 21: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 21

Collision Resolution and Backoff Strategies

Used to stabilize the system by preventing traffic loads that exceed its capacity.

Collision resolution: Let packet that collide resolve when each is transmitted and block new traffic from entering the system.

Backoff strategies: Increase the time between retransmissions when traffic load (that creates collisions) increases.

Page 22: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 22

Nodes 76 to 100 can try;80 succeeds!

Nodes 63 to 70 can try;70 succeeds

Collision Resolution Algorithm Assume a fully-connected network. Each node maintains a stack, a HighID, a LowID and

knows the maximum ID in the system

Nodes 50 to 62 can try;50 succeeds(must be only in range)

Nodes 1 to 49 can try again; node 5 succeeds! (must be only node in

range) Nodes 50 to 75 can try;50 and 70 collide

Nodes 5, 50, 70, 80 collide

Nodes 50 to 100 must wait for all collisions from 1 to 49 to be resolved

Nodes 76 to 100 must wait;Node 80 waits

Node 70 waits

Page 23: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 23

Average Delay of MAC Protocols

We want to measure or compute the average time from the instant the first bit of a packet is first transmitted to the moment the last bit is received correctly at the destination.

Assume that arrivals (of new and retransmitted data or control packets) to the channel are Poisson.

Assume fully-connected networks.

Page 24: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 24

Average Delay in ALOHA

Direct method: The average number of transmissions needed for a packet to be received correctly is GeSG 2/

Therefore, the number of retransmissions is 11/ 2 GeSG

Assumptions:

A satellite channel with propagation delay NxP, where P is the packet length and NxP >> PA retransmission is sent after an average backoff time of BxP seconds.

A packet is transmitted (G/S-1) times in error (due to collisions) and each such transmission wastes P+NxP +BxP seconds.

The last transmission is successful and must take P+NxP seconds.Therefore, the average delay incurred is:

))(1( 2 PBPNPePNPD G

Page 25: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 25

Average Delay in ALOHAIndirect Method:

Based on the fact that the success of a transmission is independent of others, and knowing how many times we have retransmitted does not change the likelihood of success in the next transmission!We use a diagram showing possible states, probabilities of transition, and delay incurred in that transition.

START END

BACKOFF

PNP , SP

PBPNP

,1

SP

PBPNP

,1

SP

PNP , SP

From the diagram. we obtain a number of simultaneous equations that we solve to obtain delay from START to END.

Page 26: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 26

Average Delay in ALOHAFrom the diagram we have:

))(1()( RPBPNPPPNPPD SS

))(1()( RPBPNPPPNPPR SS Solving these two equations:

)()1(

PBPNPP

PPNPR

S

S

))(1( 1 PBPNPPPNPD S

Substituting GS eP 2 we obtain the same result.

The same method can be applied on the other MAC protocols!

Page 27: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 27

Average Delay of ALOHA The delay increases exponentially with heavy load,

which is not acceptable for real-time applications.

Page 28: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 28

Page 29: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 29

Page 30: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 30

Page 31: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 31

Page 32: CMPE 255: Advanced Computer Communication LECTURE 2:

Apr 19, 2023 UCSC cmpe255 32