340 likes | 450 Views
MAC Layer (Mis)behaviors. Christophe Augier - CSE802.11 Summer 2003. 802.11 - 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
E N D
MAC Layer (Mis)behaviors Christophe Augier - CSE802.11 Summer 2003
802.11 - 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 backoff counter = 0 Sense the medium busy free CW= min(2 CW, Cwmax) Transmit repeat >= 7 CW=CWmin
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 Sender Receiver RTS Sense the medium CTS data Transmit data ACK
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 1 2 3 4 5 6 7
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 TCP 1 2 3 4 5 6 7 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 • 802.11 – 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 > 802.11 • 802.11 stable for different values of W
Hidden terminal • CSMA: unfair, • FAMA and 802.11: fair • Thanks to CA mechanisms
Ring topology • 802.11 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 • 802.11 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 • Bact < a * Bexp , 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 a ?
Penalizing misbehaving nodes • Select a reasonably high • Use a diagnosis scheme based on • a window W • a threshold THRESH • A node is misbehaving when
Issues • misbehaving receiver • Tradeoff between • Penalizing misbehaving nodes • Ensuring the fairness of well-behaved nodes
Conclusions • 802.11 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