190 likes | 384 Views
U 628 Computer Networks. CLASS 11, Thu. Sep. 29 2005 Stefano Basagni Fall 2005 M,W,T 4:35pm-5:40pm. Limited-Contention Protocols. Put together the good of contention and collision-free protocols Observation: Contention protocols are symmetric
E N D
U 628Computer Networks CLASS 11, Thu. Sep. 29 2005 Stefano Basagni Fall 2005 M,W,T 4:35pm-5:40pm
Limited-Contention Protocols • Put together the good of contention and collision-free protocols • Observation: Contention protocols are symmetric • Every terminal attempts to get the channel with a given probability p, same for all • Different probability could be helpful
Performance of Symmetric Protocols, 1 • k terminals contend the channel • Each has probability p of transmitting in a slot • Probability that a terminal is successful in a slot is kp(1-p)k-1 • What is a good value for p? • Find the maximum of the function: 1/k • Probability of success with optimal p is (k-1/k) k-1
Performance of Symmetric Protocols, 2 Acquisition probability for a symmetric contention channel
Performance of Symmetric Protocols, 3 • For small numbers of terminal the odds are good • When N increases, the probability approaches its asymptotic value 1/e • The probability of getting the channel is possible by limiting the competition • This is the strategy of limited-contention protocols
Strategy of Limited-Contention • Terminals are divided into groups • Only members of group 0 can compete for slot 0 • The one that succeeds transmits the frame • And so on … • Problem: Assigning terminals to slots • Extreme cases • One terminal per group: Countdown • Two terminals per group: Good for small p • All terminals in one group: Slotted Aloha
Adaptive Tree Walk Protocols, 1 • Used for testing soldiers fro syphilis in WWII • Take a blood sample from N soldiers • A part of each was poured into one test tube • The mixed sample was tested for antibodies • If the mix was ok all soldiers were cleared • If not, the process was repeated recursively grouping N/2 soldiers, then N/4 etc. …
Adaptive Tree Walk Protocols, 2 • Think the terminals as the leaves of a binary tree • In slot 0 all terminals try to get the channel • If one does, fine • If there is a collision, in slot 1 only the terminals in the sub-tree rooted at node 2 can try
Adaptive Tree Walk Protocols, 3 • If one of 2’s sons acquire the channel the slot following the frame is for those terminal under node 3 • If there is a collision on slot 1, it is node 4’s turn during slot 2 • In general: Each bit slot is associated with a node in the tree • If there is a collision, the number of nodes is restricted to the left and right sub-trees • If a slot is idle or successful, we are done
Wireless LAN Protocols • Common configuration • Office building • Access points (base stations) • Wired together (copper or fiber) • If the power is controlled to be up to 4m each room is a cell • Only one frequency though • Typical bandwidth is from 11 to 54Mbps
Wireless LANs, Basic Problems • Due to the nature of the wireless channel • CSMA techniques cannot be used • Problems are with interference at the receiver, not at the sender • The hidden terminal problem • Terminals are not able to detect a potential competitor because it is too far away
Hidden and Exposed Terminals A wireless LAN (a) A transmitting to B (hidden terminal) (b) B transmitting to A (exposed terminal)
MACA • Multiple Access with Collision Avoidance • The sender “stimulate” the receiver in sending a short frame • This is heard by hidden and exposed terminals • Hidden terminals will not transmit for the duration of the transmission of the large data frame
MACA: RTS and CTS, 1 • A send a frame to B • A starts by sending a Request to Send (RTS) frame to B • It is short: 30 bytes • Includes the length of the data frame to follow • B replies with a Clear to Send (CTS) frame • Includes the length of the frame to come, copied from the RTS • Upon receiving the CTS A starts transmitting the data frame
MACA: RTS and CTS, 2 The MACA protocol (a) A sending an RTS to B (b) B responding with a CTS to A
MACA: The Other Terminals • Terminals hearing the RTS are neighbors of A • They will be silent till A gets the CTS • Terminals hearing the CTS are neighbors of B • They will stay silent during the upcoming data transmission • They got the length from the CTS
MACA: Problems • Collision can occur • A could receive RTSs from B and C at the same time • Not receiving the CTS back from A, B and C try again after a random time • The algorithm for computing the random time is called binary exponential backoff (Ethernet)
MACA for Wireless • Bharghavan et al. (1994) • Introduced acks for successfully transmitted frames • Use minimal carrier sensing • When possible • The backoff algorithm is run for each source-destination pair (data stream)
Assignments • Textbook, Chapter 4 till page 270 • Updated information in the class Blackboard page