IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station...

56
1 IEEE 802.11 MAC Wireless LANs June September 2009 . . Assoc. Prof. Anan Phonphoem, Ph.D. [email protected] Intelligent Wireless Network Group (IWING Lab) http://iwing.cpe.ku.ac.th Computer Engineering Department Kasetsart University, Bangkok, Thailand

Transcript of IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station...

Page 1: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

1

IEEE 802.11 MAC

Wireless LANsJune – September 2009

��. ��. ����� �� ���Assoc. Prof. Anan Phonphoem, Ph.D.

[email protected]

Intelligent Wireless Network Group (IWING Lab)

http://iwing.cpe.ku.ac.th

Computer Engineering Department

Kasetsart University, Bangkok, Thailand

Page 2: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

2

MAC Layer

• MAC Layer operation

• Contention & contention-free

• Priority frame transmission

• MAC frame structure

• Create MAC frame

• MAC frame Types

• MAC management, control, and data frame

MAC Layer operation

Page 3: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

3

MAC Layer Operations

• Accessing the wireless medium

• IFS

• PCF & DCF

• Joining the network

• Providing authentication and privacy

Joining the network

Page 4: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

4

Startup/Joint the network

• Turn on � discovery phase

• determine AP or other stations exist

• If exist � joint the network, get the following:

• Service Set Id (SSID)

• Timing Synchronization Function (TSF)

• Timer Value

• PHY setup parameters

• Negotiate for connection

• Authentication & Association

Page 5: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

5

Discovery Phase

• Enter scanning mode

• Passive / Active scanning mode

• Passive

• Listen for a Beacon for ChannelTimeperiod

• In Beacon � get the SSID & parameters

• Active

• Transmit a probe frame (including the SSID that wishes to join)

• Wait for a period responded by AP or other stations

Page 6: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

6

802.11 Station Authentication

Page 7: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

7

MAC Layer Operations

• Accessing the wireless medium

• Joining the network

• Providing authentication and privacyProviding authentication and privacy

Page 8: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

8

Authentication

• Open system authentication

• Default mode

• Shared key authentication

• Higher degree of security

• More rigorous frame exchange

• Need to implement WEP

Page 9: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

9

Open System Authentication

Initiating Station Authenticating Station

Authentication FrameAlgorithm = “Open”Seq. No. = 1

Authentication FrameAlgorithm = “Open”Seq. No. = 2Result = accept/Rej

Request

Accept/Reject

Page 10: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

10

Shared Key Authentication

Initiating Station Authenticating Station

Algorithm = “Shared Key”Seq. No. = 1

Algorithm = “Shared Key”Seq. No. = 2Challenge Text

Algorithm = “Shared Key”Seq. No. = 3

Enrypt Challenge Text

Algorithm = “Shared Key”Seq. No. = 4

Authen result

Page 11: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

11

Wired Equivalent Privacy

Encryption DecryptionPlain Text Plain Text

Cipher Text

Key Key

Symmetric Encryption

Page 12: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

12

WEP - Encryption

IntegrityAlgorithm

Pseudo-RandomNumber Generator

+

BitwiseXOR

Secret Key

Plain Text

Cipher Text

Integrity CheckValue (ICV)

Key SequenceIV

IV

Page 13: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

13

WEP Frame

Frame Header

IV Header

Frame BodyICV

TrailerFCS

EncryptedClear Text Clear Text

4 bytes 4 bytes

Page 14: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

14

WEP - Decryption

IntegrityAlgorithm

Pseudo-RandomNumber Generator

BitwiseXOR

Secret Key

Cipher Text

Plain Text

Integrity CheckValue (ICV)

Key Sequence

IV

Page 15: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

15

MAC Layer

• MAC Layer operation

• Contention & contention-free

• Priority frame transmission

• MAC frame structure/Types

• MAC management, control, and data frame

• Basic process revisit

MAC frame structure/Types

Page 16: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

16

MAC Frame Structure

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

MAC Header

Page 17: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

17

MAC Frame Structure

Control information being sent from station to station

Duration of waiting before the next frame (Ack/Data Period)

Different types of Addresses

Sequence and fragment numbers

PayloadCRC

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

Page 18: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

18

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

Frame Control Fields

SubType

2 Bits 2 Bits 4bits

