MSDU/MPDU/AMSDU/AMPDU基本概念

文章详细介绍了MSDU和MPDU在无线网络中的作用,特别是A-MSDU和A-MPDU技术,它们通过聚合方式提高吞吐量,减少协议开销。A-MSDU主要针对MSDU分块,而A-MPDU在MAC层后完成聚合,强调了错误处理和QoS一致性。
摘要由CSDN通过智能技术生成

MSDU(MAC Service Data Unit): MAC服务数据单元。

MPDU(MAC Protocol Data Unit):  MAC协议数据单元。 

在无线网络安全中,MSDU是Ethernet报文,经过添加完整性校验MIC、分帧、省电模 式下报文缓存、加密、序列号赋值、CRC校验、MAC头之后成为MPDU,MPDU就是 指的经过802.11协议封装过的数据帧。

A-MSDU技术是指把多个MSDU通过一定的方式聚合成一个较大的载荷。通常,当AP 或无线客户端从协议栈收到报文(MSDU)时,会打上Ethernet报文头,称之为AMSDUSubframe,而A-MSDU技术旨在将若干个A-MSDUSubframe按照802.11协议格 式,封装成一个MPDU报文单元,即是A_MPDUSubframe,见下图:

 A-MPDU技术是指的按照802.11协议封装后的若干个A_MPDUSubframe报文的聚合。通 过一次性发送若干个MPDU,减少了发送每个802.11报文所需的PLCPPreamble、 PLCPHeader,从而提高系统吞吐量,见下图: 

>>>>>>>>>>>>>>>>>>>>>>

802.11n提供两种帧聚合的方法:MAC服务数据单元(MSDU—MAC Service Data Unit)和信息协议数据单元(MPDU—Message Procotol Date Unit)

A-MSDU:

主要是对MSDU或者MSDU的分块进行聚合,MSDU是Ethernet报文,经过添加完整性校验MIC、加密、序列号赋值、CRC校验、MAC头部之后形成一个较长的MAC帧MPDU。

A-MPDU:

主要是对MPDU进行聚合,形成一个较长的物理层服务帧PSDU。

两者不同:

对于A-MSDU,如果整帧中有一部分子帧出错,则整帧需要重新传。而A-MPDU则只需要重传出错的那部分子帧。

注:不是所有的帧都能被聚合,广播和多播帧不能被聚合,只有单播帧且接收地址相同和优先级相同的帧才能被聚合。

在进入MAC处理之前,所有的报文都以MSDU形式存在,经过MAC处理之后转换成MPDU.。A-MSDU在进入MAC层之前完成聚合,而A-MPDU在MAC层之后完成聚合。

A-MSDU

要求所聚合子帧的SA和DA所映射的TA和RA相同,即聚合的帧是由同一个无线端发送,且同一个无线端接收,并且只能具备一种QoS属性,不允许将不同QoS属性的帧聚合。

局限性:A-MSDU只适用于较小的MSDU聚合,聚合帧较长时只会有一个FCS,所以A-MSDU传输可靠性较差,如果其中一个MSDU传输出错,则整个A-MSDU将会被重传。

A-MSDU:主要是对MSDU或者MSDU的分块进行聚合,802.11协议栈收集一定数量的上层MSDU报文,先将其聚合在转换为802.11MAC帧.

A-MSDU帧格式如下

MPDU

MPDU每一个成分帧都会有一个802.11帧头。这一点不如MSDU高效,如果适用加密将会变得更加明显,因为MPDU在每一个成分帧上都加上了开销,而MSDU仅对一个汇聚帧加密,仅有单个开销。

如图一个A-MPDU由多个A-MPDU子帧所构成。每个A-MPDU子帧由MPDU Delimiter(MPDU分界符)和MPDU实体组成。对于一个A-MPDU,除了最后一个子帧外,其余子帧都会有0-3个字节的填充字段,使子帧长度变为4字节的整数倍。

MPDU是更低层次的聚合,协议栈收集一定数量的802.11MAC帧,将其聚合后打上PHY标头进行传输,MPDU聚合帧中的每个子帧均有完整的802.11MAC帧头。与MSDU相同,MPDU要求所有帧具有一样的QoS等级。

为保证数据传输的可靠性,802.11协议规定每收到一个单播数据帧都必须立即回应ACK。A-MPDU的接收端在收到A-MPDU后,需要对每一个MPDU进行处理,发送应答。Block ACK通过使用一个ACK来完成对多个MPDU的应答,从而减少信道竞争所消耗的时间, 提高了系统吞吐量。

