Presentation on theme: "Nick Feamster CS 4251 Computer Networking II Spring 2008"— Presentation transcript:
1 Nick Feamster CS 4251 Computer Networking II Spring 2008 Medium Access ControlNick Feamster CS 4251 Computer Networking II Spring 2008
2 Some Multiple Access Protocols CSMA/CDToken passingWireless LAN Protocols
3 Random Access MAC Protocols Non-Carrier-Sense protocols: doesn’t “listen” to the channel before transmittingALOHACarrier-Sense protocols: senses the channel before transmittingCSMA (Carrier Sense Multiple Access): does not detect collision.CSMA/CD (Ethernet): A node “listens” before/while transmitting to determine whether a collision happens.
4 ALOHA Radio-based communication network Developed in 1970s at the Univ of HawaiiBasic idea: transmit when a node has data to be sent.Receiver sends ACK for dataDetect collisions by timing out for ACKRecover from collision by trying after random delayToo short: large number of collisionsToo long: underutilization
5 Ethernet MACIf line is idle (no carrier sensed) send packet immediatelyIf line is busy (carrier sensed) wait until idle and transmit packet immediatelyIf collision detectedStop sending and jam signalJam signal: make sure all other transmitters are aware of collisionWait a random time (Exponential backoff), and try again
6 QuestionsHow does sender detect collision?How long does it take?
7 Ethernet Performance Ethernets work best under light loads Utilization over 30% is considered heavyPeak throughput worse withMore hostsMore collisions needed to identify single senderSmaller packet sizesMore frequent arbitrationLonger linksCollisions take longer to observe, more wasted bandwidth
9 Carrier Sense Multiple Access (CSMA) Listen to medium and wait until it is free (no one else is talking)Wait a random backoff timeAdvantage: Simple to implementDisadvantage: Cannot recover from a collision
10 Wireless Interference Two transmitting stations interfere with each other at the receiverReceiver gets garbageABC
11 Carrier Sense Multiple Access with Collision Detection (CSMA-CD) ProcedureListen to medium and wait until it is freeStart talking, but listen to see if someone else starts talking tooIf collision, stop; start talking after a random backoff timeUsed for hub-based EthernetAdvantage: More efficient than basic CSMADisadvantage: Requires ability to detect collisionsMore difficult in wireless scenario
12 Collision Detection in Wireless No “fate sharing” of the linkHigh loss ratesVariable channel conditionsRadios are not full duplexCannot simultaneously transmit and receiveTransmit signal is stronger than received signal
13 Solution: Link-Layer Acknowledgments Absence of ACK from receiver signals packet loss to senderSender interprets packet loss as being caused by collisionProblem: Does not handle hidden terminal cases.
14 Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) Similar to CSMA but control frames are exchanged instead of data packetsRTS: request to sendCTS: clear to sendDATA: actual packetACK: acknowledgement
15 Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) Small control frames lessen the cost of collisions (when data is large)RTS + CTS provide “virtual carrier sense”protects against hidden terminalAB
16 Random Contention Access Slotted contention periodUsed by all carrier sense variantsProvides random access to the channelOperationEach node selects a random backoff numberWaits that number of slots monitoring the channelIf channel stays idle and reaches zero then transmitIf channel becomes active wait until transmission is over then start counting again
17 Virtual Carrier Sense Provided by RTS & CTS Prevents hidden terminal collisionsTypically unnecessaryRTSCTSABC
18 Physical Carrier Sense Range Carrier can be sensed at lower levels than packets can be receivedResults in larger carrier sense range than transmission rangeMore than double the range in NS simulationsLong carrier sense range helps protect from interferenceReceive RangeCarrier Sense Range
19 Hidden Terminal Revisited Virtual carrier sense no longer needed in this situationRTSCTSABCPhysical Carrier Sense
21 Physical Carrier Sense Energy detection thresholdMonitors channel during “idle” times between packets to measure the noise floorEnergy levels above the this noise floor by a threshold trigger carrier senseDSSS correlation thresholdMonitors the channel for Direct Sequence Spread Spectrum (DSSS) coded signalTriggers carrier sense if the correlation peak is above a thresholdMore sensitive than energy detection (but only works for transmissions)High BER disrupts transmission but not detection