mac layer (mis)behaviors
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/1.jpg)
MAC Layer (Mis)behaviors
Christophe Augier - CSE802.11 Summer 2003
![Page 2: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/2.jpg)
802.11 - MAC Based on CSMA like Ethernet Two different access methods
DCF – Distributed Coordination Function
PCF – Point Coordination Function
![Page 3: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/3.jpg)
MAC – CSMA CSMA – Carrier Sense Multiple
Access
+ very effective under low loads
- possible collisions
![Page 4: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/4.jpg)
CSMA/CACA: Collision Avoidance
Random back-off value
RTS / CTS
ACK scheme
![Page 5: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/5.jpg)
Questions How MAC behaves with widely
used protocols?
Is the throughput fairly shared?
How MAC handles misbehaving nodes?
![Page 6: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/6.jpg)
How… - Sender
Sense the medium
busy free
Transmit
CW=CWmin
repeat >= 7
CW= min(2 CW, Cwmax)
backoff counter = 0
![Page 7: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/7.jpg)
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
![Page 8: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/8.jpg)
How… - Receiver
Check CRC
corruptedok
Send ACK
CRC: Cyclic Redundancy Check
![Page 9: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/9.jpg)
How… - bothSender Receiver
RTS
CTS
data
data
ACK
Sense the medium
Transmit
![Page 10: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/10.jpg)
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
![Page 11: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/11.jpg)
First test 1 sender, 1 receiver
2 3 4 51 6 7
TCP
![Page 12: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/12.jpg)
First test results
Instability in the TCP
Connection lost
![Page 13: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/13.jpg)
First test explication One node fails to reach its adjacent
node drops packets reports route failure
![Page 14: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/14.jpg)
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
![Page 15: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/15.jpg)
Second test 2 TCP sessions started with a delay
of 20s
2 3 4 51 6 7
TCP TCP
interferences
![Page 16: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/16.jpg)
Second test results The first session is forced down
![Page 17: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/17.jpg)
Second test results causes:
Collisions between node 2 TCP packets and node 5 RTS packets
Route failure TCP session timeout
solutions: nullReducing the TCP window does not work
![Page 18: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/18.jpg)
First conclusion
MAC is unchanged, the layer above MAC are changed to recover losses Link layer Transport layer
Change MAC - radical
![Page 19: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/19.jpg)
MACs comparison Experiments to compare:
CSMA FAMA – RTS/CTS
802.11 – CSMA/CA, RTS/CTS + ACK
Under different multihop environments
![Page 20: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/20.jpg)
Variable number of hops Var. TCP window sizes Var. number of hops
![Page 21: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/21.jpg)
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
![Page 22: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/22.jpg)
Hidden terminal CSMA: unfair,
FAMA and 802.11: fair Thanks to CA mechanisms
![Page 23: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/23.jpg)
Ring topology 802.11 not so fair compared to FAMA Increasing the DIFS period achieve
fairness
![Page 24: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/24.jpg)
9x9 grid Good Throughput But capture
![Page 25: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/25.jpg)
9x9 grid with mobility Evidence of captures effects But far better than CSMA and
FAMA
![Page 26: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/26.jpg)
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
![Page 27: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/27.jpg)
MAC layer misbehavior
Problem: No detection of misbehaviors A selfish node can get a better
throughput than well-behaved nodes
![Page 28: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/28.jpg)
Solutions
Identify and punish misbehaving nodes: Avoid such nodes in routing Protocol penalizing misbehavior Game-theoretic techniques
![Page 29: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/29.jpg)
Proposed solution Receiver selects the sender next
backoff value The sender have to use this assigned
backoff value
The receiver then can detect misbehavior
![Page 30: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/30.jpg)
Detecting misbehavior Bact < * 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 ?
![Page 31: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/31.jpg)
Penalizing misbehaving nodes Select reasonably high Use a diagnosis scheme based on
a window W a threshold THRESH A node is misbehaving when
THRESHWpacket
actexp BB
![Page 32: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/32.jpg)
Results
![Page 33: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/33.jpg)
Issues misbehaving receiver Tradeoff between
Penalizing misbehaving nodes Ensuring the fairness of well-behaved
nodes
![Page 34: MAC Layer (Mis)behaviors](https://reader036.vdocuments.us/reader036/viewer/2022062323/568153db550346895dc1d2a0/html5/thumbnails/34.jpg)
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