协议栈 手册专题 1,480 字

LTE-NB:全栈协议流程

本节用测试系统抓取的消息,跟踪一个 NB-IoT UE 从上电到完成附着的全过程。表中列出每一步,包括消息之间的 NPDCCH 授权、HARQ ACK 与 RLC ACK,其后的各节给出主要消息的解码内容。

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

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

正文

本节用测试系统抓取的消息,跟踪一个 NB-IoT UE 从上电到完成附着的全过程。表中列出每一步,包括消息之间的 NPDCCH 授权、HARQ ACK 与 RLC ACK,其后的各节给出主要消息的解码内容。

本节涵盖以下内容。

  • 协议流程概览
  • 消息详解
  • 步骤 1 — MIB
  • 步骤 2 — SIB1
  • 步骤 3 — SIB2 及其他
  • 步骤 7 — RRC Connection Request
  • 步骤 10 — 竞争解决 + RRC Connection Setup
  • 步骤 14 — RRC Connection Setup Complete + Attach Requeset + PDN Conn Request
  • 步骤 18 — Authentication Request
  • 步骤 23 — Authentication Response
  • 步骤 27 — NAS Security Mode Command
  • 步骤 32 — NAS Security Mode Complete
  • 步骤 36 — Attach Accept + Activate Default EPS Bearer Context Request
  • 参考资料 附着本身只需要少数几条 RRC 与 NAS 消息,但下表却有 41 个步骤。多出来的大部分步骤是 NB-IoT 在每条消息周围附加的低层传输。表中的 SS 指扮演 eNB 与核心网角色的系统模拟器。
步骤 方向 消息 备注
1 UE <--- SS MIB
2 UE <--- SS SIB1
3 UE <--- SS SIB2、3 及其他
4 UE ---> SS PRACH(RACH 前导码)
5 UE <--- SS NPDCCH(DCI N1) RAR 消息的资源解码信息
6 UE <--- SS RACH Response
7 UE ---> SS RRC Connection Request
8 < UE > UE MAC 启动 mac-ContentionResolutionTimer 3GPP 36.321 5.1.5,CR 定时器取值在 SIB2 中设置
9 UE <--- SS NPDCCH(DCI N1) CR 的资源解码信息
10 UE <--- SS 竞争解决 + RRC Connection Setup
11 UE ---> SS HARQ ACK(NPUSCH format2) 对 CR 接收的 HARQ ACK
12 < UE > UE MAC 停止 mac-ContentionResolutionTimer
13 UE <--- SS UL 授权(DCI N0,NPDCCH) 用于发送 ‘RRC Connection Setup Complete’ 的授权
14 UE ---> SS RRC Connection Setup Complete + Attach Requeset + PDN Conn Request
15 UE <--- SS DCI N1(NPDCCH) RLC ACK 的资源解码信息
16 UE <--- SS RLC ACK
17 UE <--- SS DCI N1(NPDCCH) Athentication Request 的资源解码信息
18 UE <--- SS Authentication Request
19 UE ---> SS HARQ ACK(NPUSCH format2)
20 UE <--- SS UL 授权(DCI N0,NPDCCH) 用于发送 RLC ACK 的授权
21 UE ---> SS RLC ACK
22 UE <--- SS UL 授权(DCI N0,NPDCCH)
23 UE ---> SS Authentication Response
24 UE <--- SS DCI N1(NPDCCH) RLC ACK 的资源解码信息
25 UE <--- SS RLC ACK
26 UE <--- SS DCI N1(NPDCCH) NAS Security Mode Command 的资源解码信息
27 UE <--- SS NAS Security Mode Command
28 UE ---> SS HARQ ACK(NPUSCH format2)
29 UE <--- SS UL 授权(DCI N0,NPDCCH) 用于发送 RLC ACK 的授权
30 UE ---> SS RLC ACK
31 UE <--- SS UL 授权(DCI N0,NPDCCH) 用于发送 NAS Security Mode Complete 的授权
32 UE ---> SS NAS Security Mode Complete
33 UE <--- SS DCI N1(NPDCCH) RLC ACK 的资源解码信息
34 UE <--- SS RLC ACK
35 UE <--- SS DCI N1(NPDCCH) Attach Accept 的资源解码信息
36 UE <--- SS RRC:dlInformationTransfer + Attach Accept + Activate Default EPS Bearer Context Request
37 UE ---> SS HARQ ACK(NPUSCH format2)
38 UE <--- SS UL 授权(DCI N0,NPDCCH) 用于发送 RLC ACK 的授权
39 UE ---> SS RLC ACK
40 UE ---> SS RRC ulInformationTransfer + Attach Complete + Activate Default EPS Bearer Context Accept
41 UE <--- SS RLC ACK

