63
1 IEEE 802.11 MAC 2018 รศ. ดร. อนันต์ ผลเพิ่ม 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

IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

1

IEEE 802.11 MAC

2018

รศ. ดร. อนันต์ ผลเพิม่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 - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Is this the world's smallest computer?

IBM: crypto-anchor chip (March 19, 2018)

• smaller than a grain of salt

• several hundred thousands of transistors into a chip

• cost less than 10 cents

• "tamper-proof digital fingerprints”

• linked to the blockchain

• embedded into products

• tiny solar powered computers

• LED lights to communicate with a network2https://www.techrepublic.com/article/is-this-the-worlds-smallest-computer-ibm-chip-is-no-bigger-than-a-grain-of-salt/

Page 3: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

3

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 4: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

4

MAC Layer Operations

• Accessing the wireless medium

• IFS

• PCF & DCF

• Joining the network

• Providing authentication and privacy

Joining the network

Page 5: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

5

MAC Layer Operations

• Accessing the wireless medium

• Joining the network

• Providing authentication and privacyProviding authentication and privacy

Page 6: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

6

Authentication

• Open system authentication

•Default mode

• Shared key authentication

•Higher degree of security

•More rigorous frame exchange

•WEP, WPA

http://www.patentlyapple.com/patently-apple/2009/11/apple-reveals-new-iphone-security-patents.html

Page 7: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

7

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 8: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

8

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 9: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

9

Wired Equivalent Privacy

Encryption DecryptionPlain Text Plain Text

Cipher Text

Key Key

Symmetric Encryption

Page 10: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

10

WEP - Encryption

IntegrityAlgorithm

Pseudo-RandomNumber Generator

+

BitwiseXOR

Secret Key

Plain Text

Cipher Text

Integrity CheckValue (ICV)

Key SequenceIV

IV

Page 11: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

11

WEP Frame

Frame Header

IV Header

Frame BodyICV

TrailerFCS

EncryptedClear Text Clear Text

4 bytes 4 bytes

Page 12: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

12

WEP - Decryption

IntegrityAlgorithm

Pseudo-RandomNumber Generator

BitwiseXOR

Secret Key

Cipher Text

Plain Text

Integrity CheckValue (ICV)

Key Sequence

IV

Page 13: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

13

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 14: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

14

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 15: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

15

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 16: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

16

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 17: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

17

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 Response0100 Probe Request1000 Beacon1011 Authentication

SubType

00 Mgmt

Page 18: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

18

Probe Request Frame

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

FC Byte#1

FC Byte#2

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

• Sent on every channel the client supports• Try to find all access points in range

• match SSID

• client-requested data rates

Page 19: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

19

Probe Request Frame

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

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 20: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

20

Open Authentication Request Frame

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

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 21: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

21

Open Authentication Request Frame

(snap shot by Wireshark)

Page 22: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

22

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 23: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

23

Extended Service Set (ESS)

• Extending range

• Arbitrary size

• Multiple cells interconnect

• Need Access Point and Distributed system ACTACT

10M100M1 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 9 101112

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

1 2 3 4 5 6 7 8 9 101112

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

1 2 3 4 5 6 7 8 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

BSS1

BSS2

Distributed System

Page 24: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

24

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

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SADS: Distribution System

ToDS

FromDS

Page 25: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

25

Address Example

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

DASA

BSSID

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 26: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

26

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 27: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

27

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 28: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Wireless Diagnostics on macOS High Sierra 10.13.3

28

Page 29: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Wireless Diagnostics: Info

29

Page 30: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Wireless Diagnostics: scan

30

Page 31: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Wireless Diagnostics: Performance

31

Page 32: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

Wireless Diagnostics: sniffer

32

Page 33: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

wireshark

33

Page 34: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

34

Capture packetLive Demo

Page 35: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

35

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 36: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

36

IEEE 802.11 Basic process

• Authentication

• Association

• Starting an IBSS

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

• Starter sends beacons

Page 37: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

37

Frame Control – Address Fields

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SA

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 Addr BSSID: BSS ID same as AP

Page 38: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

38

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

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SA

Page 39: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

39

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 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

SA/TARA (BSSID)

DA

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SA

