Networking Assignment

profilesajhal-1
Assignment1.pdf

802.11 THROUGHPUT comp40660 Assignment 1, February 2020

This assignment is worth 18% of the overall grade

Motivation

• Build a simple model of 802.11 frame exchange for TCP

and UDP, using OFDM of 802.11a and 802.11g

• The model will approximate the actual throughput of the

network

• RTS/CTS mechanism is enabled

• No contention

• Demonstration of the calculation for 802.11a – UDP case;

work on TCP case in lab.

• Assignment will be to modify for the .11g/n/ac/ax case for

both TCP and UDP.

802.11 Model

• Basic transactional model – 2 different transaction types, namely

UDP and TCP.

• Any 802.11 transmission of data (from higher layer) requires an

acknowledgement (ACK) by the .11 MAC.

• Each TCP / UDP packet is encapsulated in a single 802.11 frame.

Transport

Network

Data Link

Physical

Transport

Network

Data Link

PhysicalBits

Frame

Packet

Segment

802.11 Frame Exchange

UDP Case

• No guarantee of delivery

• Suitable for real-time applications such as VoIP, VoD

• UDP data encapsulated into 802.11 frame and

transmitted. Receiving station transmits 802.11 ACK.

Server Client

UDP

802.11 Frame Exchange

TCP Case

• Reliable delivery service guaranteeing that all bytes are

received and in correct order through TCP ACKs

• How is this different from the UDP case?

TCP

ACK

Server Client

Data Transmission

• 802.11 uses different inter-frame spaces: • SIFS (Short Interframe Space)

• High-priority transmissions can begin once SIFS has elapsed

• ACK, RTS, CTS

• DIFS (DCF Interframe Space)

• Minimum idle time for contention-based services

• Stations can have access to the medium if it has been free for

a period longer than DIFS

Packet Headers

• 1500 bytes packet (TCP/UDP) is encapsulated:

• MAC header = 34 bytes

• SNAP LLC header = 8 bytes

• 3 bytes LLC (logical link control) header

• 5 bytes SNAP (sub-network access protocol) header

=> Total size = 1542 bytes

802.11a

• Amendment to the IEEE 802.11 specification

• 1999

• 5Ghz band

• Maximum data rate: 54 Mbps

• OFDM (Orthogonal Frequency Division Multiplexing)

• Available data rates: 54, 48, 36, 24, 18, 12, 9, 6 Mbps

802.11g

• 2003

• 2.4Ghz (same as 802.11b)

• Maximum data rate: 54 Mbps

• OFDM (copied from 802.11a)

• Available data rates: 54, 48, 36, 24, 18, 12, 9, 6 Mbps

802.11n

• 2009

• Both 2.4Ghz and 5Ghz

• Maximum data rate (20 MHz, 1 Spatial Streams): 72.2 Mbps

• Maximum optional data rate (40 MHz, 4 Spatial Streams):

600 Mbps

• OFDM with HT (High Throughput)

• Available data rates: 72.2, 65, 57.8, 43.3, 28.9, 21.7, 14.4,

7.2 Mbps

802.11ac

• 2013

• 5GHz band

• Maximum data rate (20MHz, 1 Spatial Stream): 96.3 Mbps

• Maximum wave 1 optional data rate (80MHz, 3 Spatial

Streams): 1300 Mbps

• Maximum wave 2 optional data rate (160MHz, 8 Spatial

Streams): 6933.6 Mbps

• OFDM with VHT (Very High Throughput)

• Available data rates: 96.3, 86.7, 72.2, 65, 57.8, 43.3, 28.9,

21.7, 14.4, 7.2 Mbps

802.11ax

• 2019

• Both 5Ghz and 2.4GHz band

• Maximum data rate (20MHz, 1 Spatial Stream): 143.4 Mbps

• Maximum data rate (160MHz, 8 Spatial Streams): 9607.8

Mbps

• Introduce Modulation and Coding Sets (MCS) with 1024-

QAM

• Available data rates: 143.4, 129.0, 114.7, 103.2, 86.0, 77.4,

68.8, 51.6, 34.4, 25.8, 17.2, 8.6 Mbps

Example Calculation - UDP

• Case: 802.11a @ 54Mbps

• A single data frame exchange: 1) Wait 1 DIFS

2) Send RTS

3) Wait 1 SIFS

4) Send CTS

5) Wait 1 SIFS

6) Transmit data

7) Wait 1 SIFS to send ACK

