协议栈 其他专题 2,312 字

协议栈:全栈视图

至此我们已经介绍了 LTE 协议栈的每一层,现在该把这些层组合成一个完整的协议栈了。此时的问题是:一条消息在通往空口的路上,需要经过每一层的哪些处理?它使用哪个逻辑信道、传输信道和物理信道?它是否带有 MAC 头、使用哪种 RLC 模式、是…

采集:2026-11-18T02:16:46+08:00 · 查看英文原文 ↗

原始来源:https://www.sharetechnote.com/html/FullStack_LTE.html

正文

至此我们已经介绍了 LTE 协议栈的每一层,现在该把这些层组合成一个完整的协议栈了。此时的问题是:一条消息在通往空口的路上,需要经过每一层的哪些处理?它使用哪个逻辑信道、传输信道和物理信道?它是否带有 MAC 头、使用哪种 RLC 模式、是否经过 PDCP 处理?下面各节围绕附着流程、下行与上行信道映射,以及一段来自现网的解码日志来回答这些问题。

  • 整体流程与各层配置
  • 下行信道映射
  • 上行信道映射
  • 整个呼叫处理过程中的信道映射表
  • 全栈视角下的现网实例
  • 参考资料 请试着跟随下面的流程,把已掌握的知识综合起来,形成实际的理解。这种整合在 3GPP 规范中并没有讲解,需要你自己去梳理。

以下几个要点可供你延伸思考:

  • i) 哪些流程需要常规 MAC 头,哪些完全不使用 MAC 头?
  • ii)「无 MAC 头」与「常规 MAC 头」的实际含义分别是什么?
  • iii) 哪些流程使用 RLC TM 模式?哪些使用 RLC UM 模式?哪些使用 RLC AM 模式?
  • iv) 你能否说明每个使用 RLC 层的流程在 RLC 层的具体行为?
  • v) 哪些流程使用 PDCP,哪些不使用? | 步骤 | 方向 | 信道 | 消息 | | --- | --- | --- | --- | | 1 | UE <---- NW | BCCH -> BCH,无 MAC 头,RLC TM,无 PDCP | MIB | | 2 | UE <---- NW | BCCH -> DL SCH,无 MAC 头,RLC TM,无 PDCP | SIBs | | 3 | UE ----> NW | PRACH -> RACH,无 MAC 头,无 RLC,无 PDCP | PRACH 前导码 | | 4 | UE <---- NW | RACH -> DL SCH,无 MAC 头,无 RLC,无 PDCP | RACH Response | | 5 | UE ----> NW | UL SCH -> UL CCCH,MAC 头,无 RLC,无 PDCP | RRC Connection Request | | 6 | UE <---- NW | DL CCCH -> DL SCH,MAC 头,无 RLC,无 PDCP | RRC Connection Setup | | 7 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC : RRC Connection Setup Complete + NAS : Attach Request (ESM:PDN Connectivity Request) | | 8 | UE <---- NW | DL DCCH -> DL SCH,MAC 头,RLC AM,PDCP | RRC:dlInformationTransfer EMM:Authentication Request | | 9 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC:ulInformationTransfer EMM:Authentication Response | | 10 | UE <---- NW | DL DCCH -> DL SCH,MAC 头,RLC AM,PDCP | RRC:dlInformationTransfer EMM:Security Mode Command | | 11 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC:ulInformationTransfer EMM:Security Mode Complete | | 12 | UE <---- NW | DL DCCH -> DL SCH,MAC 头,RLC AM,PDCP | RRC : Security Mode Command | | 13 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC : Security Mode Complete | | 14 | UE <---- NW | DL DCCH -> DL SCH,MAC 头,RLC AM,PDCP | RRC:RRC Connection Reconfiguration EMM:Attach Accept ESM:Activate Default EPS Bearer Context Request | | 15 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC : RRC Connection Reconfiguration Complete | | 16 | UE ----> NW | UL SCH -> UL DCCH,MAC 头,RLC AM,PDCP | RRC:ulDirectTransfer EMM:Attach Complete ESM:Activate Default EPS Bearer Context Accept | | 17 | UE <---- NW | DL DCCH -> DL SCH,MAC 头,RLC AM,PDCP | RRC : RRC Connection Release |

步骤

方向

信道

消息

UE <---- NW

BCCH -> BCH,

无 MAC 头,RLC TM,无 PDCP

MIB

BCCH -> DL SCH,

SIBs

UE ----> NW

PRACH -> RACH,

无 MAC 头,无 RLC,无 PDCP

PRACH 前导码

RACH -> DL SCH,

RACH Response

UL SCH -> UL CCCH

MAC 头,无 RLC,无 PDCP

RRC Connection Request

DL CCCH -> DL SCH

RRC Connection Setup

UL SCH -> UL DCCH