步骤

方向

消息

备注

UE <--- SS

MIB

SIB1

SIB2、3 及其他

UE ---> SS

PRACH(RACH 前导码)

NPDCCH(DCI N1)

RAR 消息的资源解码信息

RACH Response

RRC Connection Request

< UE >

UE MAC 启动 mac-ContentionResolutionTimer

3GPP 36.321 5.1.5

CR 定时器取值在 SIB2 中设置

CR 的资源解码信息

10

竞争解决 + RRC Connection Setup

11

HARQ ACK(NPUSCH format2)

对 CR 接收的 HARQ ACK

12

UE MAC 停止 mac-ContentionResolutionTimer

13

UL 授权(DCI N0,NPDCCH)

用于发送 ‘RRC Connection Setup Complete’ 的授权

14

RRC Connection Setup Complete

  • Attach Requeset

  • PDN Conn Request

15

DCI N1(NPDCCH)

RLC ACK 的资源解码信息

16

RLC ACK

17

Athentication Request 的资源解码信息

18

Authentication Request

19

20

用于发送 RLC ACK 的授权

21

22

23

Authentication Response

24

25

26

NAS Security Mode Command 的资源解码信息

27

NAS Security Mode Command

28

29

30

31

用于发送 NAS Security Mode Complete 的授权

32

NAS Security Mode Complete

33

34

35

Attach Accept 的资源解码信息

36

RRC:dlInformationTransfer

  • Attach Accept

  • Activate Default EPS Bearer Context Request

37

38

39

40

RRC ulInformationTransfer

  • Attach Complete

  • Activate Default EPS Bearer Context Accept

41

观察步骤 14 至 40,会发现一个反复出现的模式。下行每条 NAS 消息都需要一个带 DCI N1 的 NPDCCH、NPDSCH 本身,以及 NPUSCH format 2 上的一个 HARQ ACK;随后还有一个用于 RLC ACK、带 DCI N0 的 UL 授权。在 Release 13 中只有单个 HARQ 进程,这些步骤无法重叠,因此附着的时延会逐步累加。

  • 步骤 1 至 3 是系统信息:MIB-NB、SIB1-NB 与 SIB2-NB,不涉及 DCI。
  • 步骤 4 至 12 是随机接入:前导码、RAR、Msg3 与带竞争解决的 Msg4。
  • 步骤 14 至 40 是附着:NAS 消息由 RRC 承载,每条周围都环绕着授权与 ACK。
  • 未出现 RRC 安全:这次附着只有 NAS 安全模式流程提供保护。 以下各节给出表中链接的解码消息。每条消息都保留抓取时的原样,作者用红色高亮的即关键字段。各节标题编号与上表的步骤编号对应。

MIB-NB 是 UE 在对小区一无所知时唯一能读取的消息。红色标注的两行是后续步骤所依赖的两个字段。字段 schedulingInfoSIB1-r13 取值为 0,解码器将其展开为 4 次 NPDSCH 重复和 208 bit 的 TBS;operationModeInfo-r13 为 standalone。

解码后的消息,解码器树状格式。字段取值来自实际抓取的消息,而非来自规范。

