1 / 36

CS 453 Computer Networks

CS 453 Computer Networks. Lecture 13 Medium Access Control Sublayer. MAC Sublayer. So, lets add another complication… So far we have discussed protocols with the assumption that the lower physical layer medium is wire-like – But it a different sense than serial throughput

bess
Télécharger la présentation

CS 453 Computer Networks

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.

E N D

Presentation Transcript


  1. CS 453Computer Networks Lecture 13 Medium Access Control Sublayer

  2. MAC Sublayer So, lets add another complication… So far we have discussed protocols with the assumption that the lower physical layer medium is wire-like – But it a different sense than serial throughput That is, it is point to point , and… It is single channel (this is not completely true) We did not need to consider how the communicating stations (ends) get access to the medium

  3. MAC Sublayer But media are not point-to-point We call these Broadcast media These include – Radio Cable – I’ll explain later Satellite Ethernet These have a diffused, wide area footprint And….

  4. MAC Sublayer There is simultaneous potential for access by multiple stations – possibly many stations Not only simultaneous potential access to the medium, but to a single channel So, the problem is – How to grant that access And enable communications

  5. MAC Sublayer We have already looked at a few ways grant or allocate access to single channels- Frequency Division Multiplexing (FDM) Divide the frequency bandwidth of a channel into multiple smaller channels, and… Allocate the smaller channels as if they were point-to-point channels

  6. MAC Sublayer FDM Simple and, in principle, very efficient However, with bursty or irregular data traffic… Some channels may be heavily used… While other channel little or not used at all Unused bandwidth can not usually be reallocated, so Very inefficient is this scenario

  7. MAC Sublayer Time Division Multiplexing (TDM) Instead of dividing up the frequency bandwidth of the channel… We can divide up time on the channel, and … Allocate slices of time to alternative pairs of communicating stations TDM has similar problems to FDM With Statistical Time Division Multiplexing (STDM) we can achieve some improvement in efficiency

  8. MAC Sublayer With broadcast media like radio, wireless, satellite and cable, we have a new set of problems… We can’t use static allocations schemes like FDM and TDM N stations potentially accessing the medium N might be unknown N might be variable We might not know the location of the stations

  9. MAC Sublayer Broadcast media We have a single communication media Potentially many stations competing for access and use of the media Multiple stations trying to access the medium at the same time is know as contention We need a way to resolve contention if any communications is going to get done And we need to do this dynamically

  10. MAC Sublayer Before going on – a few assumptions Single channel – our problem (for now) concerns the allocation of a single communications channel Collisions – any time two or more stations try to or do transmit at the same time, all transmitted frames are mangled and consider destroyed Collision detection – all stations can detect collisions

  11. MAC Sublayer A side note – To a large extent the broadcast medium issues discussed here concern local area network (LAN) and metropolitan area networks (MAN) Wide Area Networks (WAN) typically use point-to-point links Satellites are notable exception to the previous statement… … and the broadcast medium allocation issues apply

  12. MAC Sublayer Multiple Access Protocols There are many Multiple Access Protocols Date back to the early 1970s Some have come and gone Some have come and gone and come back again

  13. MAC Sublayer Aloha Alohanet – work in 1970s at University of Hawaii By Abramson and colleagues To establish communications links among Hawaiian islands Used radio Radio is a broadcast medium They had a multistation contention problem Developed an access protocol called (you guessed it) Aloha

  14. MAC Sublayer Aloha Frames are fixed size Any station can transmit a frame anytime it wants Free-for-all No waiting No clock Since the transmission is broadcast the sender can listen to what it sent If there was another overlapping transmission by another station (collision)… Each sending/listening station would here a garbled version of what it sent… And declare its transmission to be in error... …wait a random period and.. retransmit

  15. MAC Sublayer Aloha So how well does it work, or how much data gets through Frame time is the amount of time the channel is used to transmit one frame If two frames are transmitted in the same frame time there is a collision

  16. MAC Sublayer Aloha N = mean number of frames transmitted per frame time (N is a Poisson distribution) If N>1 nearly every frame has a collision 0<N<1 for Aloha to work with any efficiency For every frame that has a collision that frame is retransmitted G = N (number of frames transmitted per frame time) + number of retransmissions due to collisions

  17. MAC Sublayer Aloha S (throughput) = GP where P = Probability of frame avoiding a collision S = Ge-2G

  18. MAC Sublayer Aloha So, S maxs out with G = 0.5 -- S = 1/2e or about 18% efficiency With G> 0.5 collision retries begin to swamp the network

  19. MAC Sublayer Slotted Aloha Remember – Aloha was a free-for-all Any station any time Slotted Aloha – Create time slots Any station can transmit But only at the start of a time slot If a station does not have anything to transmit at the start of the time slot, … It must wait until the next time slot So now, all collisions are complete collisions… No overlap collisions Synchronization? - Aloha – broadcast a clock tick

  20. MAC Sublayer Slotted Aloha S (throughput) = GP where P = Probability of frame avoiding a collision now… S = Ge-G

  21. MAC Sublayer Slotted Aloha With Slotted Aloha, S maxs out with G = 1 S = 1/e or about 37% efficiency With G> 1 collision retries begin to swamp the network,… … collisions increase exponentially

  22. MAC Sublayer Carrier Sense Multiple Access With Slotted Aloha the best we can do for throughput is 1/e What if each station could, before transmitting a frame, listen to see if the channel is idle or busy… …and only if idle transmit a frame This is Carrier Sense Multiple Access or CSMA

  23. MAC Sublayer Persistent Carrier Sense Multiple Access A greedy protocol When a station wants to transmit it listen to the channel. If busy it continues to listen until the channel is idle… Sort of like eaves-dropping on a party-line Then transmits its frame

  24. MAC Sublayer Persistent Carrier Sense Multiple Access Can still have collisions Two stations listen and find the channel busy Both continue listening and … when the transmission finishes (hangs up).. Both immediately start transmitting their frame

  25. MAC Sublayer Persistent Carrier Sense Multiple Access Propagation delay problems Station 1 listens and finds the channel idle But it takes a millisecond or so to start transmission In the millisecond, Station 2 listens and… Find the channel seemingly idle because of the propagation delay in Station 1… So Station 2 proceed to transmit, even though Station 1 has already started… =Collision

  26. MAC Sublayer Non-persistent Carrier Sense Multiple Access In non-persistent CSMA Stations listen – If they find the channel busy, They don’t continue to listen,… but backoff and wait a random wait-time… then listen again Nearly eliminates collisions Still can have some --- how?

  27. MAC Sublayer Peak efficiency Aloha ~17% Slotted Aloha ~37% 1-persistent CSMA ~55% Non-persistent CSMA ~90%

  28. MAC Sublayer CSMA-CD CSMA with Carrier Detection Up to now the protocols could only tell there was a collision after the transmission completed So the mangle frames arrive Are determined to be irrepairable and Trashed… But…

  29. MAC Sublayer CSMA-CD What if tranmitting stations could sense a collision as soon as it occurs? This is CSMA-CD As soon as a collision is detected both senders terminate the transmission… Wait a random wait-period.. And reinitiate the carrier-sense-tranmit algorithm..

  30. MAC Sublayer CSMA/CD Collision Detection does not reduce the number of collisions.. But it does stop transmissions as soon as the collision is detected… This frees up bandwidth that would have been waste by continuing to transmit mangled frames

  31. MAC Sublayer CSMA/CD CSMA/CD is commonly used as MAC sublayer protocol on LANs CSMA/CD is the basis for Ethernet

  32. MAC Sublayer Collision Free Protocols It is possible to have protocols that avoid collisions altogether… At the expense, usual of some overhead

  33. MAC Sublayer Collision Free Protocols Reservation Protocols In short a station needing to send a frame makes a reservation to to do so Bit-map scheme There are N stations A contention frame is broadcast, The contention frame has a bit position for each of the N stations Each station can transmit in order, but only if it has made a reservation It does this by setting its bit in the contention slot to 1 Then if its bit is 1, it transmits its frame after any (if any) previous stations that made a reservation

  34. MAC Sublayer Collision Free Protocols Reservation Protocols Frame 1 Frame 4 Frame 5

  35. MAC Sublayer Collision Free Protocols Token Passing A small (low overhead) token is passed from station to station Can be physically or numerically a ring A station can transmit a frame on the medium… When and only when, it has the token If the station has nothing to transmit it passes the token to the next station If the station has something to transmit, it transmits its frame of data, then passes its frame to the next station

More Related