通过ADDBA Request/Response报文协商建立Block ACK协定。

协商完成后,发送方可以发送有限多个QoS数据报文,接收方会保留这些数据报文 的接收状态,待收到发送方的BlockAckReq报文后,接收方则回应BlockAck报文来对之前接收到的多个报文一次性回复。

通过DELBA Request报文来删除一个已经建立的Block Ack协定。

对于Bock Ack的确认氛围即时确认和延时确认。即时确认一般由硬件完成,延时确认一般由协议栈完成,通过Block Ack的确认配合帧聚合的使用何以大大提高802.11n无线传输中的吞吐量。

总结

802.11在物理层和MAC做了许多改进,极大的提高了物理层传输速率。聚合机制的提出,减少了协议开销,有效的提高了帧效率,改善WLAN链路的带宽利用率低的特点,为高带宽业务提供了可能。

>>>>>>>>>>>>>>>>>>>>>>

Basic operation of DCF is illustrated in Figure1 below.

A-MSDU: The concept of A-MSDU is to allow multiple MSDUs to be sent to the same receiver concatenated in a single MPDU. This supporting function for A-MSDU within 802.11n is mandatory at the receiver. Due to Destination Address (DA) and sender Address (SA) in the subframe header must match to same receiver address (RA) and the transmitter address (TA) in the MAC header, A-MSDU cannot be used for broadcast & multicast.

A-MPDU: The concept of A-MPDU aggregation is to join Multiple MPDU sub frames with a single leading PHY header. A key difference from A-MSDU aggregation is that A-MPDU functions after the MAC header encapsulation process. This method offer higher MAC throughput compare to A-MSDU.

Difference in implementation:

If we see the packet being handed from the IP layer to the MAC layer the following sequence of processing is seen. The packet goes from the IP layer to the MAC-llc (logical link control layer) or the upper MAC. This is also called as the MAC service access point (MAC-SAP). 

MSDU: Is the  MAC service data unit . This is the unit of transmission used at the MAC layer which is received from the upper layer.

AMSDU: Aggregation of the  MSDUs directly performed at the MAC layer is called an AMSDU. Such AMSDU's are now passed to the lower PHY layer, where they are dealt with as MPDUs. Multiple MSDUs are aggregated at the MAC layer and pushed into a single MPDU (which is pushed to the PHY). They have a single frame header with multiple frames, and they are destined for the same client and the same service class. (Basically they all have the same TiD).

* The main motivation for aggregation at the MSDU layer is that: (1) Ethernet is the native frame format for most clients, (2) since the ethernet header is much smaller than the 802.11 header, we can combine multiple ethernet frames to form a single A-MSDU.

MPDU: MAC protocol data units are the frames passed from the MAC layers into the PHY layer.

AMPDU: These are are the aggregated MPDU units which are pushed into a single PPDU (physical protocol data unit).  All frames will have a single PLCP header and preamble.

** The 802.11n system was designed so that either AMPDU, AMSDU or both aggregation algorithms could be used.

When do we want to use an A-MPDU and when do we want to use an A-MSDU:

Rather , the topic of this discussion should be why is AMPDU aggregation preferred over AMSDU aggregation most of the time. Or why most systems use AMPDU aggregation and not AMSDU aggregation.

A-MSDU increases the maximum frame transmission size from 2,304 bytes to almost 8k bytes (7935 to be exact) while A-MPDU allows up to 64k bytes.

However, the main problem with AMSDUs is that the entire blob becomes one MAC frame (or protocol data unit - PDU) and hence has only one CRC check. So as the frame size increase the probability of error increases. Since we have a single CRC check, we cannot retransmit a part of the AMSDU and in most cases this leads to re-transmission at lower rates which nullifies the benefit of aggregation. An AMPDU on the other hand consists of multiple PDUs each with their own CRCs. Hence, in the event of a failure, part of these can be retransmitted resulting in higher efficiency. However, this performance gain comes at a cost since now with every aggregate AMPDU we are sending MAC headers for all of the subframes.

Hence decision of using AMSDU versus AMPDU is a tradeoff between probability of error and retransmission costs in an AMSDU versus MAC frame header overheads in an aggregate with AMPDU. In most real world systems, the later wins, and hence most systems implement AMPDUs.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值