BCCH-BCH-Message-NB message systemFrameNumber-MSB-r13: 00 [bit length 4, 4 LSB pad bits, 0000 .... decimal value 0] hyperSFN-LSB-r13: 00 [bit length 2, 6 LSB pad bits, 00.. .... decimal value 0] schedulingInfoSIB1-r13: 4 NPDSCH repetitions - TBS 208 bits (0) systemInfoValueTag-r13: 0 .... ...0 ab-Enabled-r13: False operationModeInfo-r13: standalone-r13 (3) standalone-r13 spare: 00 [bit length 5, 3 LSB pad bits, 0000 0... decimal value 0] spare: 0000 [bit length 11, 5 LSB pad bits, 0000 0000 000. .... decimal value 0] HEX : 00 00 C0 00 00
  • schedulingInfoSIB1-r13 = 0:4 次重复、208 bit,取自 36.213 表 16.4.1.3-3 与 16.4.1.5.2-1。
  • operationModeInfo-r13 = standalone:该载波并不位于某个 LTE 载波之内。 SIB1-NB 告诉 UE 如何找到其他 SI 消息,红色标注的正是这些调度字段。抓包中列出一条承载 SIB3-NB 的 SI 消息,si-Periodicity 为 rf64、si-RepetitionPattern 为 every4thRF、si-TB 为 b256,位于 160 ms 的 SI 窗口内。
systemInformationBlockType1-r13 hyperSFN-MSB-r13: 00 [bit length 8, 0000 0000 decimal value 0] cellAccessRelatedInfo-r13 plmn-IdentityList-r13: 1 item Item 0 PLMN-IdentityInfo-NB-r13 plmn-Identity-r13 mcc: 3 items Item 0 MCC-MNC-Digit: 0 Item 1 MCC-MNC-Digit: 0 Item 2 MCC-MNC-Digit: 1 mnc: 2 items Item 0 MCC-MNC-Digit: 0 Item 1 MCC-MNC-Digit: 1 cellReservedForOperatorUse-r13: notReserved (1) attachWithoutPDN-Connectivity-r13: true (0) trackingAreaCode-r13: 0001 cellIdentity-r13: 00000010 cellBarred-r13: notBarred (1) intraFreqReselection-r13: allowed (0) cellSelectionInfo-r13 q-RxLevMin-r13: -140dBm (-70) q-QualMin-r13: -34dB p-Max-r13: -30dBm freqBandIndicator-r13: 2 eutraControlRegionSize-r13: n2 (1) nrs-CRS-PowerOffset-r13: dB6 (12) schedulingInfoList-r13: 1 item Item 0 SchedulingInfo-NB-r13 si-Periodicity-r13: rf64 (0) si-RepetitionPattern-r13: every4thRF (1) sib-MappingInfo-r13: 1 item Item 0 SIB-Type-NB-r13: sibType3-NB-r13 (0) si-TB-r13: b256 (3) si-WindowLength-r13: ms160 (0) HEX : 63 00 01 80 08 06 00 02 00 00 00 30 00 00 05 C0 10 86 00

该抓包还带有 eutraControlRegionSize-r13 与 nrs-CRS-PowerOffset-r13,这两个字段仅为带内工作模式定义。上面的 MIB-NB 报告的是 standalone 模式,因此这两条消息描述的并非同一套小区配置。SIB Scheduling 一节对这些字段作了说明。

SIB2-NB 承载 UE 随机接入所需的全部内容,红色标注的即随机接入部分。NPRACH 资源采用 66.7 µs 循环前缀、640 ms 周期、8 ms 起始时间,以及从子载波 12 开始的 12 个子载波。抓包末尾接着是 SIB3-NB。