MAC 头,RLC AM,PDCP

RRC:RRC Connection Setup Complete +

NAS:Attach Request(ESM:PDN Connectivity Request)

DL DCCH -> DL SCH

RRC:dlInformationTransfer

EMM:Authentication Request

RRC:ulInformationTransfer

EMM:Authentication Response

10

EMM:Security Mode Command

11

EMM:Security Mode Complete

12

RRC:Security Mode Command

13

RRC:Security Mode Complete

14

RRC:RRC Connection Reconfiguration

EMM:Attach Accept

ESM:Activate Default EPS Bearer Context Request

15

RRC:RRC Connection Reconfiguration Complete

16

RRC:ulDirectTransfer

EMM:Attach Complete

ESM:Activate Default EPS Bearer Context Accept

17

RRC:RRC Connection Release

注:这些配置可在 36.331 中核对,SRB 一节对此做了汇总。

结合上表来逐条回答这五个问题。规范中有两条规则决定了大部分答案。第一,MAC 对 PCH、BCH 以及 DL-SCH 上的 BCCH 不加头,36.321 第 6.1.4 条称之为透明 MAC。第二,如 36.323 第 4.4 条所述,本流程中 PDCP 只服务于 DCCH 与 DTCH。

  • 无 MAC 头:BCH 上的 MIB 与 DL-SCH 上的 SIB 使用透明 MAC,因此传输块中只有 RRC 消息。步骤 3 中的前导码根本不是 MAC PDU。步骤 4 中的 RAR 是个特例:其 MAC PDU 带有自己的 E/T/RAPID 子头头,其后是 MAC RAR,所以表中「无 MAC 头」的意思是它没有常规 MAC 头。
  • 常规 MAC 头:从 RRC Connection Request 起,每个 MAC PDU 都以子头开头。每个子头中的 LCID 告诉接收方其后是哪个逻辑信道或哪个 MAC CE。因此一个传输块可以同时承载一条 RRC 消息和一个 BSR 或 PHR,本页末尾的现网日志即如此。
  • RLC TM、UM 与 AM:TM 服务于 BCCH、PCCH 与 CCCH,因此 MIB、SIB 以及 SRB0 消息都使用 TM。TM 不添加 RLC 头,这就是步骤 5 和 6 标注「无 RLC」的原因。AM 服务于 SRB1、SRB2 以及需要重传的 DRB,UM 则服务于不需要重传的 DRB。
  • RLC AM 的行为:AM 把一条较大的 RRC 消息分段成多个 AMD PDU,接收方用 STATUS PDU 回应轮询。在现网日志中,RRC Connection Setup Complete 以 SN 0 至 SN 9 的 AMD PDU 发出,eNB 以 ACK_SN 10 回应。
  • PDCP:只有步骤 7 至 17 使用 PDCP,因为只有它们运行在 DCCH 上。步骤 1 至 6 使用 BCCH、随机接入流程或 CCCH,都不带 PDCP 头。 上面看到的那张图是按时间顺序排列的消息流(事件图)。下面这张图不是基于时间的,而是展示信道映射(或数据穿过整个协议栈的流动)。请从上图中挑一条消息,试着在下面这张图里找到它的正确路径,看看你能补充多少细节。

例如,如果你挑的是「RRC Connection Setup」这条消息,那么起点就是「RRC Message msg4」。

LTE 下行信道映射:从物理信道经传输信道、逻辑信道到无线承载

图注:LTE 下行信道映射:从物理信道经传输信道、逻辑信道到无线承载

请从下往上读上面这张图。PBCH 只承载 BCH,而 BCH 只承载 MIB。PDSCH 同时承载 PCH 和 DL-SCH。DL-SCH 则承载其余所有逻辑信道:用于 SIB 的 BCCH、CCCH、DCCH 和 DTCH。PDCCH 之上没有传输信道,因为它承载的是 DCI 而不是数据。UE 通过携带匹配 RNTI 的 PDCCH 找到每次 PDSCH 传输,具体 RNTI 见下表 RNTI 列。

以下是下行信道映射的表格形式。(LCID 与 TrCH 编号会随网络或网络模拟器而不同)

RB 逻辑信道 PDCP RLC 逻辑信道 LCID MAC 头 HARQ RNTI 传输信道
PCCH TM PCCH N/A 无 无 无 PCH
BCCH 0 TM BCCH 0 N/A 无 无 无 BCH 0
BCCH 1 TM BCCH 1 N/A 无 广播 SI RNTI DL SCH 0
RA_RES TM RA_RES N/A 无 无 RA RNTI DL SCH 1
SRB0 DL CCCH 无 TM DL CCCH 0 常规 常规 T-CRNTI DL SCH 1
SRB1 DL DCCH 0 已使用 AM DL DCCH 0 1 常规 常规 CRNTI DL SCH 1
SRB2 DL DCCH 1 已使用 AM DL DCCH 0 2 常规 常规 CRNTI DL SCH 1
DRB 0 DL DTCH0 已使用 UM/AM DL DTCH0 3 常规 常规 CRNTI DL SCH 1
DRB 1 DL DTCH0 已使用 UM/AM DL DTCH0 4 常规 常规 CRNTI DL SCH 1
DRB 2 DL DTCH0 已使用 UM/AM DL DTCH0 5 常规 常规 CRNTI DL SCH 1

