MAC Layer (Mis)behaviors Christophe Augier - CSE Summer 2003
MAC Based on CSMA like Ethernet Two different access methods DCF – Distributed Coordination Function PCF – Point Coordination Function
MAC – CSMA CSMA – Carrier Sense Multiple Access + very effective under low loads - possible collisions
CSMA/CA CA: Collision Avoidance Random back-off value RTS / CTS ACK scheme
Questions How MAC behaves with widely used protocols? Is the throughput fairly shared? How MAC handles misbehaving nodes?
How… - Sender Sense the medium busy free Transmit CW=CWmin repeat >= 7 CW= min(2 CW, C w max ) backoff counter = 0
Backoff value Selected from range [0, CW] If medium is free for a time equal to DIFS – DCF InterFrame Space, backoff is counted down If medium is busy, suspend backoff countdown
How… - Receiver Check CRC corrupted ok Send ACK CRC: Cyclic Redundancy Check
How… - both SenderReceiver RTS CTS data ACK Sense the medium Transmit
MAC + TCP Why TCP? Widely used – prevalent protocol used in Internet Adaptability – network conditions, congestion control Topology: ad hoc net, string of 7 nodes Assumptions: No traffic – to get stable network and TCP throughput Infinite flow – always data to send out
First test 1 sender, 1 receiver TCP
First test results Instability in the TCP Connection lost
First test explication One node fails to reach its adjacent node drops packets reports route failure
First test solution causes: packet size – too big number of packets sent back-to-back – too many One node was capturing the medium solution: decrease TCP window i.e. number of packets sent back-to-back
Second test 2 TCP sessions started with a delay of 20s TCP interferences
Second test results The first session is forced down
Second test results causes: Collisions between node 2 TCP packets and node 5 RTS packets Route failure TCP session timeout solutions: null Reducing the TCP window does not work
First conclusion MAC is unchanged, the layer above MAC are changed to recover losses Link layer Transport layer Change MAC - radical
MACs comparison Experiments to compare: CSMA FAMA – RTS/CTS – CSMA/CA, RTS/CTS + ACK Under different multihop environments
Variable number of hops Var. TCP window sizes Var. number of hops
Variable number of hops Throughput is inversely proportional to the hop distance Max throughput with TCP Win= 1 Throughput: CSMA > FAMA > stable for different values of W
Hidden terminal CSMA: unfair, FAMA and : fair Thanks to CA mechanisms
Ring topology not so fair compared to FAMA Increasing the DIFS period achieve fairness
9x9 grid Good Throughput But capture
9x9 grid with mobility Evidence of captures effects But far better than CSMA and FAMA
Conclusions is promising Good combination of throughput and fairness Good behavior with mobility Need work: To make TCP and MAC work well together MAC layer timers - fairness
MAC layer misbehavior Problem: No detection of misbehaviors A selfish node can get a better throughput than well-behaved nodes
Solutions Identify and punish misbehaving nodes: Avoid such nodes in routing Protocol penalizing misbehavior Game-theoretic techniques
Proposed solution Receiver selects the sender next backoff value The sender have to use this assigned backoff value The receiver then can detect misbehavior
Detecting misbehavior B act < * B exp, 0 < a < 1 When a node is misbehaving? Deviation may come from: Sender senses the medium as free, the receiver does not. How to choose ?
Penalizing misbehaving nodes Select reasonably high Use a diagnosis scheme based on a window W a threshold THRESH A node is misbehaving when
Results
Issues misbehaving receiver Tradeoff between Penalizing misbehaving nodes Ensuring the fairness of well-behaved nodes
Conclusions is promising (compared to previous MAC) Good combination of throughput and fairness Good behavior with mobility Need work: To make TCP and MAC work well together Recover losses New protocol MAC layer timers – fairness, avoid capture effects Mobility Safe against misbehaving nodes - fairness