WIFI

[toc]

WIFI

Introduction

  • IEEE 802.11, which cover physical and data link layer.
image-20221208140602350 image-20221208142043513 image-20221208142059098

  • A-MSDU的形成

  • A-MPDU的形成

How it work

image-20221208142138729

Topological Structure

  • A BSS without an AP

    • ad hoc network

    img

  • a BSS with an AP

    • infrastructure network

    img

  • 802.11ax BSS colour

蓝字很重要

如果颜色位相同,则该帧被认为是BSS内的传输,监听无线电将推迟。

如果颜色位不同,则该帧被视为来自OBSS的跨BSS传输,监听无线电仅在确定颜色位不同的时间内将信道视为繁忙。

Component

STA(station)

  • is a wireless terminal with a wireless network card, such as computer phone ,etc.

是指配有无线网卡的无线终端, 如手机、电脑等。

  • station type

    • No transition mobility

      • Stationary or moving only inside a BSS

      静止或仅在BSS上移动

    • BSS transition Mobility

      • Can move from one BSS to another, the movement is confined to one ESS.

      可以从一个BSS移动到另一个BSS,范围仅限ESS内

    • ESS transition mobility

      • Can move from one ESS to another. 802.11 does not guarantee that communication is continuous during the move.

      从一个ESS移动到另一个ESS,802.11不保证移动过程通信是连续的。

AP(Access point)

  • Wireless Access Point
  • Network devices for connecting STA to wired networks

用来连接 STA 和有线网络的网络设备

BSS(basic server set)

  • 即基本服务集,由一个 AP 和一个及以上 STA 组成的无线网络。BSS 内所有的 STA 通信都是通过 AP 完成,AP 不仅能连接有线网络,还可以在 STA 和 其它 STA 或 DS 节点之间进行桥接。

ESS(Extended server set)

  • 即扩展服务集,同一有线网络连接的、两个及以上的 AP 组成,和一个子网概念类似。

IBSS(Independent basic server set)

  • 即 独立基本服务集,包含一个及以上 STA 的无线网络,也叫做 ad-hoc 无线网络,无法访问 DS 时使用的模式。

DS(Distribution System)

  • 分发系统,让不同 BSS 内的 AP 通过 DS 互连,STA 可以从一个 BSS 移动到另一个 BSS 。AP 之间可以是无线互连,也可以是有线互连,通常是使用有线互连。DS 是 BSS 之间进行逻辑连接的基础,让 STA 在 BSS 之间能够实现漫游。

Process

Collision Avoidance

Example
  • Hidden station problem

image-20221208145053153

  • B and C are hidden from each other.
  • B send frame to A , B think A is free
  • C send frame to A, C think A is free

Then, there have collision.

  • we use RTS and CTS we avoid this problem.
why we can not use CSDM/CD(Carrier Sense Multiple Access with Collision Detection)

CSDM/CD : 波侦听多路访问/冲突检测协议。

  • Collision Detection implies: a station must be able to TX data and RX collisions at the same time. This implies costly stations and increased BW.

碰撞检测意味着:一个站必须能够在同一时间发送数据和接收碰撞。这意味着昂贵的站点和增加的BW。

  • Collisions may not be detected because of hidden terminal problem.

由于隐藏的终端问题,碰撞可能无法被检测到。

  • Eg stations A and B both have data to send to C. Station B is hidden from A, so if there is a collision near B, A will not hear it. This cant happen on a wired LAN.

例如,A站和B站都有数据要发送给C站,B站对A站是隐藏的,所以如果B站附近有碰撞,A站就听不到。这在有线局域网上是不可能发生的。

  • The distance between stations may be great, because of signal fading a station at one end may not hear a collision at the other end.

站点之间的距离可能很大,由于信号衰减,一端的站点可能听不到另一端的碰撞。

  • 概述:以太网中,传输介质是网线或光纤,能够通过电气信号检测冲突的发生。但由于无线网络不会产生电气信号,因此需要使用 CSMA/CA 来替代 CSMA/CD 。
What is CSMA/CA(Carrier Sense Multiple Access with Collision Avoidance)