RB

逻辑信道

PDCP

RLC

LCID

MAC 头

HARQ

RNTI

传输信道

PCCH

TM

N/A

无

PCH

BCCH 0

BCH 0

BCCH 1

广播

SI RNTI

DL SCH 0

RA_RES

RA RNTI

DL SCH 1

SRB0

DL CCCH

常规

T-CRNTI

SRB1

DL DCCH 0

已使用

AM

CRNTI

SRB2

DL DCCH 1

DRB 0

DL DTCH0

UM/AM

DRB 1

DRB 2

上行映射比下行映射简单。UE 从不发送广播或寻呼,因此只剩两条传输信道:RACH 承载前导码,UL-SCH 承载从 CCCH 到 DTCH 的所有逻辑信道。下图在上行信道上展示了与下行映射相同的无线承载。

LTE 上行信道映射:从 PRACH、PUSCH、PUCCH 经 RACH 与 UL-SCH 到逻辑信道和无线承载

图注:LTE 上行信道映射:从 PRACH、PUSCH、PUCCH 经 RACH 与 UL-SCH 到逻辑信道和无线承载

PUCCH 与下行的 PDCCH 类似,其上没有传输信道,只承载 UCI,即 HARQ ACK/NACK、SR 和 CSI。RACH 之上也没有逻辑信道,因此前导码不经过任何 MAC、RLC 或 PDCP 处理。第一个上行 MAC PDU 是 CCCH 上的 RRC Connection Request,UE 使用 RAR 给出的授权在 PUSCH 上发送它。

以下是上行信道映射的表格形式。(LCID 与 TrCH 编号会随网络或网络模拟器而不同)

RB 逻辑信道 PDCP RLC 逻辑信道 LCID MAC 头 HARQ RNTI 传输信道
RA_PRE TM RA_PRE N/A 无 无 无 UL SCH 0
SRB0 UL CCCH 无 TM UL CCCH 0 常规 常规 T-CRNTI UL SCH 0
SRB1 UL DCCH 0 已使用 AM UL DCCH 0 1 常规 常规 CRNTI UL SCH 0
SRB2 UL DCCH 1 已使用 AM UL DCCH 0 2 常规 常规 CRNTI UL SCH 0
DRB 0 UL DTCH0 已使用 UM/AM UL DTCH0 3 常规 常规 CRNTI UL SCH 0
DRB 1 UL DTCH0 已使用 UM/AM UL DTCH0 4 常规 常规 CRNTI UL SCH 0
DRB 2 UL DTCH0 已使用 UM/AM UL DTCH0 5 常规 常规 CRNTI UL SCH 0

RA_PRE

UL SCH 0

UL CCCH

UL DCCH 0

UL DCCH 1

UL DTCH0

这两张图及其表格可以归纳出若干适用于所有 LTE 呼叫的规则。

  • DL-SCH 与 UL-SCH 承载了几乎全部内容:只有 BCH 上的 MIB、PCH 上的寻呼以及 RACH 上的前导码使用其他传输信道。
  • PDCCH 与 PUCCH 不承载传输信道:它们承载 DCI 与 UCI,即共享信道的控制信息。
  • SRB0 没有 PDCP:CCCH 使用 RLC TM,而 36.323 第 4.4 条把 PDCP 限定在 DCCH 与 DTCH 上。
  • LCID 0 是 CCCH:LCID 1 和 2 分别是 SRB1 与 SRB2,DRB 从 LCID 3 开始。 这只是一个示例,映射关系(尤其是逻辑信道编号)会因情况而异。要点在于:如果你为自己的场景建立这类表格,对排障或测试用例编写将非常有帮助。