Proto.Ver

TypeToDS

1 Bit

FromDS

1 Bit

MoreFrag

1 Bit

Retry

1 Bit

PWRMgmt

1 Bit

MoreData

1 Bit

WEP

1 Bit

Order

1 Bit

Framecontrol

Page 19: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

19

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

SubType

2 Bits 2 Bits 4bits

Proto.Ver

TypeToDS

1 Bit

FromDS

1 Bit

MoreFrag

1 Bit

Retry

1 Bit

PWRMgmt

1 Bit

MoreData

1 Bit

WEP

1 Bit

Order

1 Bit

Framecontrol

Frame Control – Type/subtype

00 Mgmt01 Control Frame10 Data Frame11 Reserved

Type

0000 Association Request0001 Association Response1000 Beacon1011 Authentication

SubType

00 Mgmt

Page 20: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

20

Probe Request Frame

http://www.cisco.com/warp/public/cc/pd/witc/ao1200ap/prodlit/wswpf_wp.htm

FC Byte#1

FC Byte#2

Page 21: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

21

Open Authentication Request

Page 22: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

22

Open Authentication Request

(snap shot by Wireshark)

Page 23: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

23

Independent Basic Service Set (IBSS)

• Stand-alone BSS

• No backbone infrastructure

• At least 2 stations

• Ad hoc Network

• Small areaBasic Service Set

Cell Boundary

Page 24: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

24

Extended Service Set (ESS)

• Extending range

• Arbitrary size

• Multiple cells interconnect

• Need Access Point and Distributed system

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

123456789101112

131415161718192021222324COLCOL

PWR

SWITCH

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

123456789101112

131415161718192021222324COLCOL

PWR

SWITCH

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

123456789101112

131415161718192021222324COLCOL

PWR

SWITCH

BSS1

BSS2

Distributed System

Page 25: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

25

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

SubType

2 Bits 2 Bits 4bits

Proto.Ver

TypeToDS

1 Bit

FromDS

1 Bit

MoreFrag

1 Bit

Retry

1 Bit

PWRMgmt

1 Bit

MoreData

1 Bit

WEP

1 Bit

Order

1 Bit

Framecontrol

Frame Control – Address Fields

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

DS: Distribution System

ToDS

FromDS

Page 26: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

26

Address Example

http://www.cisco.com/warp/public/cc/pd/witc/ao1200ap/prodlit/wswpf_wp.htm

DASA

BSSID

Page 27: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

27

Frame Control Fields

Sender gonna be 1=Sleep (power saving) mode0=Full active mode

1 = retransmit0 = regular

1=Data encrypted0=Other Tx

FrameBody

0-2312 bytes

FCS

4 bytes

Address1

Address2

Address3

Address4

SeqControl

2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes

FrameControl

Duration

/ID

SubType

2 Bits 2 Bits 4bits

Proto.Ver

TypeToDS

1 Bit

FromDS

1 Bit

MoreFrag

1 Bit

Retry

1 Bit

PWRMgmt

1 Bit

MoreData

1 Bit

WEP

1 Bit

Order

1 Bit

Framecontrol

Page 28: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

28

How to capture WLAN packets?

• To capture WLAN packet in Linux (Ubuntu)• Install Wireshark

• #sudo apt-get install wireshark

• Change your wireless NIC to “monitor” mode• Disable your WLAN card

# ifconfig wlan0 down• Change mode of the wireless NIC card

# iwconfig wlan0 mode monitor• Then up the interface

# ifconfig wlan0 up

• Now start the wireshark

• To stop capturing and start using the regular WLAN• Change mode of the wireless NIC card

# iwconfig wlan0 mode managed

Page 29: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

29

Capture packetLive Demo

Page 30: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

30

MAC Layer

• MAC Layer operation

• Contention & contention-free

• Priority frame transmission

• MAC frame structure/Types

• MAC management, control, and data frame

• Basic process revisitBasic process revisit

Page 31: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

31

IEEE 802.11 Basic process

• Authentication

• Association

• Starting an IBSS

• One station is configured to be “ initiating station’’

• Starter send beacons

Page 32: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

32

Frame Control – Address Fields

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

00: All management/control frames 01: Data Frames from AP10: Data Frames to AP11: Data Frames on a wireless bridge