CSMA/CA: 载波侦听多路访问/冲突避免协议。

  • 载波侦听CS(Carrier Sense ): 是指网络中的各个设备在发送数据前,都要确认确认线路上有没有数据传输。如果有数据传输,就不发送数据;如果没有数据传输,马上发送数据。

  • 多路访问MA(Multiple Access): 是指网络上所有设备收发数据,共同使用同一条线路,而且发送的数据是广播型。

  • 冲突避免CA(Collision Avoidance): WLAN 中,如果遇到其它设备正在发送数据,那么就在设备发送完成后,再等待一段随机时间,c才继续发送数据。

CSMA/CA process
Flow chart of CSMA/CA
  • RTS(request to send): a station want to send a control packet which includes the source, destination, and the duration of the following transaction (the packet and the respective ACK)

RTS(请求发送):一个站要发送一个控制包,其中包括来源、目的地和下面交易的持续时间(该包和各自的ACK)。

  • CTS(clear to send): The destination station responds with a response control packet which includes the same duration information.

目的站以响应控制包进行回应,其中包括相同的持续时间信息。

  • Virtual Carrier Sense(called NAV, for Network Allocation Vector): all station receive RTS/CTS, set their Virtual Carrier Sense indicator,for the given duration, and use this information together with the Physical Carrier Sense when sensing the medium.

所有站都接收RTS/CTS,在给定的时间内设置它们的虚拟载波感应指标,并在感应介质时与物理载波感应一起使用这一信息。

  • inter-frame space (IFS): After the previous frame has been transmitted and detected by the other endpoints, each endpoint waits for a period of time

    在前一帧被传输并被其他端点检测到后,每个端点都会等待一段时期

    • Short IFS (SIFS): The shortest interval, used by APs to send acknowledgements and management traffic

    短IFS(SIFS):最短的时间间隔,由AP用来发送确认和管理流量。

    • Point-coordination IFS (PIFS): Used in PCF (contention free).

    点协调IFS(PIFS):用于PCF(无争论)中。

    • Distributed IFS (DIFS): The interval used by most other endpoints

    分布式IFS(DIFS)–大多数其他端点使用的区间。

DCF(Distributed Coordination Function)

DCF:分布式协调功能

Flow chat of DCF in CSMA/CA

follow Diagram is CSMA/CA and NAV (DCF)

image-20221208163954768
  • Collision avoidance mechanism uses Network Allocation Vector (NAV)

避免碰撞机制使用网络分配向量(NAV)

  • May have a collision during Handshaking(if no ACK assume a collision)

在握手过程中可能会有碰撞如果没有ACK就认为有碰撞)。

RTS/CTS Exchage diagram

RTS/CTS Exchage diagram

RTS and CTS Mac Header

RTS and CTS Mac Header
  • RA(Receive address)
  • TA(Transmitter address)

Duration field in RTS

Duration field in RTS

Duration time in RTS:

3*SIFS+CTS+ACK+frame time

Duration time in CTS

Duration time in CTS

Duration time in CTS

RTS-CTS time -1*SIFS

CSMA/CA and NAV exchange packet diagram
image-20221208172416674

Process

medium就是信道

  • Station 1 和station2 占用了信道,所以station3和station4进入了NAV,执行random backoff算法,station5和station6检测到信道忙,也进入NAV,并进入random backoff算法.
  • 如何计算random backoff.根据DCF flow chart,station1和staion2占用信道之前,k=3,2^3 -1=7, back off =7
  • Station3 and station4的backoff,在station1和station2发送data之前,k=4, 2^4 -1 =15, 0-15之间它选择了9,所以station1和station2的backoff counter先结束了计算,所以先开始了发送数据包,station3和station4发现backoff还没算完信道又忙了,于是推迟计算时间(冻结计算器)2slot,等信道空闲后重新计算2slot,然后发送数据。
  • station5和station6发送数据后设置NAV状态,由于距离比较远就之间隐蔽了。因为RTS和CTS的作用下,发生碰撞的 概率就比较低,RTS的时间很短,听到CTS则保留信道为忙,所以就一直忙到结束交易。
  • CW(contention window)争用窗口 - from CA
    • CW determines the additional amount of time (number of slots) an endpoint should wait after the IFS before attempting to transmit a packet.

CW决定了端点在试图传输数据包之前,在IFS之后应该等待的额外时间(槽数)。

  • If the medium is available, the endpoint transmits its packets.