消息 RB 逻辑信道 逻辑信道编号 LCID
MIB - BCCH 0 -
SIB 1 - BCCH 1 -
SIB 2 - BCCH 1 -
RRC:PRACH 前导码 - - - -
RRC:RACH Response - - - -
RRC:RRC Connection Request SRB0 UL CCCH 0 0
RRC:RRC Connection Setup SRB0 DL CCCH 0 0
RRC:RRC Connection Setup Complete + NAS:Attach Request + ESM:PDN Connectivity Request SRB1 UL DCCH 0 1
RRC:DL Information Transfer + NAS:Authentication Request SRB1 DL DCCH 0 1
RRC:UL Information Transfer + NAS:Authentication Response SRB1 UL DCCH 0 1
RRC:DL Information Transfer + NAS:Security Mode Command SRB1 DL DCCH 0 1
RRC:UL Information Transfer + NAS:Security Mode Complete SRB1 UL DCCH 0 1
RRC:Security Mode Command SRB1 DL DCCH 0 1
RRC:Security Mode Complete SRB1 UL DCCH 0 1
RRC:RRC Connection Reconfiguration SRB1 DL DCCH 0 1
RRC:RRC Connection Reconfiguration Complete SRB1 UL DCCH 0 1
RRC:UL InformationTransfer + NAS:Attach Complete + NAS:Activate Default EPS Bearer SRB2 UL DCCH 1 2
RRC:UL Information Transfer + ESM:PDN Connectivity Request SRB2 UL DCCH 1 2

逻辑信道编号

BCCH

SIB 1

SIB 2

RRC:PRACH 前导码

RRC:RACH Response

RRC:RRC Connection Request

RRC:RRC Connection Setup

RRC:RRC Connection Setup Complete + NAS:Attach Request + ESM:PDN Connectivity Request

UL DCCH

RRC:DL Information Transfer + NAS:Authentication Request

DL DCCH

RRC:UL Information Transfer + NAS:Authentication Response

RRC:DL Information Transfer + NAS:Security Mode Command

RRC:UL Information Transfer + NAS:Security Mode Complete

RRC:UL InformationTransfer + NAS:Attach Complete + NAS:Activate Default EPS Bearer

RRC:UL Information Transfer + ESM:PDN Connectivity Request

注:参见 TS 36.331 — 9.1.1 逻辑信道配置

注意 SRB2 在上表中出现的位置。SRB1 承载 RRC 消息以及搭载在其上的 NAS 消息;在 SRB2 存在之前,NAS 消息也单独由它承载。E-UTRAN 只在安全激活之后、在附着的 RRC Connection Reconfiguration 中配置 SRB2。因此 Attach Complete 是第一条可以使用 SRB2 的消息。36.331 v19.3.0 第 4.2.2 条还规定 SRB2 的优先级低于 SRB1。

SRB1 与 SRB2 的 LCID 取值 1 和 2,是 36.331 第 9.1.2 条规定的默认 SRB 配置。逻辑信道编号与 DRB 的 LCID 由网络或网络模拟器选定,因此在你自己抓的日志中会是别的取值。

  • 连接建立阶段用 SRB0:RRC Connection Request 与 RRC Connection Setup,在 CCCH 上使用 LCID 0。
  • 安全激活之前用 SRB1:所有 RRC 消息,以及封装在 DL、UL Information Transfer 中的 NAS 消息。
  • 安全激活之后用 SRB2:承载优先级低于 SRB1 的 NAS 消息。 这是一个很好的例子,可以用来细致地练习从 MAC 到 PDCP 的各个环节。下面是一段 UE 与现网之间的日志,也就是说它展示的是真实网络中发生的情况。我用 SanJole 的 Intellijudge 和 Wavejudge 抓取日志并重新排版,使其更易阅读。(建议先深入了解 RACH、MAC、PDCP 的细节,尤其是各层的数据结构,然后再回来看这段内容,看看你能理解多少。)

UE 与现网之间抓取的解码日志。每个底纹行给出 SFN 与子帧以及事件,其下一行是该事件的解码内容。字段取值来自真实抓包,而非来自规范。