sib2-r13 radioResourceConfigCommon-r13 rach-ConfigCommon-r13 preambleTransMax-CE-r13: n20 (7) powerRampingParameters-r13 powerRampingStep: dB4 (2) preambleInitialReceivedTargetPower: dBm-92 (14) rach-InfoList-r13: 1 item Item 0 RACH-Info-NB-r13 ra-ResponseWindowSize-r13: pp10 (7) mac-ContentionResolutionTimer-r13: pp8 (4) bcch-Config-r13 modificationPeriodCoeff-r13: n16 (0) pcch-Config-r13 defaultPagingCycle-r13: rf128 (0) nB-r13: fourT (0) npdcch-NumRepetitionPaging-r13: r1 (0) nprach-Config-r13 nprach-CP-Length-r13: us66dot7 (0) nprach-ParametersList-r13: 1 item Item 0 NPRACH-Parameters-NB-r13 nprach-Periodicity-r13: ms640 (5) nprach-StartTime-r13: ms8 (0) nprach-SubcarrierOffset-r13: n12 (1) nprach-NumSubcarriers-r13: n12 (0) nprach-SubcarrierMSG3-RangeStart-r13: one (3) maxNumPreambleAttemptCE-r13: n10 (6) numRepetitionsPerPreambleAttempt-r13: n1 (0) npdcch-NumRepetitions-RA-r13: r16 (4) npdcch-StartSF-CSS-RA-r13: v4 (2) npdcch-Offset-RA-r13: zero (0) npdsch-ConfigCommon-r13 nrs-Power-r13: 1dBm npusch-ConfigCommon-r13 ack-NACK-NumRepetitions-Msg4-r13: 1 item Item 0 ACK-NACK-NumRepetitions-NB-r13: r1 (0) dmrs-Config-r13 threeTone-BaseSequence-r13: 0 threeTone-CyclicShift-r13: 0 sixTone-CyclicShift-r13: 0 ul-ReferenceSignalsNPUSCH-r13 .... 0... groupHoppingEnabled-r13: False groupAssignmentNPUSCH-r13: 0 uplinkPowerControlCommon-r13 p0-NominalNPUSCH-r13: -92dBm alpha-r13: al1 (7) deltaPreambleMsg3-r13: -2dB (-1) ue-TimersAndConstants-r13 t300-r13: ms2500 (0) t301-r13: ms2500 (0) t310-r13: ms0 (0) n310-r13: n1 (0) t311-r13: ms1000 (0) n311-r13: n1 (0) freqInfo-r13 additionalSpectrumEmission-r13: 1 timeAlignmentTimerCommon-r13: infinity (7) sib-TypeAndInfo-r13 item: sib3-r13 (1) sib3-r13 cellReselectionInfoCommon-r13 q-Hyst-r13: dB0 (0) cellReselectionServingFreqInfo-r13 s-NonIntraSearch-r13: 0dB (0) intraFreqCellReselectionInfo-r13 q-RxLevMin-r13: -140dBm (-70) s-IntraSearchP-r13: 0dB (0) t-Reselection-r13: s6 (2) HEX : 00 40 03 DC 78 00 01 41 3C 11 0... [已截断]
  • nprach-CP-Length-r13 = us66dot7:前导码格式 0。
  • mac-ContentionResolutionTimer-r13 = pp8:即表中步骤 8 启动的那个定时器。
  • ack-NACK-NumRepetitions-Msg4-r13 = r1:步骤 11 中针对 Msg4 的 HARQ ACK 只发送一次。
  • npdcch-NumRepetitions-RA-r13 = r16:步骤 5 与 9 中用于 RAR 和 Msg4 的 NPDCCH 最多重复 16 次。 RRC Connection Request 是 Msg3,使用 RAR 给出的 UL 授权在 SRB0 上发送。UE 用一个 40 bit 的随机值标识自身,建立原因填 mo-Signalling,并把 multiToneSupport-r13 置为 true。
rrcConnectionRequest-r13 ue-Identity-r13: randomValue (1) randomValue: 59aa46959a establishmentCause-r13: mo-Signalling (1) multiToneSupport-r13: true (0) spare: 000000 HEX : 2A B3 54 8D 2B 34 40 00 00

Msg4 同时承载竞争解决和 RRC Connection Setup,UE 解码到它时便停止 mac-ContentionResolutionTimer。红色标注的是 UE 从此开始使用的专用 NPDCCH 与 NPUSCH 设置。