Client Server

Page 40: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

40

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 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

RA/DATA (BSSID)

SA

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SA

Client Server

Page 41: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

41

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 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

Server

DS

Add 1 Add 2 Add 3 Add 4

0 0 DA SA BSSID N/A

0 1 DA BSSID SA N/A

1 0 BSSID SA DA N/A

1 1 RA TA DA SA

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 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

SA TA

DA

RA

Wireless Bridge

Page 42: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

42

Traffic flow inside BSS

Access Point

WaveLAN PC-Card

Association table

Inter-BSS

Relay

Bridge learn

table

STA-1

BSS-A

Associate

STA-2

AssociatePacket for STA-2ACK Packet for STA-2

ACK

STA-1

STA-1

2

STA-2

STA-2 2

From WaveLAN Slide

Page 43: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

43

Traffic flow in ESS

STA-1STA-2

BSS-A

BSS-B

Packet for STA-2

ACK

Packet for STA-2

ACK

Access Point - A

WaveLAN PC-Card

Association table

Bridge learn

table

Access Point - B

WaveLAN PC-Card

Association table

Bridge learn

table

STA-1

STA-2 1

STA-1

STA-2

STA-1

2STA-2

2

1

From WaveLAN Slide

Page 44: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

44

Traffic flow in WDS

STA-1STA-2

BSS-A

BSS-B

Packet for STA-2

ACK

Packet for STA-2

ACK

Access Point

WaveLAN PC-Card

Association table

Bridge learn

table

Access Point

WaveLAN PC-Card

Association table

Bridge learn

table

STA-1

STA-2 2

STA-1

STA-2

STA-1

2STA-2

2

2

WDS

Relay

WDS

RelayPacket for STA-2

ACK

From WaveLAN Slide

Page 45: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

802.11 Frame

45

Page 46: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

46

Data Frame

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 47: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

RTS

CTS

Frame Tx

ACK

SIFS

SIFS

SIFS

St #1

St #2

47

Control Frame : RTS

RA TA FCS

2 bytes 2 bytes 6 bytes 6 bytes 4 bytes

FrameControl

Duration1RTS frame

Duration1 = CTS + Data + ACK + 3SIFSNAV

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 9 101112

131415161718192021222324COLCOL

PWR

SWITCH

AP

SA/TARA (BSSID)

Page 48: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

RTS

CTS

Frame Tx

ACK

SIFS

SIFS

SIFS

St #1

St #2

48

Control Frame : CTS

RA FCS

2 bytes 2 bytes 6 bytess 4 bytes

FrameControl

Duration2CTS frame

Duration1 = CTS + Data + ACK + 3SIFS

NAV Duration2 = Duration1 - CTS - SIFS

Page 49: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

49

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 50: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

50

Management Frame: Beacon

• Announce the existence of a network

• Regular intervals

• Allow network management

• AP is responsible

Page 51: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

51

Beacon Frame

Page 52: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

52

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 53: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

53

Power Saving Goal

• Minimizing time spent in the Awake mode

• No scarify for network connectivity

Page 54: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

54

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 55: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

55

Power consumption

Mode Power Consumption

Awake – Transmit packets 1.65 W *1

Awake – Receive packets 1.40 W *1

Awake – Idle 1.15 W *1

Doze 0.045 W *2

*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 56: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

56

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 57: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

57

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 58: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

58

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 59: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

59

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 = 2,008 bits

Page 60: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

60

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 61: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

61

Other TIM

• Delivery TIM (DTIM)

•Multicast and Broadcast frames

• ATIM (Announcement TIM)

• used in IBSS Beacon Frame

•# of time units between ATIM frames

Page 62: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

62

Power Management in IBSS

ATIM Window

Beacon Interval

Beacon

Station A

Station B

Transmit ATIM

Receive ACK

Transmit Frame

Receive ACK

Receive ATIM

Transmit ACK

Receive Frame

Transmit ACKSweta Sarkar, 2002

Page 63: IEEE 802.11 MAC - Kasetsart University · 2018-03-23 · IEEE 802.11 MAC 2018 รศ. ดร. ... Add3 = BSSID (= MAC add of the initiator of the IBSS)

63

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