ToDS

FromDS

DS: Distribution System

DA: Destination AddrSA: Source AddrTA: Transmitter AddrRA: Receiver AddrBSSID: BSS ID same as AP

Page 33: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

33

Traffic Flow

MAC filters frames based on “Addr1”

• In IBSS:

Traffic is sent directly to the destination in BSSAdd1 = MAC add of the destination station

Add2 = MAC add of the source station

Add3 = BSSID (= MAC add of the initiator of the IBSS)

• In ESS:

Outgoing traffic is sent to Access-Point in BSSAdd1 = MAC add of the Access-Point

Add2 = MAC add of the source station

Add3 = MAC add of the destination station

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

Page 34: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

34

Address Fields (To AP)

Client

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

1 2 3 4 5 6 7 8 9101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

SA/TARA (BSSID)

DA

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

Client � Server

Page 35: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

35

Address Fields (From AP)

Client

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

1 2 3 4 5 6 7 8 9101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

RA/DATA (BSSID)

SA

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

Server � Client

Page 36: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

36

Address Fields (WDS)

Client

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

1 2 3 4 5 6 7 8 9101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

N/ADASABSSID01

DA

SA

BSSID

Add 3

N/ABSSIDDA10

SATARA11

N/ASADA00

Add 4Add 2Add 1

Client � Server

ACTACT10M100M

1 2 3 4

13 14 15 16

5 6 7 8

17 18 19 20

9 10 11 12

21 22 23 24

UPLINK

1 2 3 4 5 6 7 8 9101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

SA TA

DA

RA

Wireless Bridge

Page 37: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

37

Traffic flow inside BSS

Access PointAccess Point

WaveLAN PC-CardWaveLAN PC-Card

Association table

Inter-BSS Relay

Bridge learn table

STA-1STA-1

BSS-A

Associate

STA-2STA-2

AssociatePacket for STA-2ACK Packet for STA-2

ACK

STA-1

STA-1

2

STA-2

STA-2 2

From WaveLAN Slide

Page 38: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

38

Traffic flow in ESS

STA-1STA-1 STA-2STA-2BSS-A

BSS-B

Backbone

Packet for STA-2

ACK

Packet for STA-2

ACK

Access Point - AAccess Point - A

WaveLAN PC-CardWaveLAN PC-Card

Association table

Bridge learn table

Access Point - BAccess Point - B

WaveLAN PC-CardWaveLAN PC-Card

Association table

Bridge learn table

STA-1

STA-2 1

STA-1

STA-2

STA-1

2 STA-2

2

1

From WaveLAN Slide

Page 39: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

39

Traffic flow in WDS

STA-1STA-1 STA-2STA-2BSS-A

BSS-B

Packet for STA-2

ACK

Packet for STA-2

ACK

Access PointAccess Point

WaveLAN PC-CardWaveLAN PC-Card

Association table

Bridge learn table

Access PointAccess Point

WaveLAN PC-CardWaveLAN PC-Card

Association table

Bridge learn table

STA-1

STA-2 2

STA-1

STA-2

STA-1

2 STA-2

2

2

Wireless

Backbone

WDS Relay

WDS RelayPacket for STA-2

ACK

From WaveLAN Slide

Page 40: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

40

Control Frame : RTS

RA TA FCS

2 bytes 2 bytes 6 bytes 6 bytes 4 bytes

FrameControl

Duration1RTS frame

RTS

CTS

Frame Tx

ACK

Duration1 = CTS + Data + ACK + 3SIFS

SIFS

SIFS

SIFS

St #1

St #2

NAV

Page 41: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

41

Control Frame : CTS

RA FCS

2 bytes 2 bytes 6 bytess 4 bytes

FrameControl

Duration2CTS frame

RTS

CTS

Frame Tx

ACK

Duration1 = CTS + Data + ACK + 3SIFS

SIFS

SIFS

SIFS

St #1

St #2

NAV Duration2 = Duration1 –CTS - SIFS

Page 42: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

42

Control Frame : ACK

0

RA FCS

2 bytes 2 bytes 6 bytes 4 bytes

FrameControl

Duration3ACK frame

Frac X

Ack X

Frac X+1

Ack X+1

Duration = (Frac X+1) +3SIFS +2 ACK

SIFS