rrcConnectionSetup-r13 radioResourceConfigDedicated-r13 srb-ToAddModList-r13: 1 item Item 0 SRB-ToAddMod-NB-r13 rlc-Config-r13: defaultValue (1) defaultValue: NULL logicalChannelConfig-r13: defaultValue (1) defaultValue: NULL mac-MainConfig-r13: explicitValue-r13 (0) explicitValue-r13 ul-SCH-Config-r13 periodicBSR-Timer-r13: pp8 (2) retxBSR-Timer-r13: infinity (6) drx-Config-r13: release (0) release: NULL timeAlignmentTimerDedicated-r13: infinity (7) logicalChannelSR-Config-r13: setup (1) setup logicalChannelSR-ProhibitTimer-r13: pp2048 (6) physicalConfigDedicated-r13 npdcch-ConfigDedicated-r13 npdcch-NumRepetitions-r13: r16 (4) npdcch-StartSF-USS-r13: v4 (2) npdcch-Offset-USS-r13: zero (0) npusch-ConfigDedicated-r13 ack-NACK-NumRepetitions-r13: r8 (3) .... ..1. npusch-AllSymbols-r13: True uplinkPowerControlDedicated-r13 p0-UE-NPUSCH-r13: 0dB HEX : 30 13 3C F5 9F 8E 88 CF 00
  • npdcch-NumRepetitions-r13 = r16:UE 专属搜索空间的 Rmax 为 16。
  • ack-NACK-NumRepetitions-r13 = r8:NPUSCH format 2 上的每个 HARQ ACK 重复 8 次。
  • srb-ToAddModList-r13 有一个条目:采用默认配置的 SRB1。36.331 第 5.3.1 条随之隐式建立 SRB1bis。 RRC Connection Setup Complete 在 dedicatedInfoNAS 中携带 Attach Request 与 PDN Connectivity Request。UE network capability 中的红色行表明该 UE 只支持控制面 CIoT EPS 优化,后面标红的行则表示请求扩展 DRX。
rrcConnectionSetupComplete-r13 selectedPLMN-Identity-r13: 1 registeredMME-r13 mmegi: 8001 [bit length 16, 1000 0000 0000 0001 decimal value 32769] mmec: 01 [bit length 8, 0000 0001 decimal value 1] dedicatedInfoNAS-r13: 1730bb646f020741020bf600f1108001010000000107f070... Non-Access-Stratum (NAS)PDU 0001 .... = Security header type: Integrity protected (1) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0x30bb646f Sequence number: 2 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Attach request (0x41) 0... .... = Type of security context flag (TSC): Native security context (for KSIasme) .000 .... = NAS key set identifier: (0) .... 0... = Spare bit(s): 0x00 .... .010 = EPS attach type: Combined EPS/IMSI attach (2) EPS mobile identity Length: 11 .... 0... = Odd/even indication: Even number of identity digits .... .110 = Type of identity: GUTI (6) Mobile Country Code (MCC): Unknown (1) Mobile Network Code (MNC): Unknown (01) MME Group ID: 32769 MME Code: 1 M-TMSI: 0x00000001 UE network capability Length: 7 1... .... = EEA0: Supported .1.. .... = 128-EEA1: Supported ..1. .... = 128-EEA2: Supported ...1 .... = 128-EEA3: Supported .... 0... = EEA4: Not supported .... .0.. = EEA5: Not supported .... ..0. = EEA6: Not supported .... ...0 = EEA7: Not supported 0... .... = EIA0: Not supported .1.. .... = 128-EIA1: Supported ..1. .... = 128-EIA2: Supported ...1 .... = 128-EIA3: Supported .... 0... = EIA4: Not supported .... .0.. = EIA5: Not supported .... ..0. = EIA6: Not supported .... ...0 = EIA7: Not supported 0... .... = UEA0: Not supported .0.. .... = UEA1: Not supported ..0. .... = UEA2: Not supported ...0 .... = UEA3: Not supported .... 0... = UEA4: Not supported .... .0.. = UEA5: Not supported .... ..0. = UEA6: Not supported .... ...0 = UEA7: Not supporte... [已截断]

该能力对后续流程很关键。只支持控制面 CIoT EPS 优化的 UE 仅建立 SRB1bis,正如 SRB 映射一节所述。这就是表中没有出现 RRC Security Mode Command 的原因:这次附着中唯一的安全流程是 NAS 安全流程。

