1 / 25

Medium Access Control

Medium Access Control. MAC Is Need for Multi-Access Channel. A multi-access channel (e.g., a copper wire, the air) is a channel on which multiple stations can send their data. (Widely used in LAN such as Ethernet because of amortized low cost)

Télécharger la présentation

Medium Access Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. Medium Access Control

  2. MAC Is Need for Multi-Access Channel • A multi-access channel (e.g., a copper wire, the air) is a channel on which multiple stations can send their data. (Widely used in LAN such as Ethernet because of amortized low cost) • Different than a point-to-point link where only one station can send its data. (Widely used in WAN such as T3 for connecting two remote cities) • MAC is used to avoid multiple data transmission at the same time (collision) on a multi-access channel. • If multiple data packets collide with each other, their data will be garbled and become useless.

  3. Classification of Various MAC Protocols MAC is still an active research area.

  4. MAC’s Performance Metrics • Network goodput • Packet retransmission, corruptions, and system overhead make goodput less than throughput • Mean delay • Will you need to wait a long time before getting a turn to send a packet? Is there a bound? • Stability • Will goodput decreases as the offered user load increase ? • Fairness • Will roughly every one get the same throughput? • Priority or Quality-of-Service • Can I get more BW and shorter delays than others if I am willing to pay more ?

  5. FDM and TDM Result in Longer Delay and Lower Throughput • Static partition of frequency or time may result in unused frequency or idle period when user data is dynamic and bursty. • “Queuing theory” also tells us it is better to have one queue serving M customers than N queues each serving M/N customers. • Because in the N-queue case, the customer waiting time will be N times that in the one queue case.

  6. A Simple M/M/1 Queuing System • Packet arrival rate: L • Server service rate: U • Let p = L/U • The average waiting time of a packet in the system is T = 1/ (U – L) • If FDM or TDM is used to create N channels, T’= 1/(U/N – L/N) = N*T

  7. Polling Results in High Delay and BW Overhead • A station needs to play the role of the master asking each slaves if he/she has data to send. • Problems: • Need to know the number of slaves and who they are • What if the master dies? • If the propagation delay is long and data transmission time is short, network utilization is low. • A slave who just missed his/her turn needs to wait a long time • Polling and slave’s reply messages waste bandwidth

  8. Reservation Supports Priority and QoS But Needs a Master • Time is divided into the reservation and data transmission interval. • During the reservation interval, time is further divided into slots, each for a slave. (can also be shared) • If a slave wants to send its data, it indicates its intent by marking its assigned slot. (or contending for a slot) • The master then makes a schedule for these slaves and announce the schedule to all slaves. • Problems: • What if the master dies? • Need to know how many slaves for maintaining reasonable number of slots

  9. Distributed MACs Are More Reliable • There is no station playing the master role. Every station is equal. • More reliable • Don’t need to know the number of participating stations • The number of participating stations can change dynamically over time • Stations’ clocks need not be synchronized. • A station determines to send its data solely based on its local knowledge of the network. • No control message bandwidth overhead • Easier to implement

  10. Distributed MACs Cannot Guarantee Priority, Delay Bound, or QoS • Because each station makes its decisions solely based on its local knowledge (may not reflect the true global condition of the network), decisions made may not be the best. • Because there is no coordinator (like a policeman) to regulate packet transmissions, priority, delay bound, or QoS cannot be guaranteed. • Fortunately, all of the above problems go away when the network bandwidth is large. • If a packet can be immediately sent anytime, why would we need a QoS guarantee? • Upgrading 10 Mbps to 1000 Mbps is not hard.

  11. Pure ALOHA • Users transmit their data to a base station whenever they have data to send. • Feedback from the base station indicates whether a transmitted packet is destroyed because of collision. • If the packet is destroyed, the user waits a random amount of time and sends it again. • Frames may partially overlap.

  12. Slotted ALOHA • Time is divided into slots. • Participating stations’ clocks need to precisely synchronized. • Frame transmissions can only begin at the slot boundary. • If a station wants to send a frame during a time slot, it needs to wait until the beginning of the next time slot. • Of course, frame length is fixed. • Frame collisions, if happen, are total overlaps. • No partial frame overlaps

  13. The Vulnerable Period of Pure ALOHA 2 * Frame periods

  14. Slotted ALOHA’s Vulnerable Period is ½ of that of Pure ALOHA Send attempt time Vulnerable period 1 frame period

  15. Performance of Pure and Slotted ALOHA Idle more Collisions more The probability that k frames are generated during a frame time is assumed to be the Poisson distribution: Pr[k] = (G^k * e ^(-G) )/ k! G: average attempts per frame time

  16. Carrier Sense Multiple Access (CSMA) • A station senses the carrier to see if there is a ongoing packet transmission. • If no, then it can send its packet immediately. • If yes, • then it waits until the current transmission is finished, and then send its packet immediately (1-persistent) 802.3 Ethernet • or it waits a random time to retry the attempt. (nonpersistent) 802.11 Wireless LAN • or when the channel becomes idle, it sends its packet with a probability p or defers to the next slot with a probability 1-p (p persistent, only applicable for slotted channel) • However, collision can still occur! • Due to signal propagation delay of the link • The vulnerable period is the one-way signal propagation delay of the link.

  17. Performance of Various CSMA Schemes Normally, we will keep an Ethernet’s load < 50%. High delay, but low collision rate What we care is here. Low delay, but high collision rate

  18. CSMA with Collision Detection • If a station can detect that its packet collides with other packets, it can abort the current transmission immediately to not waste link bandwidth. (Ethernet uses 1-persistent CSMA/CD.) • Not every type of network can detect collision • E.g., Wireless radio • A station needs to wait 2*(one-way link propagation delay) to detect if its packet experiences collision. • Therefore, there is a minimum packet length requirement (64 bytes) for Ethernet. • If a link’s BW is increased (10 -> 100 -> 1000 Gbps), the minimum packet length also needs to increase proportionally. • Or the maximum length of the link should decreases proportionally!

  19. Ethernet Uses Binary Exponential Backoff When a Collision Is Detected • A congestion widow (cw) is dynamically changed to reflect the current network congestion level. • Initially, cw = 1. • After n’th consecutive collision, cw is set to 2 ^ n. • Maximum allowed value is 1024. • The amount of random time that a station must wait after n’th collision is a random variable between [0, cw] * slot_time. • If a transmission is successful, cw is immediately reset to 1. • This scheme provides low delay and high throughput with different numbers of active stations.

  20. CSMA/CA for Wireless LAN • Wireless radio cannot detect collision. • The power of the transmitted packet is too strong than that of the received packet. • Therefore, the goal is to avoid collisions (CA). • A wireless LAN is composed of multiple radios, each having a fixed signal range. • Base station mode • Ad hoc mode

  21. Collision happens at B. A B C CSMA Is Not Appropriate for Wireless LAN (I) • Do carrier sense on the sending node does not prevent collisions • What really matters is whether packets will collide on the receiving node. • E.g., the hidden terminal problem. • A cannot hear C and C cannot hear A.

  22. A B C D CSMA Is Not Appropriate for Wireless LAN (II) • Do carrier sense on the sending node may unnecessarily prohibit a transmission that causes no harm to other transmissions. • E.g., the exposed terminal problem. • B and C and hear each other. • B’s signal cannot reach D and C’s signal cannot reach A. B->A and C->D are prohibited to happen at the same time. However, they can!

  23. RTS/CTS Scheme Solves The Hidden and Exposed Terminal Problems • The sender broadcasts a RTS packet before sending its data packet. • Any station receiving this RTS is within the sender’s range and should be silent for the CTS packets to come back to the sender. • The receiver returns a broadcast CTS packet to the sender. • Any station receiving this CTS is within the receiver’s range and should be silent for the following data transmission time. • The sender then can send its data packet to the receiver.

  24. RTS/CTS Scheme Solves The Hidden and Exposed Terminal Problems

  25. Performance of CSMA/CD Ethernet • Link utilization = 1 / (1 + 2* B * L * e / (c * F)) • B: link bandwidth • L: Cable length • c : speed of signal propagation • F: Frame length • e: 2.71828 Long cable, short packets, high link bandwidth are three killers for Ethernet!

More Related