<<

CMPE 252A: SET 5:

Medium Access Control Protocols

1

Collision Avoidance

 Collision avoidance emulates collision detection in networks where stations are half duplex.

 First protocol was proposed by Kleinrock and Tobagi (Split Reservation Multiple Access).

 Many protocols have been proposed since then: MACA, MACAW, FAMA, RIMA.

 The objective of collision avoidance protocols is to eliminate the hidden-terminal problem of CSMA: S, R, and N hear one another, and R R, N, and H hear one another H N hears S’s transmission S However, S and H cannot hear each N other’s transmissions to R, and cause interference at the receiver R.

2

Collision Avoidance

 Because of hidden terminals, the vulnerability of a data packet is just as in pure ALOHA, twice its length.

 With collision avoidance, stations exchange small control packets to determine which sender can transmit to a receiver.

 The collision avoidance dialogue can be controlled by the sender or the receiver.

 In sender-initiated collision avoidance we have: RTS (S to R) -> CTS (R to S) -> DATA (S to R) -> ACK (R to S)

 In receiver-initiated collision avoidance we can have: RTR (R to S) -> DATA (S to R) -> ACK (R to S)

3

1 Sender-Initiated Collision Avoidance

 Examples are MACA, MACAW, FAMA, and IEEE 802.11.

 MACA and MACAW do not use carrier sensing, FAMA and 802.11 do.

 MACA, MACAW, and IEEE 802.11 do not prevent collisions in the absence of base stations. C. Fullmer and JJ Garcia-Luna-Aceves, “Solutions to Hidden-Terminal Problems in Wireless Networks,” Proc. ACM SIGCOMM 97 (in the ccrg web page)

 Objective is to force hidden sources to hear the feedback from a receiver when they are causing interference during the collision-avoidance handshake.

4

Example of CSMA/CA: 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. RTS RTS S S S S to R R to S CTS CTS RTS CTS time RTS H to R noise is heard

2τ 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!

5

Basic FAMA Protocol

Packet Non-persistent ready strategy. Same basic algorithm for all Floor CSMA/CA schemes Taken? yes no

send RTS delay packet transmission k times wait for a round-trip time

CTS compute random send packet yes back? no backoff integer k

6

2 Throughput of FAMA

 Now we consider the effect of collision avoidance overhead.

 Remember: Fully connected net, arrivals of RTSs to the channel are Poisson with parameter lambda.

 Performance is always below that of CSMA/CD, because feedback incurs more overhead.

first packet starts (A) last interfering packet starts (B)

A NEW RTSNEW CTSNEW DATA B time γ ' τ idle γ τ γ ' τ P τ period Y ≤τ collision interval: average successful packet interval: C = Y +γ +τ ≤ 2τ +γ idle period: P +γ +γ '+3τ I =1/ λ 7

Throughput of FAMA Typical (over) simplification: Think of two mutually exclusive events: packet is successful or a collision occurs.

Therefore, B = P S ( P + τ ) + ( 1 − P S ) C …. but that is not correct Note that: • A successful packet occurs when the first and the last packet of a busy period are the same packet. • The average length of a collision interval includes the case when Y = 0 i.e., the first and the last pkt starts in busy period are the same! Therefore, we know two things: • The length of an average busy period must include the length of the average collision interval. • The busy period includes a CTS and a packet only when it is 8 successful with probability PS

Throughput of FAMA

first RTS starts (A) last interfering RTS starts (B) Length is Y +γ +τ Y ≤ τ A NEW B time γ ' τ Y ≤τ Length is Y +γ +τ +γ ! + P + 2τ A single RTS Y = 0

RTSNEW CTSNEW DATA time γ τ γ ' τ P τ Y = 0 9

3 Throughput of FAMA

Therefore: B = Y +γ +τ + PS (γ $ + P + 2τ ) with Y ≤ τ