SIFS

SIFS

St #1

St #2

NAV

Page 43: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

43

Management Frame: Beacon

• Announce the existence of a network

• Regular intervals

• Allow network management

• AP is responsible

Page 44: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

44

Beacon Frame

Page 45: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

45

Power Conservation

• Mobility relies on batteries

• Frequently recharge is undesirable

• How to save the battery ??• Power down the transceiver

• Power down status• Sleep/Doze/Power saving mode

• Power up status• Active/Awake mode

Page 46: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

46

Power Saving Goal

• Minimizing time spent in the Awake mode

• No scarify for network connectivity

Page 47: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

47

Power conservation in the Infrastructure Mode

• All traffic go through Access Point

• AP is always active (connected to power supply)

• (Associated) Mobile nodes send their status to AP

• AP manages timing for sending data

• AP sends data to the active node

• Periodically announce to sleep nodes if data is waiting (Keep buffering the data)

Page 48: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

48

Power consumption

1.15 W *1 Awake – Idle

0.045 W *2 Doze

1.40 W *1 Awake – Receive packets

1.65 W *1 Awake – Transmit packets

Power ConsumptionMode

*1Mark Stemm and Randy H. Katz, “Measuring and reducing energy consumption of network interfaces in hand-held devices,” IEICE Transactions on

Communications, special Issue on Mobile Computing, vol. E80-B, no. 8, pp. 1125–31, 1997

*2Havinga P.J.M., Smit G.J.M., “Energy-efficient TDMA medium access control protocol scheduling” , Asian International Mobile Computing Conference (AMOC

2000), Nov. 2000.

Page 49: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

49

Power saving

• Doze mode

• Default state

• keep radio off most of the time

• wakeup periodically to check for message

• Sleep mode

• radio in transmit-only standby mode

• radio wake up and send if necessary but cannot receive

Page 50: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

50

Sleep time

• Negotiate in the association process

• “Listen Interval” parameter (#beacon periods)

• Long interval � large buffer needed @AP

• Time up � AP discards buffered frames

Page 51: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

51

Management Frame: TIM

• Traffic Indication Map

• Low-power mode

• TIM is transmitted in the Beacon frame

• AP sends to sleeping station (data is waiting for the sleeping station)

• Each node must wake up to listen for Beacon frame (with TIM included)

Page 52: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

52

Traffic Indication Map (TIM)

• A virtual bitmap

• Each bit for each Association ID (AID)

• “Set” bit = AP has buffered unicast frames for the AID station

• Size = 2008 bits

Page 53: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

53

AP

X

Y

Frame Retrieval Process

TIM(X,Y) TIM(X,Y) TIM(X) TIM(X,Y) TIM(No)

PS-Poll

Beacon Interval

Data

PS-Poll

Data

PS-Poll

Data

X: listen interval = 3Y: listen interval =2

PS = power saving

Page 54: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

54

Other TIM

• Delivery TIM (DTIM)

• Multicast and Broadcast frames

• ATIM (Announcement TIM)

• used in IBSS Beacon Frame

• # of time units between ATIM frames

Page 55: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

55

Power Management in IBSS

ATIM Window

Beacon Interval

BeaconBeacon

Station AStation A

Station B

Transmit ATIM

Receive ACK

Transmit Frame

Receive ACK

Receive ATIM

Transmit ACK

Receive Frame

Transmit ACKSweta Sarkar, 2002

Page 56: IEEE 802.11 MAC - cpe.ku.ac.th€¦ · IEEE 802.11 MAC Wireless LANs ... 802.11 Station Authentication . 7 MAC Layer Operations ... MAC Frame Structure Control information being sent

56

More Data

• Mobile node sends a PS-Poll for a buffered frame

• AP sends back data

• Observed the “More Data” bit in Frame Control

• Sending more PS-Poll if More Data ≠ 0

FrameBody

FCSAddress

1Address

2Address

3Address

4Seq

ControlFrameControl

Duration/ID

SubType

2 Bits 2 Bits 4bits

Proto.Ver

TypeToDS

1 Bit

FromDS

1 Bit

MoreFrag

1 Bit

Retry

1 Bit

PWRMgmt

1 Bit

MoreData

1 Bit

WEP

1 Bit

Order

1 Bit

Framecontrol