SFN:402.4 RACH 前导码
RNTI = None Timing Offset = 2 Logical Root = 219 Preamble index = 33 NC Configuration = 12 Set Type = Unrestricted Logical Root = 215 Preamble Format = 0 RbStart = 2
SFN:402.8 MAC RA Response
MAC : 61 00 B0 C0 4C 2C 09 E = 0(False) T = 1 RAPID = 33 Timing Advanced = 11 Hopping Flag 0 = False Fixed Size Resource Block Assignment = 96 (RB Start = 46, RB Length = 2) MCS = 2, I_TBS = 2, rv = 0 TPC Command for PUCCH 3 = 0 UL Delay 0 = False CQI Request = False T_CRNTI = 11273
SFN:403.4 PUSCH — RRC Connection Request
MAC : 20 06 1F 5C 2C 04 B2 AC F6 Sub Header 0 R = OK E = 1 LCID = 0 (CCCH) F = 0 (False) L = 6 Sub Header 1 R = OK E = 0 LCID = 31 (Padding) CCCH-RLC : 5C 2C 04 B2 AC F6 (RRC Connection Request)
SFN:403.8 PHICH-ACK
SFN:404.7 PDCCH(DCI Format 1)+ PDSCH(RRC Connection Setup)
CCE Start = 0 CCE Length = 8 DCI Format 1A (Hex : 47D01E2) Format = 1 Distributed VRB flag = 0 (Local) Resource Allocation = 500 (RB Start = 0, RB Length = 11) MCS = 0 (I_TBS = 0) HARQ Process Number = 7 NDI (New Data Indicator) = 1 (True) RV = 0 TPC Command for PUCCH = 1 MAC : 3C 20 1A 1F 5C 2C 04 B2 AC F6 60 12 98 08 FD 4E … Sub Header 0 R = OK E = 1 LCID = 28 (UE Contention Resolution Identity) Sub Header 1 R = OK E = 1 LCID = 1 (CCCH) F = 0 (False) L = 26 Sub Header 2 R = OK E = 0 LCID = 31 (Padding) UE Contention Resolution Identity UE Contention Resolution Identity= 5C 2C 04 B2 AC F6
SFN:405.1 PUCCH — UCI HARQ ACK
PUCCH Format 1 A n PUCCH = 16
SFN:406.2 PUCCH — UCI SR
N PUCCH RB = 2
SFN:406.6 PDCCH - DCI Format 0
PDCCH DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:406.7 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:406.8 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:406.9 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.0 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.0 PUSCH — RRC Connection Setup Complete(首段)
MAC = 3A 3D 01 22 10 88 00 00 20 Sub Header 0 R = OK E = 1 LCID = 26 (Power Headroom Report) Sub Header 1 R = OK E = 1 LCID = 29 (Short Buffer Status Report) Sub Header 2 R = OK E = 0 LCID = 1 (identity) Power Headroom R = OK Power Headroom —> 11 dB <= PH <= 12 dB Short Buffer Status Report LCG ID = 0 Buffer Size 16 —> 91 < BS <= 107 RLC AMD = 88 00 00 20 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 1 (First Byte of the Data Field corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 0 PDCP-CP-SRB = 00 20
SFN:407.1 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 01 20 80 01 00 59 17 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 01 20 80 01 00 59 17 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 1 PDCP-CP-SRB = 20 80 01 00 59 17
SFN:407.1 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.1 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 02 39 45 E5 34 0B 07 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 02 39 45 E5 34 0B 07 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 2 PDCP-CP-SRB = 39 45 E5 34 0B 07
SFN:407.2 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.3 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 02 41 02 0B F6 03 02 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 03 41 02 0B F6 03 02 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 3 PDCP-CP-SRB = 41 02 0B F6 03 02
SFN:407.3 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.4 PHICH ACK
…
SFN:407.4 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0180440) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 0 (False) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.4 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 04 27 80 01 00 D0 CC Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 04 27 80 01 00 D0 CC D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 4 PDCP-CP-SRB = 27 80 01 00 D0 CC
SFN:407.5 PUSCH — RRC Connection Setup Complete(中段)
MAC = 3D 01 0E 98 05 71 51 04 E0 Sub Header 0 R = OK E = 1 LCID = 29 (Short Buffer Status Report) Sub Header 1 R = OK E = 0 LCID = 1 (identity) Short Buffer Status Report LCG ID = 0 Buffer Size 14 —> 67 < BS <= 78 RLC AMD = 98 05 71 51 04 E0 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 5 PDCP-CP-SRB = 71 51 04 E0
SFN:407.5 PHICH ACK
…
SFN:407.5 PDCCH - DCI Format 0
DCI Format 0 (Hex : 0246280) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 145 MCS 17, RV 0 NDI = 0 (False) TPC = 2 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
SFN:407.6 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 06 E0 C0 40 00 21 02 Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 06 E0 C0 40 00 21 02 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 6 PDCP-CP-SRB = E0 C0 40 00 21 02
SFN:407.6 PHICH ACK
…
SFN:407.7 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 07 03 D0 11 D1 27 1A Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 07 03 D0 11 D1 27 1A D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 7 PDCP-CP-SRB = 03 D0 11 D1 27 1A
SFN:407.7 PHICH ACK
…
SFN:407.8 PHICH ACK
…
SFN:407.8 PUSCH — RRC Connection Setup Complete(中段)
MAC = 01 98 08 80 80 21 10 01 00 Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 08 80 80 21 10 01 00 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 8 PDCP-CP-SRB = 80 80 21 10 01 00
SFN:407.9 PUSCH — RRC Connection Setup Complete(末段)
MAC = 3E 21 36 1F 00 00 00 B0 09 00 10 81 06 00 00 00 00 83 06 00 00 00 00 … Sub Header 0 R = OK E = 1 LCID = 30 (Long Buffer Status Report) Sub Header 1 R = OK E = 1 LCID = 1 (identity) F = 0 (False) L = 54 Sub Header 2 R = OK E = 0 LCID = 31 (Padding) Long Buffer Status Report Buffer Size #0 = 0 (BS = 0) Buffer Size #1 = 0 (BS = 0) Buffer Size #2 = 0 (BS = 0) Buffer Size #3 = 0 (BS = 0) RLC AMD = B0 09 00 10 81 06 00 00 00 00 83 06 00 00 00 00 … D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 1 (Status Report Requested) Fl = 2 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 9 PDCP-CP-SRB = 00 10 81 06 00 00 00 00 83 06 00 00 00 00 …
SFN:407.9 PHICH ACK
…
SFN:408.0 PHICH ACK
…
SFN:408.1 PHICH ACK
…
SFN:408.2 PHICH ACK
…
SFN:408.3 PHICH ACK
…
SFN:408.4 PDCCH — DCI Format 2A / PDSCH — RLC ACK
DCI Format 2A (Hex : 080005C0802) Resource Allocation Type = 0 Resource Allocation = 65536 TPC Command for PUCCH = 2 HARQ Process Number = 7 Transport block to codeword swap flag = 0 Transport Block 1 MCS = 0 New Data Indicator = 1 Redundancy Version = 0 Transport Block 2 MCS = 0 New Data Indicator = 1 Redundancy Version = 0 Codeword 0 = Transport block 1 MAC : 21 02 1F 00 28 00 00 Sub Header 0 R = OK E = 1 LCID = 1 (Identity) F = 0 (False) L = 2 Sub Header 1 R = OK E = 0 LCID = 31 (Padding) RLC-STS-PDU : 00 28 D/C = 0 (Control PDU) CPT = 0 (Status PDU) ACK_SN = 10 E1 = 0 (False) Padding OK
SFN:408.5 PDCCH - DCI Format 0
DCI Format 0 (Hex : 023DE84) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 143 MCS 15, RV 0 NDI = 0 (False) TPC = 2 Cyclic Shift for DMRS = 0 CQI Requested = 1 (True)
SFN:408.8 PUCCH — UCI HARQ ACK
…
SFN:408.9 UCI + PUSCH
UCI RI = 2 Higher layer configured subband CQI Wideband CQI Codeword = index 10, modulation 64QAM, efficiency = 2.7305 Subband differential CQI = 0,1,2,1,3,3,3,3,0 CRC PUSCH - MAC : 3E 1F 00 00 00 00 … Sub Header 0 Reserved = OK E = 1 (True) LCID = 30 (Long Buffer Status Report) Sub Header 1 Reserved = OK E = 0 (False) LCID = 31 (Padding) Long Buffer Status Report Buffer Size #0 : 0 —> BS = 0 Buffer Size #0 : 1 —> BS = 0 Buffer Size #0 : 2 —> BS = 0 Buffer Size #0 : 3 —> BS = 0