从这里直到附着完成,每条 NAS 消息都在 DLInformationTransfer-NB 或 ULInformationTransfer-NB 内传输。Authentication Request 是其中第一条,且为明文 NAS 消息,因为此时尚不存在 NAS 安全上下文。

dlInformationTransfer-r13 dedicatedInfoNAS-r13: 0752000123456789abcdef0123456789abcdef1054cdfeab... Non-Access-Stratum (NAS)PDU 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Authentication request (0x52) 0000 .... = Spare half octet: 0 .... 0... = Type of security context flag (TSC): Native security context (for KSIasme) .... .000 = NAS key set identifier: (0) ASME Authentication Parameter RAND - EPS challenge RAND value: 0123456789abcdef0123456789abcdef Authentication Parameter AUTN (UMTS and EPS authentication challenge) - EPS challenge Length: 16 AUTN value: 54cdfeab9889800001326754cdfe2b98 SQN xor AK: 54cdfeab9889 AMF: 8000 MAC: 01326754cdfe2b98 HEX : 00 09 01 D4 80 00 48 D1 59 E2 6A F3 7B C0 48 D1 59 E2 6A F3 7B C4 15 33 7F AA E6 22 60 00 00 4C 99 D5 33 7F 8A E6 00

UE 在 ULInformationTransfer-NB 中用 Authentication Response 回应该质询。上表显示了这一小小交互在 NB-IoT 上的开销:每条 NAS 消息周围都环绕着 RLC ACK、HARQ ACK 以及各自独立的授权。

ulInformationTransfer-r13 dedicatedInfoNAS-r13: 17f9cb55fe0307531001326754cdfeab9889baefdc457623... Non-Access-Stratum (NAS)PDU 0001 .... = Security header type: Integrity protected (1) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0xf9cb55fe Sequence number: 3 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Authentication response (0x53) Authentication response parameter Length: 16 RES: 01326754cdfeab9889baefdc45762310 HEX : 30 19 17 F9 CB 55 FE 03 07 53 10 01 32 67 54 CD FE AB 98 89 BA EF DC 45 76 23 10

NAS Security Mode Command 选择 NAS 算法并启动新的 EPS 安全上下文。在本抓包中,MME 选择 EEA0(空加密算法)作为加密算法,选择 128-EIA1 作为完整性保护算法。

dlInformationTransfer-r13 dedicatedInfoNAS-r13: 37205a892300075d010002f070c1 Non-Access-Stratum (NAS)PDU 0011 .... = Security header type: Integrity protected with new EPS security context (3) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0x205a8923 Sequence number: 0 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Security mode command (0x5d) NAS security algorithms - Selected NAS security algorithms 0... .... = Spare bit(s): 0x00 .000 .... = Type of ciphering algorithm: EPS encryption algorithm EEA0 (null ciphering algorithm) (0) .... 0... = Spare bit(s): 0x00 .... .001 = Type of integrity protection algorithm: EPS integrity algorithm 128-EIA1 (1) 0000 .... = Spare half octet: 0 .... 0... = Type of security context flag (TSC): Native security context (for KSIasme) .... .000 = NAS key set identifier: (0) ASME UE security capability - Replayed UE security capabilities Length: 2 1... .... = EEA0: Supported .1.. .... = 128-EEA1: Supported ..1. .... = 128-EEA2: Supported ...1 .... = 128-EEA3: Supported .... 0... = EEA4: Not supported .... .0.. = EEA5: Not supported .... ..0. = EEA6: Not supported .... ...0 = EEA7: Not supported 0... .... = EIA0: Not supported .1.. .... = 128-EIA1: Supported ..1. .... = 128-EIA2: Supported ...1 .... = 128-EIA3: Supported .... 0... = EIA4: Not supported .... .0.. = EIA5: Not supported .... ..0. = EIA6: Not supported .... ...0 = EIA7: Not supported IMEISV request 1100 .... = Element ID: 0xc- .... 0... = Spare bit(s): 0x00 .... .001 = IMEISV request: IMEISV requested (1) HEX : 00 03 8D C8 16 A2 48 C0 01 D7 40 40 00 BC 1C 30 40