如果信道可用就传输数据包

  • If the medium is unavailable (that is, if another device sent a packet), the endpoint waits until the end-of-packet transmission (from another device) plus the IFS period. In addition, it doubles the current value of the CW and then attempts to transmit.

如果不可用,就等待另一个设备的数据包传输完毕,加上剩余的DIFS,结束slot后,开始传输数据包。

PCF( Point Coordination Function) - optional
  • Different with DCF

    • PCF is contention free

    PCF是无争论的

    • DCF is Contention based

    DCF 是争论的

  • Stations that only use DCF may not gain access to the medium

    如果只使用DCF,也许访问不到信道

    • Use repetition interval

      使用重复的时间间隔

    • When a station hears the beacon frame they start their NAV which is set for the contention free period of the repetition interval.

      当一个站听到beacon frame时,他们开始他们的NAV,这是设置为重复间隔的无争论期。

  • How do it work

    • The AP performs the polling

      AP执行轮流询问

    • Not all stations are capable of being polled

      但并不是所有的station都能被询问到

    • PIFS is shorter than DIFS, this gives the AP priority

      PIFS比DIFS短,这给了AP优先权。

image-20221208205935634
  • 看到Beacon frame ,其他stations全部进入NAV,避免冲突,同时重复间隔无争论期

  1. AP默认发送beacons的时间是100TUs,故102.4ms
  2. 如果我们有10个ssid,那么我们需要在102.4ms内发送10个beacons,1个beacons就是10tus。
  3. 这就意味着多少个ssid在这个默认的时间内发送多少个beacons。

Frame fomat

image-20221208212055129
  • Frame control is important
image-20221208212151901
RTS frame control
image-20221208212353380
CTS or ASK frame control
image-20221208212420811
Subtype Value
image-20221208221841731
TO DS(Distribution System) and From DS
image-20221208222056675

Different case in address

image-20221208222631648
Basic Service Set Identifier (BSSID)

基本服务集标识符。

  • SA(Source address)

    • The SA field contains an IEEE MAC individual address that identifies the MAC entity from which the transfer of the MSDU (or fragment thereof) or A-MSDU, contained in the frame body field was initiated. The individual/group bit is always transmitted as a 0 in the source address.

      SA字段包含一个IEEE MAC个体地址,用于识别MSDU(或其片段)或A-MSDU(包含在帧体字段中)的传输是从哪个MAC实体开始的。在源地址中,个人/组位总是以0的形式传输。

  • DA(Destination address)

    • The DA field contains an IEEE MAC individual or group address that identifies the MAC entity or entities intended as the final recipient(s) of the MSDU (or fragment thereof) or A-MSDU, contained in the frame body field.

      DA字段包含一个IEEE MAC个人或群组地址,用于识别MAC实体或实体作为帧体字段中包含的MSDU(或其片段)或A-MSDU的最终接收者。

  • RA(Receving STA address)

    • The RA field contains an IEEE MAC individual or group address that identifies the intended immediate recipient STA(s), on the WM, for the information contained in the frame body field.

      RA字段包含一个IEEE MAC个人或群组地址,用于识别WM上帧体字段所含信息的预期直接接收者STA(s)。

  • TA(Transmitting STA address)

    • The TA field contains an IEEE MAC individual address that identifies the STA that has transmitted, onto the WM, the MPDU contained in the frame body field. The Individual/Group bit is always transmitted as a 0 in the transmitter address.

      TA字段包含一个IEEE MAC个体地址,用于识别在WM上传输帧体字段所含MPDU的STA。在发送器地址中,个人/组位总是以0的形式传输。

image-20221208223600781
Question:
  • Quesion1:
image-20221208223659125
  • question2
image-20221208223734507
  • Question3
image-20221208223757650
  • Question 4
image-20221208223821225

OFDM for 802.11

calculation datarate and subcarriers spacings.

Example
image-20221208231047265 image-20221208231023045
question
  • Question1
image-20221208232537091 image-20221208232619511
  • Question2
image-20221208232634746 image-20221208233958167
  • Copyrights © 2022-2024 Jessy Huang
  • Visitors: | Views:

请我喝杯咖啡吧~