SFN:402.4

RACH 前导码

RNTI = None Timing Offset = 2 Logical Root = 219 Preamble index = 33 NC Configuration = 12 Set Type = Unrestricted Logical Root = 215 Preamble Format = 0 RbStart = 2

SFN:402.8

MAC RA Response

MAC : 61 00 B0 C0 4C 2C 09 E = 0(False) T = 1 RAPID = 33 Timing Advanced = 11 Hopping Flag 0 = False Fixed Size Resource Block Assignment = 96 (RB Start = 46, RB Length = 2) MCS = 2, I_TBS = 2, rv = 0 TPC Command for PUCCH 3 = 0 UL Delay 0 = False CQI Request = False T_CRNTI = 11273

SFN:403.4

PUSCH — RRC Connection Request

MAC : 20 06 1F 5C 2C 04 B2 AC F6 Sub Header 0 R = OK E = 1 LCID = 0 (CCCH) F = 0 (False) L = 6 Sub Header 1 R = OK E = 0 LCID = 31 (Padding) CCCH-RLC : 5C 2C 04 B2 AC F6 (RRC Connection Request)

SFN:403.8

PHICH-ACK

SFN:404.7

PDCCH(DCI Format 1)+ PDSCH(RRC Connection Setup)

CCE Start = 0 CCE Length = 8 DCI Format 1A (Hex : 47D01E2) Format = 1 Distributed VRB flag = 0 (Local) Resource Allocation = 500 (RB Start = 0, RB Length = 11) MCS = 0 (I_TBS = 0) HARQ Process Number = 7 NDI (New Data Indicator) = 1 (True) RV = 0 TPC Command for PUCCH = 1 MAC : 3C 20 1A 1F 5C 2C 04 B2 AC F6 60 12 98 08 FD 4E ..... Sub Header 0 R = OK E = 1 LCID = 28 (UE Contention Resolution Identity) Sub Header 1 R = OK E = 1 LCID = 1 (CCCH) F = 0 (False) L = 26 Sub Header 2 R = OK E = 0 LCID = 31 (Padding) UE Contention Resolution Identity UE Contention Resolution Identity= 5C 2C 04 B2 AC F6