8) Send ACK

SIFS 16 μs

Slot Time 9 μs

DIFS=(2*Slot Time) + SIFS 34 μs

Example Calculation - UDP (cont.)

• Data is divided into symbols before transmission.

• Different amount of bits per symbol for each data rate

• See later slides of this set

• @54Mbps: 1 symbol encodes 216 bits

• Each symbol takes 4μs to transmit (11a/g only)

• Using OFDM each frame has 6 bits (tail) appended

1542*8+6 = 12,342 bits

12,342 bits / 216 bits = 58 symbols

=>232 μs to transmit the data frame

• RTS is a 20 byte long Control Frame and CTS is a 14 byte long Control Frame  (20*8+6)/216 = 1 symbol and (14*8 + 6)/216 = 1 symbol for RTS and CTS respectively  4 μs transmission for each frame.

Example Calculation – UDP (cont.)

• 802.11 ACK: 1 symbol (only 14 bytes) => 4 μs

• 20μs (Preamble) sync header is transmitted before each frame

DIFS + Preamble + RTS + SIFS + Preamble + CTS + SIFS + Preamble +

Data + SIFS + Preamble + ACK =

34μs+ 20μs + 4μs +16μs + 20μs + 4μs + 16μs + 20μs + 232μs + 16μs +

20μs + 4μs = 406μs

So: time to send 1500 bytes (including IP and UDP headers) : 406 μs

Q: What is the throughput [Mbps] ?

In the practical: Do the same for TCP.

Assignment • Calculate the actual throughput for 802.11a/g/n/ac/ax and for all

available data rates, for both UDP and TCP.

• Your program should accept 3 arguments:

• Protocol (UDP/TCP)

• Standard (802.11a, 802.11g, 802.11n, 802.11ac_w1, 802.11ac_w2,

802.11ax)

• Available data rate for each standard (e.g. 802.11a/g: 54, 48, 36,…)

• Note: For standard .11n/ac, consider SDur = 3.6𝜇s only

• Your program must return for each scenario:

• The actual throughput [Mbps] in the normal case (20MHz and 1SS) AND the

best case:

• 40MHz/4SS for .11n

• 80MHz/3SS for .11ac_w1 ; 160MHz/8SS for .11ac_w2

• 160MHz/8SS for .11ax

• The amount of time needed to transfer 10 GB of data.

Assignment (cont.)

• Languages: C/C++, Java, Python

• Code must compile & run with no errors and be appropriately

commented throughout.

• A “Readme” file is required – detailing usage, and explaining:

• Why there is a difference between the actual throughput

and the advertised data rate.

• 802.11 performance improves after each release. Briefly

discuss the trade-offs involved in such improvements.

Assignment (cont.)

• Submission: Friday 28th February 2020, 23:59 sharp!!

• .zip file with source code + readme file

• Submit .zip through comp40660 page on CS Moodle

• This is an individual assignment: no group submissions

will be accepted and there should be no collaboration on

the assignment.

• Anti-plagiarism tools and techniques will be used to check

your submission.

Notes

• The differences between .11a and .11g that you have to take

into account:

• For 802.11g, SIFS = 10 μs

• Signal Extension appended to every 802.11g frame = 6 μs

• All other parameters, headers, tails etc. remain the same

as .11a

Notes (cont.)

• Specificities of .11n and .11ac/ax that you have to take into account:

• 11n/ac MAC header = 40 bytes

• 802.11n/ac/ax SIFS = 16 μs

• Symbol duration of 802.11ax: 13.6μs

• Symbol duration of 802.11n/ac: 3.6μs (short symbol duration)

• The preamble in .11n is 46 μs (using 4 Spatial Streams)

• The preamble in .11ac_w1 is 56.8 μs (using 3 Spatial Streams)

• The preamble in .11ac_w2/ax is 92.8 μs (using 8 Spatial Streams)

• All other parameters, headers, tails etc. remain the same as .11a/g

Notes (cont.)

• 802.11n with 600 Mbps rate • Maximum 4 Spatial Streams

• Maximum 40 MHz channels

• 802.11ac wave1 (802.11ac_w1) with 1300 Mbps rate • Maximum 3 Spatial Streams

• Maximum 80 MHz channels

• 802.11ac wave2 (802.11ac_w2) with 6933.6 Mbps rate • Maximum 8 Spatial Streams

• Maximum 160 MHz channels