这是 UE 与 MME 之间的 NAS 安全,而不是 UE 与 eNB 之间的 AS 安全。其周围的 RRC 消息仍留在 SRB1bis 上,只有其中的 NAS 载荷受到保护。

NAS Security Mode Complete 是在新上下文下受到保护的第一条消息。尽管所选的加密算法是 EEA0,其外层安全头类型仍写着在新增 EPS 安全上下文下进行完整性保护并加密。

ulInformationTransfer-r13 dedicatedInfoNAS-r13: 47f678b4ff00075e23090310200790999909f0 Non-Access-Stratum (NAS)PDU 0100 .... = Security header type: Integrity protected and ciphered with new EPS security context (4) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0xf678b4ff Sequence number: 0 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Security mode complete (0x5e) Mobile identity - IMEISV - IMEISV (0010270099999900) Element ID: 0x23 Length: 9 0000 .... = Identity Digit 1: 0 .... 0... = Odd/even indication: Even number of identity digits .... .011 = Mobile Identity Type: IMEISV (3) BCD Digits: 0010270099999900 1111 .... = Filler: 0xf HEX : 30 13 47 F6 78 B4 FF 00 07 5E 23 09 03 10 20 07 90 99 99 09 F0

Attach Accept 携带 Activate Default EPS Bearer Context Request,两者共同完成附着。抓包中分配了 EPS 承载标识 5、APN www.sharetechnote.com 以及 IPv4 地址 192.168.20.11。

dlInformationTransfer-r13 dedicatedInfoNAS-r13: 27fb54f05e02074202e0060000f1100001003d5201c10109... Non-Access-Stratum (NAS)PDU 0010 .... = Security header type: Integrity protected and ciphered (2) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0xfb54f05e Sequence number: 2 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: Attach accept (0x42) 0000 .... = Spare half octet: 0 .... 0... = Spare bit(s): 0x00 .... .010 = Attach result: Combined EPS/IMSI attach (2) GPRS Timer - T3412 value GPRS Timer: timer is deactivated 111. .... = Unit: value indicates that the timer is deactivated (7) ...0 0000 = Timer value: 0 Tracking area identity list - TAI list Length: 6 0... .... = Spare bit(s): 0x00 .00. .... = Type of list: list of TACs belonging to one PLMN, with non-consecutive TAC values (0) ...0 0000 = Number of elements: 0 [+1 = 1 element(s)] Mobile Country Code (MCC): Unknown (1) Mobile Network Code (MNC): Unknown (01) Tracking area code(TAC): 1 ESM message container Length: 61 ESM message container contents: 5201c10109100377777707616e72... 0101 .... = EPS bearer identity: EPS bearer identity value 5 (5) .... 0010 = Protocol discriminator: EPS session management messages (0x2) Procedure transaction identity: 1 NAS EPS session management messages: Activate default EPS bearer context request (0xc1) EPS quality of service Length: 1 Quality of Service Class Identifier (QCI): QCI 9 (9) Access Point Name Length: 22 APN: www.sharetechnote.com PDN address Length: 13 0000 0... = Spare bit(s): 0x00 PDN type: IPv4v6 (3) PDN IPv6 if id: 0000000000000001 PDN IPv4: 192.168.20.11 Linked TI - Transaction identifier Element ID: 0x5d Length: 1 1... .... = TI Flag:The message is sent to the side that originates the TI TI value: 0x00 (0) Quality Of Service - Negotiated QoS ... [已截断]

标红的行为 EPS network feature support。网络确认支持控制面 CIoT EPS 优化、不支持用户面 CIoT EPS 优化,这与 RRC Connection Setup Complete 中的 UE 能力一致。因此该 UE 的数据将在控制面上通过 NAS 消息传输。

3GPP TS 36.331 v19.3.0 — 第 5.3.1 条关于 SRB1bis,第 6.7 条关于 NB-IoT RRC 消息

3GPP TS 36.321 v19.3.0 — 第 5.1.5 条关于竞争解决

3GPP TS 24.301 — EPS NAS 消息与 CIoT EPS 优化


同族文档