SFN:405.1

PUCCH — UCI HARQ ACK

PUCCH Format 1 A

n PUCCH = 16

SFN:406.2

PUCCH — UCI SR

N PUCCH RB = 2

SFN:406.6

PDCCH - DCI Format 0

PDCCH DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)

SFN:406.7

DCI Format 0 (Hex : 0180540) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 1 (True) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)

SFN:406.8

SFN:406.9

SFN:407.0

PUSCH — RRC Connection Setup Complete(首段)

MAC = 3A 3D 01 22 10 88 00 00 20 Sub Header 0 R = OK E = 1 LCID = 26 (Power Headroom Report) Sub Header 1 R = OK E = 1 LCID = 29 (Short Buffer Status Report) Sub Header 2 R = OK E = 0 LCID = 1 (identity) Power Headroom R = OK Power Headroom --> 11 dB <= PH <= 12 dB Short Buffer Status Report LCG ID = 0 Buffer Size 16 --> 91 < BS <= 107 RLC AMD = 88 00 00 20 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 1 (First Byte of the Data Field corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 0 PDCP-CP-SRB = 00 20

SFN:407.1

PUSCH — RRC Connection Setup Complete(中段)

MAC = 01 98 01 20 80 01 00 59 17 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 01 20 80 01 00 59 17 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 1 PDCP-CP-SRB = 20 80 01 00 59 17
MAC = 01 98 02 39 45 E5 34 0B 07 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 02 39 45 E5 34 0B 07 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 2 PDCP-CP-SRB = 39 45 E5 34 0B 07

SFN:407.2

SFN:407.3

MAC = 01 98 02 41 02 0B F6 03 02 Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 03 41 02 0B F6 03 02 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 3 PDCP-CP-SRB = 41 02 0B F6 03 02

SFN:407.4

PHICH ACK

…

DCI Format 0 (Hex : 0180440) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 96 MCS 2, RV 0 NDI = 0 (False) TPC = 1 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)
MAC = 01 98 04 27 80 01 00 D0 CC Sub Header 0 R = OK E = 0 LCID = 1 (identity) RLC AMD = 98 04 27 80 01 00 D0 CC D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 4 PDCP-CP-SRB = 27 80 01 00 D0 CC

SFN:407.5

MAC = 3D 01 0E 98 05 71 51 04 E0 Sub Header 0 R = OK E = 1 LCID = 29 (Short Buffer Status Report) Sub Header 1 R = OK E = 0 LCID = 1 (identity) Short Buffer Status Report LCG ID = 0 Buffer Size 14 --> 67 < BS <= 78 RLC AMD = 98 05 71 51 04 E0 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 5 PDCP-CP-SRB = 71 51 04 E0

…

DCI Format 0 (Hex : 0246280) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 145 MCS 17, RV 0 NDI = 0 (False) TPC = 2 Cyclic Shift for DMRS = 0 CQI Requested = 0 (False)

SFN:407.6

MAC = 01 98 06 E0 C0 40 00 21 02 Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 06 E0 C0 40 00 21 02 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 6 PDCP-CP-SRB = E0 C0 40 00 21 02

SFN:407.7

MAC = 01 98 07 03 D0 11 D1 27 1A Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 07 03 D0 11 D1 27 1A D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 7 PDCP-CP-SRB = 03 D0 11 D1 27 1A

…

SFN:407.8

MAC = 01 98 08 80 80 21 10 01 00 Sub Header 0 R = OK E = 0 LCID = 1 (Identity) RLC AMD = 98 08 80 80 21 10 01 00 D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 0 (Status Report Not Requested) Fl = 3 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field does not corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 8 PDCP-CP-SRB = 80 80 21 10 01 00

SFN:407.9

PUSCH — RRC Connection Setup Complete(末段)

MAC = 3E 21 36 1F 00 00 00 B0 09 00 10 81 06 00 00 00 00 83 06 00 00 00 00 .... Sub Header 0 R = OK E = 1 LCID = 30 (Long Buffer Status Report) Sub Header 1 R = OK E = 1 LCID = 1 (identity) F = 0 (False) L = 54 Sub Header 2 R = OK E = 0 LCID = 31 (Padding) Long Buffer Status Report Buffer Size #0 = 0 (BS = 0) Buffer Size #1 = 0 (BS = 0) Buffer Size #2 = 0 (BS = 0) Buffer Size #3 = 0 (BS = 0) RLC AMD = B0 09 00 10 81 06 00 00 00 00 83 06 00 00 00 00 .... D/C = 1 (Data PDU) RF = 0 (AMD PDU) P = 1 (Status Report Requested) Fl = 2 (First Byte of the Data Field does not corresponds to the first byte of a RLC SDU. Last byte of Data field corresponds to the last byte of a RLC PDU) E = 0 (False) SN = 9 PDCP-CP-SRB = 00 10 81 06 00 00 00 00 83 06 00 00 00 00 ....