• 802.11ax with 9608 Mbps rate • Maximum 8 Spatial Streams

• Maximum 160 MHz channels

802.11a/g Encoding Block Sizes

• Symbol duration(SDur)

• Bits per symbol(NBits)

• Coding Rate (CRate)

• Number of sub-channels (NChan)

Data Rate = (1/SDur)*(NBits*CRate)*NChan

Data bits per OFDM symbol = NBits * CRate * NChan

Modulation NBits CRate NChan SDur (micro sec) Data Rate (Mbps)

BPSK 1 1/2 48 4 6

BPSK 1 3/4 48 4 9

QPSK 2 1/2 48 4 12

QPSK 2 3/4 48 4 18

16-QAM 4 1/2 48 4 24

16-QAM 4 3/4 48 4 36

64-QAM 6 2/3 48 4 48

64-QAM 6 3/4 48 4 54

11a/11g Data Rates

802.11n/ac Encoding Block Sizes

Modulation NBits CRate NChan Data Rate (Mbps)

SDur=4us Data Rate (Mbps)

SDur=3.6us

BPSK 1 1/2 52 6.5 7.2

QPSK 2 1/2 52 13 14.4

QPSK 2 3/4 52 19.5 21.7

16-QAM 4 1/2 52 26 28.9

16-QAM 4 3/4 52 39 43.3

64-QAM 6 2/3 52 52 57.8

64-QAM 6 3/4 52 58.5 65

64-QAM 6 5/6 52 65 72.2

256-QAM

(11ac) 8 3/4 52 78 86.7

256-QAM

(11ac) 8 5/6 52 86.7

96.3

11n and 11ac Data Rates (20 MHz, 1 SS)

802.11n/ac supports both Symbol duration 4𝜇s (for back compatibility with 802.11a/g) and 3.6𝜇s (short symbol duration) – you should ONLY consider SDur = 3.6𝜇s

802.11n/ac Maximum Data Rates

• Number of Spatial Streams (Nss): matching number of antenna pairs at the

sender and the receiver ends

Channel Width NBits CRate NChan Data Rate (Mbps)

SDur=3.6us (Nss=1) 11n Max Rate

(Nss=4)

20 Mhz 6 5/6 52 72.2 288.8

40 Mhz 6 5/6 108 150 600

11n Max Data Rates

Channel Width NBits CRate NChan Data Rate (Mbps)

SDur=3.6us (Nss=1) 11ac Max Rate

(Nss=8)

20 Mhz 8 5/6 52 96.3 770.4

40 Mhz 8 5/6 108 200 1600

80 Mhz 8 5/6 234 433.3 3466.4

160 Mhz 8 5/6 468 866.7 6933.6

11ac Max Data Rates

802.11ax Maximum Data rates

• 01 Spatial Stream (Nss):

20MHz

Modulation NBits CRate NChan Symbol

duration (us)

Data Rate

(Mbps)

BPSK 1 1/2 234 13.6 8.6

QPSK 2 1/2 234 13.6 17.2

QPSK 2 3/4 234 13.6 25.8

16-QAM 4 1/2 234 13.6 34.4

16-QAM 4 3/4 234 13.6 51.6

64-QAM 6 2/3 234 13.6 68.8 64-QAM 6 3/4 234 13.6 77.4 64-QAM 6 5/6 234 13.6 86.0

256-QAM 8 3/4 234 13.6 103.2

256-QAM 8 5/6 234 13.6 114.7

1024-QAM 10 3/4 234 13.6 129

1024-QAM 10 5/6 234 13.6 143.4

802.11ax Maximum Data rates

• 08 Spatial Streams (Nss):

160MHz

Modulation NBits CRate NChan Symbol

duration (us)

Data Rate

(Mbps)

BPSK 1 1/2 1960 13.6 576.5

QPSK 2 1/2 1960 13.6 1152.9

QPSK 2 3/4 1960 13.6 1729.4

16-QAM 4 1/2 1960 13.6 2305.9

16-QAM 4 3/4 1960 13.6 3458.8

64-QAM 6 2/3 1960 13.6 4611.8 64-QAM 6 3/4 1960 13.6 5188.2 64-QAM 6 5/6 1960 13.6 5764.7

256-QAM 8 3/4 1960 13.6 6917.6

256-QAM 8 5/6 1960 13.6 7686.3

1024-QAM 10 3/4 1960 13.6 8647.1

1024-QAM 10 5/6 1960 13.6 9607.8