−λτ A packet is successful with probability PS = P{0 packets in τ} = e For τ << P we can approximate: B ≈ γ + 2τ + e−λτ (γ '+P + 2τ )

The utilization period is only that portion of a packet transmission that has no overhead,U = Pe that−λτ is:

Pe−λτ Notice the impact of Substituting: S ≈ the RTS-CTS 1 overhead! +γ + 2τ + e−λτ (γ '+P + 2τ ) λ 10

Throughput of FAMA

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

Collision interval in CA is much longer than in CD, because detecting collisions is done using small packets, rather than listening to self transmission.

11

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.

12

4 Collision Resolution and Backoff Strategies

 Backoff strategy in :

 After experiencing the nth collision of a frame, pick a value K randomly from the set {0, 1, 2,…, 2m -1} with m= min{10, n}.

 Wait K.512 bit times before attempting a retransmission.

 Goal is to reduce offered load to the channel; however, it provides no assurance that a retransmission will be sent ahead of another new transmission from other node.

13

Conflict-Free MAC Protocols

 Conflict-free:

 Fixed assignment (TDMA, FDMA)

 Reservations

 Polling

 Dynamic scheduling

 Token passing

14

TDMA

TDMA: time division multiple access

 access to channel in "rounds"

 each station gets fixed length slot (length = pkt trans time) in each round

 unused slots go idle

 example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle

15

5  TDM (Time Division ): channel divided into N time slots, one per user; inefficient with low duty cycle users and at light load.

 FDM (Frequency Division Multiplexing): frequency subdivided. 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-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle. time frequencybands

16

Channel Partitioning (CDMA) CDMA (Code Division Multiple Access)

 unique “code” assigned to each user; i.e., code set partitioning

 used mostly in wireless broadcast channels (cellular, satellite, etc.)

 all users share same frequency, but each user has own “chipping” sequence (i.e., code) to encode data

 encoded signal = (original data) X (chipping sequence)

 decoding: inner-product of encoded signal and chipping sequence

 allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)

17

Token Passing

 Basic Scheme:

 A token granting the right to transmit is circulated among stations.

 Station with something to send receiving token changes the token into a start of packet and sends its packet.

 The token is sent back to the system when the sender is done.

 Two transmission strategies:

 Release after transmission (RAT): Sender releases the token immediately after transmitting its packet.

 Release after reception (RAR): Sender waits until it hears the last bit of its own transmission before releasing the token.

 Token Passing protocols can be used in any ; however, token management is simpler in rings.

18

6 RAT Strategy D D D

TK S S S SFD SFD

D

Token circulates until it reaches S Source changes token to start-of-frame delimiter SFD S D copies the data S takes frame out (packet length is actually longer than token circulation time)

19

Efficiency of RAT

 Let p be the probability that a station has something to send when the token arrives to it, P is the packet length, T is the token length, there are N stations in the ring, and the propagation delay from one station to the next is τ

1 τ 2 τ 3 τ N τ PKT TK TK PKT TK ... PKT TK time

p(N × P) p(N × P) back to 1 η = = RAT TOTAL N(T +τ + pP) 1 T +τ η = ; with a = RAT a P 1+ p

20

Average Delays in

 Delays are bounded in token ring nets!

 Each station can hold the token for a maximum amount of time, and there is a finite number of stations in the net.

 The maximum medium access time (MMAT) is defined to be the time elapsed from the start of a current packet transmission by a node to the time when it can have the “floor” of the network again.

 Assume that each station is allowed a token holding time of THT sec.

21

7 Average Delays in RAT

τ τ 1 τ 2 τ N PKT TK THT TK ... THT TK time

back to 1 MMAT = N(T +τ ) + P +THT (N −1) D = N(T +τ ) +THT (N −1)( p) + P

The advantage is that channel access delays are bounded. The disadvantage is that, when stations are bursty, delay overhead is paid in circulating the token. Token management involves complex protocols!

22

CSMA/CD Technology Issues

 IEEE802.3 and Ethernet are based on CSMA/CD.

 CSMA/CD is used over buses and star topologies.

 The most popular topology now (more than 80% of installed base) is the star topology with hubs or switches.

 A hub acts just like a station executing CSMA/CD, and only one transmission can succeed.

 A switch is different!…and is the future. Switch stores concurrently CPU RT transmitted packets. No collisions. Higher throughput Limited by the switch architecture.

23

8