SFN:408.0

SFN:408.1

SFN:408.2

SFN:408.3

SFN:408.4

PDCCH — DCI Format 2A / PDSCH — RLC ACK

DCI Format 2A (Hex : 080005C0802) Resource Allocation Type = 0 Resource Allocation = 65536 TPC Command for PUCCH = 2 HARQ Process Number = 7 Transport block to codeword swap flag = 0 Transport Block 1 MCS = 0 New Data Indicator = 1 Redundancy Version = 0 Transport Block 2 MCS = 0 New Data Indicator = 1 Redundancy Version = 0 Codeword 0 = Transport block 1 MAC : 21 02 1F 00 28 00 00 Sub Header 0 R = OK E = 1 LCID = 1 (Identity) F = 0 (False) L = 2 Sub Header 1 R = OK E = 0 LCID = 31 (Padding) RLC-STS-PDU : 00 28 D/C = 0 (Control PDU) CPT = 0 (Status PDU) ACK_SN = 10 E1 = 0 (False) Padding OK

SFN:408.5

DCI Format 0 (Hex : 023DE84) Format 0 Hopping Flag = 0 (False) RB Allocation of 1st Slot in UL subframe = 143 MCS 15, RV 0 NDI = 0 (False) TPC = 2 Cyclic Shift for DMRS = 0 CQI Requested = 1 (True)

SFN:408.8

SFN:408.9

UCI + PUSCH

UCI RI = 2 Higher layer configured subband CQI Wideband CQI Codeword = index 10, modulation 64QAM, efficiency = 2.7305 Subband differential CQI = 0,1,2,1,3,3,3,3,0 CRC PUSCH - MAC : 3E 1F 00 00 00 00 .... Sub Header 0 Reserved = OK E = 1 (True) LCID = 30 (Long Buffer Status Report) Sub Header 1 Reserved = OK E = 0 (False) LCID = 31 (Padding) Long Buffer Status Report Buffer Size #0 : 0 --> BS = 0 Buffer Size #0 : 1 --> BS = 0 Buffer Size #0 : 2 --> BS = 0 Buffer Size #0 : 3 --> BS = 0

让我们在上面的日志中逐层追踪附着的开端。同样的字节会在多行中出现,跟随它们是把各层串起来最快的方法。

  • 前导码索引 33、RAPID 33:SFN 402.8 处的 RAR 以 61 开头,即 E = 0、T = 1、RAPID 33,因此它回应的正是这个前导码。它分配的 T_CRNTI 为 11273,即十六进制的 2C09。
  • CCCH 上的 RRC Connection Request:MAC PDU 以 20 06 开头,这是 LCID 0、L = 6 的子头,末尾是一个填充子头。六个 CCCH 字节不带任何 RLC 或 PDCP 头。
  • 竞争解决:在 RRC Connection Setup 中,LCID 28 的 UE Contention Resolution Identity MAC CE 回显了 UE 发送的那六个字节 5C 2C 04 B2 AC F6。
  • 十个 AMD PDU 承载 SRB1:RRC Connection Setup Complete 以 SN 0 至 SN 9 的 AMD PDU 发送,FI 字段标出首段、中间段与末段。首段先带 PDCP 头 00(SN 0),随后是 20,即 UL-DCCH 消息的第一个字节。
  • 轮询与状态报告:末段置 P = 1。eNB 在 SFN 408.4 处以 ACK_SN 10 的 RLC STATUS PDU 作答,说明十个分段全部到达。
  • MAC CE 共享传输块:各分段与 PHR、短 BSR 和长 BSR 这几个 MAC CE(LCID 26、29、30)一同传输。 抓包中有一处标签与字节不符。在 SFN 404.7 的 RRC Connection Setup 中,解码器把第二个子头显示为 LCID = 1(CCCH)。该字节是十六进制的 20,即 E = 1、LCID = 0,而在 36.321 第 6.2.1 条 DL-SCH 表中 LCID 0 就是 CCCH。该行标题写的也是 DCI Format 1,而其下方的解码结果是 DCI Format 1A。该抓包保持记录时的原样。

3GPP TS 36.321 v19.3.0 — 第 6.1.4、6.1.5 与 6.2.1 条,透明 MAC、RAR 与 LCID 取值

3GPP TS 36.322 v19.0.0 — 第 4.2.1 条,TM、UM 与 AM RLC 实体

3GPP TS 36.323 v19.0.0 — 第 4.4 条,PDCP 功能及其服务的逻辑信道

3GPP TS 36.331 v19.3.0 — 第 4.2.2 条信令无线承载,以及第 9.1.1、9.1.2 条默认配置

图示资源


同族文档