LTE 系统 呼叫流程 8,797 字

基本呼叫:消息流程

本页跟踪一次完整的 LTE 呼叫,从 UE 找到小区的那一刻起,到它在专用承载上传送数据为止。下面每一步都是一条真实消息,直接从实网日志解码、完整打印,而非概述。请把它当作随时回来查阅的参考,而不是要一口气读完的材料。

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

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

正文

本页跟踪一次完整的 LTE 呼叫,从 UE 找到小区的那一刻起,到它在专用承载上传送数据为止。下面每一步都是一条真实消息,直接从实网日志解码、完整打印,而非概述。请把它当作随时回来查阅的参考,而不是要一口气读完的材料。

整个流程跑了两遍,这种重复是刻意的。第一遍是初始附着(attach):UE 完成注册、鉴权,最终获得一个默认 EPS 承载。第二遍又从 RACH 开始,携带一条 Service Request。这就是一个已被网络识别的 UE 在需要再次传送数据时所走的较短路径。第二遍中有若干步骤与第一遍只差一个字段,这些小节会指明是哪个字段,而不是重复整条消息。

以下是本页涵盖的主题:

  • 典型分组呼叫
  • MIB
  • SIB 1
  • SIB 2
  • RRC:PRACH 前导码 / RRC:RACH 响应
  • 临时说明
  • RRC:RRC Connection Request
  • RRC:RRC Connection Setup
  • RRC:RRC Connection Setup Complete + NAS:Attach Request + ESM:PDN Connectivity Request
  • RRC:DL Information Transfer + NAS:Authentication Request
  • RRC:UL Information Transfer + NAS:Authentication Response
  • RRC:DL Information Transfer + NAS:Security Mode Command
  • RRC:UL Information Transfer + NAS:Security Mode Complete
  • RRC:Security Mode Command
  • RRC:Security Mode Complete
  • RRC:UE Capability Enquiry
  • RRC:UE Capability Information
  • RRC:RRC Connection Reconfiguration + NAS:Attach Accept + NAS:Activate Default EPS Bearer Context Request
  • RRC:RRC Connection Reconfiguration Complete + NAS:AttachComplete + ESM:Activate Default EPS Bearer Context Accept
  • RRC:RRC Connection Setup Complete + NAS:Service Request
  • RRC:RRC Connection Reconfiguration + NAS:Activate Dedicated EPS Bearer Context Request
  • RRC:RRC Connection Reconfiguration Complete + NAS:Activate Dedicated EPS Bearer Context Accept 以下是 UE 与网络之间交换的整体协议流程。说实在的,把这些步骤的所有细节都搞清楚,足以成为你整个 LTE 职业生涯的目标。
  1. <小区搜索与检测>

  2. MIB

  3. SIB 1

  4. <检查小区选择准则>

  5. SIB 2 及其他 SIB

  6. RRC:PRACH 前导码

  7. RRC:RACH 响应

  8. RRC:RRC Connection Request

  9. RRC:RRC Connection Setup

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

  11. RRC:DL Information Transfer + NAS:Authentication Request

  12. RRC:UL Information Transfer + NAS:Authentication Response

  13. RRC:DL Information Transfer + NAS:Security Mode Command

  14. RRC:UL Information Transfer + NAS:Security Mode Complete

  15. RRC:Security Mode Command

  16. RRC:Security Mode Complete

O1) RRC:UE Capability Enquiry

O2) RRC:UE Capability Information

O3) ESM:ESM Information Request

O4) ESM:ESM Information Response

O5) EMM:EMM Identity Request

O6) EMM:EMM Identity Response

  1. RRC:RRC Connection Reconfiguration + NAS:Attach Accept + NAS:Activate Default EPS Bearer Context Req

  2. RRC:RRC Connection Reconfiguration Complete + NAS:Attach Complete + NAS:Activate Default EPS Bearer Context Accept

O7) EMM:EMM Information

  1. RRC:RRC Connection Release

  2. <执行邻区测量>

  3. <检查小区重选准则>

  4. <MO 或 MT 呼叫>:在 MT 呼叫中应先发送寻呼(Paging)。

  5. RRC:PRACH 前导码

  6. RRC:RACH 响应

  7. RRC:RRC Connection Request

  8. RRC:RRC Connection Setup

  9. RRC:RRC Connection Setup Complete + NAS:Service Request

  10. RRC:Security Mode Command

  11. RRC:Security Mode Complete

  12. RRC:RRC Connection Reconfiguration + NAS:Activate Dedicated EPS Bearer Context Request

  13. RRC:RRC Connection Reconfiguration Complete + NAS:Activate Dedicated EPS Bearer Context Accept

  14. RRC:RRC Connection Release

MIB 是 UE 找到小区之后解码的第一样东西,其后的一切都取决于它说了什么。它承载在 PBCH 而不是共享信道上,因此无需先解码任何东西就能找到它,同时它也无法做得更大。这一约束正是它内容如此精简的原因。

LTE 的 MIB 所含信息极少(这是与 WCDMA MIB 的一大差别)。它只携带以下信息:

  • i) 带宽(BandWidth)
  • ii) PHICH
  • iii) 系统帧号(SystemFrameNumber) 当然,最重要的信息是「带宽」。

根据 36.331 第 5.2.1.2 节,MIB 的调度如下:

MIB 使用固定调度,周期为 40 ms,并在 40 ms 内进行重复。MIB 的首次发送安排在 SFN mod 4 = 0 的无线帧的子帧 #0,重复则安排在其余所有无线帧的子帧 #0。

这段列表里有两点值得补充。第一是带宽字段究竟说的是什么。36.331 把 dl-Bandwidth 编码为 n6、n15、n25、n50、n75、n100 的枚举,这些是资源块数而不是兆赫兹。读到 n25 的 UE 学到的是该载波宽 25 个资源块,5 MHz 要它自己算出来。

第二是帧号。36.331 把 systemFrameNumber 定义为长度为 8 的 BIT STRING,并说明它携带 SFN 的最高 8 位。SFN 最大计数到 1023,因此少两位。UE 从位置上把它们恢复出来:MIB 在其 40 ms 周期内重复四次,UE 解码到的是第几次重复,就提供了剩下的两位。这也是该调度必须固定、而不能靠信令指示的原因之一。

这份三字段列表也是 Release 8 的列表。后续版本增加了面向带宽缩减 UE 的 schedulingInfoSIB1-BR、systemInfoUnchanged-BR 以及 partEARFCN,它们都被塞进原始设计留下的空闲比特中。因此从现代 eNB 解码出的 MIB 可能显示不止三个字段。

  • MIB 必须先于其他一切可读:它承载在 PBCH 上且调度固定,因此无需先解码任何内容就能找到它。
  • dl-Bandwidth 计的是资源块,不是兆赫兹:36.331 枚举 n6 到 n100,由 UE 自行换算成信道带宽。
  • SFN 有两位从不发送:该字段携带最高 8 位,其余两位由 UE 解码到的重复序号提供。
  • 三个字段是 Release 8 的答案:schedulingInfoSIB1-BR、systemInfoUnchanged-BR 与 partEARFCN 是后来加入空闲比特的。 SIB1 是 UE 读的第二样东西,它同时回答两个互不相关的问题:一是 UE 是否可以驻留在这个小区,二是其他每个 SIB 调度在何处。正是因为后一项调度职责,在读到 SIB1 之前,别的什么都读不了。

LTE 的 SIB 1 所含信息相当于 WCDMA 的 MIB、SIB1 与 SIB3 之和。SIB 1 上的重要信息有:

  • i) PLMN
  • ii) 跟踪区码(Tracking Area Code)
  • iii) 小区选择信息(Cell Selection Info)
  • iv) 频段指示(Frequency Band Indicator)
  • v) 其他 SIB 的调度信息(周期) 你可能会注意到,LTE 的 SIB1 与 WCDMA 的 MIB 非常相似。

尤其是在测试用例开发的初期,你必须对第 v) 项格外小心。如果这个值设错,UE 将无法解码其他任何 SIB,结果就是 UE 认不出该小区并显示「无服务」。

根据 36.331 第 5.2.1.2 节,SIB1 的调度如下:

SystemInformationBlockType1 使用固定调度,周期为 80 ms,并在 80 ms 内进行重复。SystemInformationBlockType1 的首次发送安排在 SFN mod 8 = 0 的无线帧的子帧 #5,重复则安排在其余所有满足 SFN mod 2 = 0 的无线帧的子帧 #5。

这意味着,尽管 SIB1 的周期是 80 ms,它的不同副本(冗余版本,RV)却每 20 ms 发送一次。也就是说,在 L3 上你每 80 ms 看到一次 SIB1,但在 PHY 层你每 20 ms 就能看到它。每次发送具体的 RV 分配请参阅 36.321 第 5.3.1 节(该节最后一部分)。

SFN 0 至 19 的调度图,列为 MIB、SIB1、SIB2 与 SIBN,显示 MIB 原始版本每四帧一次、SIB1 原始版本每八帧一次,其间有重复

图注:SFN 0 至 19 的调度图,列为 MIB、SIB1、SIB2 与 SIBN,显示 MIB 原始版本每四帧一次、SIB1 原始版本每八帧一次,其间有重复

LTE SIB1 的一个示例如下:

< BCCH-DL-SCH-Message > decoded message capture. Field values come from a live capture, not from the specification.

RRC_LTE:BCCH-DL-SCH-Message BCCH-DL-SCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [systemInformationBlockType1] +-systemInformationBlockType1 ::= SEQUENCE  +-cellAccessRelatedInfo ::= SEQUENCE  | +-plmn-IdentityList ::= SEQUENCE OF SIZE(1..6)  | | +-PLMN-IdentityInfo ::= SEQUENCE | | +-plmn-Identity ::= SEQUENCE  | | | +-mcc ::= SEQUENCE OF SIZE(3) OPTIONAL:Exist | | | | +-MCC-MNC-Digit ::= INTEGER (0..9)  | | | | +-MCC-MNC-Digit ::= INTEGER (0..9)  | | | | +-MCC-MNC-Digit ::= INTEGER (0..9)  | | | +-mnc ::= SEQUENCE OF SIZE(2..3)  | | | +-MCC-MNC-Digit ::= INTEGER (0..9)  | | | +-MCC-MNC-Digit ::= INTEGER (0..9)  | | +-cellReservedForOperatorUse ::= ENUMERATED [notReserved] | +-trackingAreaCode ::= BIT STRING SIZE(16)  | +-cellIdentity ::= BIT STRING SIZE(28)  | +-cellBarred ::= ENUMERATED [notBarred] | +-intraFreqReselection ::= ENUMERATED [notAllowed] | +-csg-Indication ::= BOOLEAN [FALSE] | +-csg-Identity ::= BIT STRING OPTIONAL:Omit +-cellSelectionInfo ::= SEQUENCE  | +-q-RxLevMin ::= INTEGER (-70..-22) [-53] | +-q-RxLevMinOffset ::= INTEGER OPTIONAL:Omit +-p-Max ::= INTEGER OPTIONAL:Omit +-freqBandIndicator ::= INTEGER (1..64)  +-schedulingInfoList ::= SEQUENCE OF SIZE(1..maxSI-Message)  | +-SchedulingInfo ::= SEQUENCE | | +-si-Periodicity ::= ENUMERATED [rf8] | | +-sib-MappingInfo ::= SEQUENCE OF SIZE(0..maxSIB-1)  | +-SchedulingInfo ::= SEQUENCE | +-si-Periodicity ::= ENUMERATED [rf8] | +-sib-MappingInfo ::= SEQUENCE OF SIZE(0..maxSIB-1)  | +-SIB-Type ::= ENUMERATED [sibType3] +-tdd-Config ::= SEQUENCE OPTIONAL:Omit +-si-WindowLength ::= ENUMERATED [ms20] +-systemInfoValueTag ::= INTEGER (0..31)  +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

SIB2 是小区停止描述自己、开始告诉 UE 如何发送的地方。UE 在获得专用配置之前所需的每一条公共信道都在这里参数化。这就是为什么 SIB2 出错通常表现为一个永远完不成的 RACH,而不是任何会点出 SIB2 名字的现象。

SIB2 上的重要信息有:

  • i) RACH 配置
  • ii) bcch、pcch、pdsch、pusch、pucch 配置
  • iii) 探测参考信号(sounding RS)配置
  • iv) UE 定时器 我会说 SIB2 是 LTE 中最重要的 SIB。在实现协议栈和排障时,你会最频繁地翻看这个 SIB,因为它定义了大多数物理信道的特性。

如果你在注册过程中遇到问题,尤其是在「RRC Connection Reconfiguration」之前,首先要检查的就是 SIB2:确认 UE 是否正确解码了它,并据此正确配置了自身。有时网络与 UE 之间仅仅一个 SIB2 参数不匹配,就决定了整个注册过程成功还是失败。

以下是 SIB2 的一个示例。在我看来,LTE 的 SIB2 类似于 WCDMA 的 SIB5,后者用于配置各类公共信道。

RRC_LTE:BCCH-DL-SCH-Message BCCH-DL-SCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [systemInformation] +-systemInformation ::= SEQUENCE +-criticalExtensions ::= CHOICE [systemInformation-r8] +-systemInformation-r8 ::= SEQUENCE  +-sib-TypeAndInfo ::= SEQUENCE OF SIZE(1..maxSIB)  | +- ::= CHOICE [sib2] | +-sib2 ::= SEQUENCE  | +-ac-BarringInfo ::= SEQUENCE OPTIONAL:Omit | +-radioResourceConfigCommon ::= SEQUENCE | | +-rach-Config ::= SEQUENCE | | | +-preambleInfo ::= SEQUENCE  | | | | +-numberOfRA-Preambles ::= ENUMERATED [n52] | | | | +-preamblesGroupAConfig ::= SEQUENCE OPTIONAL:Omit | | | +-powerRampingParameters ::= SEQUENCE | | | | +-powerRampingStep ::= ENUMERATED [dB2] | | | | +-preambleInitialReceivedTargetPower ::= ENUMERATED [dBm-104] | | | +-ra-SupervisionInfo ::= SEQUENCE | | | | +-preambleTransMax ::= ENUMERATED [n6] | | | | +-ra-ResponseWindowSize ::= ENUMERATED [sf10] | | | | +-mac-ContentionResolutionTimer ::= ENUMERATED [sf48] | | | +-maxHARQ-Msg3Tx ::= INTEGER (1..8)  | | +-bcch-Config ::= SEQUENCE | | | +-modificationPeriodCoeff ::= ENUMERATED [n4] | | +-pcch-Config ::= SEQUENCE | | | +-defaultPagingCycle ::= ENUMERATED [rf128] | | | +-nB ::= ENUMERATED [oneT] | | +-prach-Config ::= SEQUENCE | | | +-rootSequenceIndex ::= INTEGER (0..837)  | | | +-prach-ConfigInfo ::= SEQUENCE | | | +-prach-ConfigIndex ::= INTEGER (0..63)  | | | +-highSpeedFlag ::= BOOLEAN [FALSE] | | | +-zeroCorrelationZoneConfig ::= INTEGER (0..15)  | | | +-prach-FreqOffset ::= INTEGER (0..94)  | | +-pdsch-Config ::= SEQUENCE | | | +-referenceSignalPower ::= INTEGER (-60..50)  | | | +-p-b ::= INTEGER (0..3)  | | +-pusch-Config ::= SEQUENCE | | | +-pusch-ConfigBasic ::= SEQUENCE | | | | +-n-SB ::= INTEGER (1..4)  | | | | +-hoppingMode ::= ENUMERATED [interSubFrame] | | | | +-pusch-HoppingOffset ::= INTEGER (0..98)  | | | | +-enable64QAM ::= BOOLEAN [FALSE] | | | +-ul-ReferenceSignalsPUSCH ::= SEQUENCE | | | +-groupHoppingEnabled ::= BOOLEAN [TRUE] | | | +-groupAssignmentPUSCH ::= INTEGER (0..29)  | | | +-sequenceHoppingEnabled ::= BOOLEAN [FALSE] | | | +-cyclicShift ::= INTEGER (0..7)  | | +-pucch-Config ::= SEQUENCE | | | +-deltaPUCCH-Shift ::= ENUMERATED [ds2] | | | +-nRB-CQI ::= INTEGER (0..98)  | | | +-nCS-AN ::= INTEGER (0..7)  | | | +-n1PUCCH-AN ::= INTEGER (0..2047)  | | +-soundingRS-UL-Config ::= CHOICE [setup] | | | +-setup ::= SEQUENCE  | | | +-srs-BandwidthConfig ::= ENUMERATED [bw3] | | | +-srs-SubframeConfig ::= ENUMERATED [sc0] | | | +-ackNackSRS-SimultaneousTransmission ::= BOOLEAN [TRUE] | | | +-srs-MaxUpPts ::= ENUMERATED OPTIONAL:Omit | | +-uplinkPowerControl ::= SEQUENCE | | | +-p0-NominalPUSCH ::= INTEGER (-126..24) [-85] | | | +-alpha ::= ENUMERATED [al08] | | | +-p0-NominalPUCCH ::= INTEGER (-127..-96) [-117] | | | +-deltaFList-PUCCH ::= SEQUENCE | | | | +-deltaF-PUCCH-Format1 ::= ENUMERATED [deltaF0] | | | | +-deltaF-PUCCH-Format1b ::= ENUMERATED [deltaF3] | | | | +-deltaF-PUCCH-Format2 ::= ENUMERATED [deltaF0] | | | | +-deltaF-PUCCH-Format2a ::= ENUMERATED [deltaF0] | | | | +-deltaF-PUCCH-Format2b ::= ENUMERATED [deltaF0] | | | +-deltaPreambleMsg3 ::= INTEGER (-1..6)  | | +-ul-CyclicPrefixLength ::= ENUMERATED [len1] | +-ue-TimersAndConstants ::= SEQUENCE | | +-t300 ::= ENUMERATED [ms1000] | | +-t301 ::= ENUMERATED [ms1000] | | +-t310 ::= ENUMERATED [ms1000] | | +-n310 ::= ENUMERATED [n1] | | +-t311 ::= ENUMERATED [ms1000] | | +-n311 ::= ENUMERATED [n1] | +-freqInfo ::= SEQUENCE  | | +-ul-CarrierFreq ::= INTEGER OPTIONAL:Omit | | +-ul-Bandwidth ::= ENUMERATED OPTIONAL:Omit | | +-additionalSpectrumEmission ::= INTEGER (1..32)  | +-mbsfn-SubframeConfigList ::= SEQUENCE OF OPTIONAL:Omit | +-timeAlignmentTimerCommon ::= ENUMERATED [sf750] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

这两个步骤是 UE 第一次发送任何东西。在此之前它只是监听,所以网络并不知道它存在,UE 也没有上行定时。RACH 一次把两者都解决,下图跟踪了一次从前导码到响应的交互。

我认为这两个步骤用下图总结最为合适。细节请参阅 RACH_LTE。

UE 与 eNB 之间的 RACH 流程,含前导码与随机接入响应的解码,把 PreambleIndex 15 与 RAPID 15 对应起来

图注:UE 与 eNB 之间的 RACH 流程,含前导码与随机接入响应的解码,把 PreambleIndex 15 与 RAPID 15 对应起来

图右侧那两段解码值得逐字段来看,因为合起来正好展示了让该响应可用的那一次比对。上方框中 UE 发送了 PreambleIndex 15;下方框中随机接入响应携带 RAPID 15,图中用虚线把两者连了起来。

这次匹配就是整个检查。随机接入响应是按 RA-RNTI 寻址的,图中该标识由前导码的时频位置推得,因此凡是用了该时频位置的 UE 都会读到同一条消息。每个 UE 都把自己发送的前导码与 RAPID 做比较,只有发现自己的索引的那个 UE 才会把这份授权当作自己的。紧挨其上方取值为 1 的 T 字段,正是用来标明该子头携带的是 RAPID 而不是退避值。

下方框的其余部分就是授权本身。RARGrant 给出该 UE 下次发送可用的上行资源,本次抓包中 RIV 为 250、Truncated-MCS 为 8。T-C-RNTI FFF2 是 UE 在竞争解决完成之前使用的临时标识。

  • RAPID 必须等于 UE 发送的前导码:抓包中 PreambleIndex 15 由 RAPID 15 应答,UE 正是靠这一点知道该响应是给自己的。
  • 一条响应可以被多个 UE 读到:RAR 是按 RA-RNTI 而不是按某个 UE 寻址的,因此区分它们靠的是 RAPID 比对。
  • 响应同时携带授权与临时标识:RARGrant 给出上行资源,T-C-RNTI 给出在竞争解决结束前使用的标识。 从这里开始,L3 消息同时承载 RRC 与 NAS 消息。因此你不仅需要了解 RRC 消息,还需要对 NAS 消息有整体把握。

要处理 NAS 消息中与数据业务相关的 IE,你需要吃透 TS 29.274 的全部细节。当然,一天之内把这些细节全搞明白是不可能的。我的做法是尽可能反复过下面这些表格,直到脑子里形成整体图景。你可能需要在 36.331 与 29.274 之间来回对照。

  • 表 7.2.2-1:Create Session Response 中的信息元素
  • 表 7.2.3-1:Create Bearer Request 中的信息元素
  • 表 7.2.3-2:Create Bearer Request 中的承载上下文
  • 表 7.2.5-1:Bearer Resource Command 中的信息元素
  • 表 7.2.7-1:Modify Bearer Request 中的信息元素
  • 表 7.2.8-1:Modify Bearer Response 中的信息元素
  • 表 7.2.9.1-1:Delete Session Request 中的信息元素
  • 表 7.2.9.2-1:Delete Bearer Request 中的信息元素
  • 表 7.2.10.2-1:Delete Bearer Response 中的信息元素
  • 表 7.3.5-1:Context Request 中的信息元素
  • 表 7.3.6-2:Context Response 中的 MME/SGSN UE EPS PDN 连接
  • 表 7.3.8-1:Identification Request 中的信息元素 「RRC Connection Request」与「RRC Connection Setup」两个过程可以用下图概括。细节请参阅 RACH_LTE.html。(框图中显示的消息内容只是示例。你在自己设备与网络上看到的 HEX 数组会与这里不同,但整体结构应当相似。)

UE 与 eNB 之间的 RACH 流程,含 RRC Connection Request 与 RRC Connection Setup 的解码,显示用于竞争解决的六个身份字节被回显

图注:UE 与 eNB 之间的 RACH 流程,含 RRC Connection Request 与 RRC Connection Setup 的解码,显示用于竞争解决的六个身份字节被回显

注:本示例展示的是竞争解决与 RRC Connection Setup 在一步中同时发送的情形,但竞争解决与 RRC Connection Setup 消息也完全可能作为两个独立过程发送。

图中下方那段解码就是竞争解决发生的地方,而体现它的细节很小。请看 RRC Connection Setup 消息的前六个字节:53 01 E0 E6 D3 D6。这六个字节与它上方 RRC Connection Request 开头的六个字节完全相同,图中的标注把它们称为用于竞争解决的 UE ID。

这次回显就是机制本身。两个 UE 可能在同一时隙选了同一个前导码、读到同一条随机接入响应,并在同一份授权上各自发送自己的 RRC Connection Request。最终只有一个能留下,网络通过把其中一份请求逐字节原样回送来确定胜者。没看到自己那几个字节被回送的 UE 就知道自己输了,于是重新开始该过程。

本次抓包中的身份是 randomValue 而不是 S-TMSI,这是没有任何存储信息的 UE 不得不采用的形式。这里的 establishmentCause 是 mo-Signalling;本页稍后的第二遍会展示同一字段改为携带 mo-Data 或 mt-Access 的情形。

  • 竞争解决会回显请求:Connection Request 开头的那六个字节 53 01 E0 E6 D3 D6 会在 Setup 的开头被回送。
  • 落败是静默的:没看到自己身份被回送的 UE 只是重新开始该过程。
  • 无存储信息时 ue-Identity 是随机值:已注册的 UE 改为发送自己的 S-TMSI,第二遍会展示这一点。 如下图所示,RRC Connection Setup 消息中最重要的 IE(信息元素)是「RadioResourceConfigDedicated」,在其下可以建立 SRB、DRB、MAC 与 PHY 配置。尽管其中也有与 DRB 相关的 IE,但在大多数情况下,我们在 RRC Connection Setup 中只建立 SRB。这与 WCDMA 的 RRC Connection setup 消息类似:即使其中有面向 RB(数据业务)的 IE,通常也只建立 SRB(控制信道部分)。

有一点必须注意:「RadioResourceConfigDedicated」IE 不仅出现在 RRC Connection Setup 消息中,也出现在 RRC Connection Reconfiguration 消息中。这种情况下你必须小心,使你在 RRC Connection Reconfig 消息中设置的内容与在 RRC Connection Setup 消息中设置的内容正确匹配。这意味着你必须非常清楚地理解 RRC Connection Setup 消息与 RRC Connection Reconfig 消息之间的对应关系。这一点也与 WCDMA 的情形非常相似。

RRC Connection Setup 的树形结构,显示 RadioResourceConfigDedicated 及其子节点,其中 PhysicalConfigDedicated 展开为六个子配置

图注:RRC Connection Setup 的树形结构,显示 RadioResourceConfigDedicated 及其子节点,其中 PhysicalConfigDedicated 展开为六个子配置

RRC Connection Setup 的一个示例如下。从下面的内容可以看到,RRC Connection Setup 消息的主要目的是指定 SRB 0 与 SRB 1 承载的 MAC/RLC/PHY 设置。因此如果这条消息出错,网络或 UE 将无法解码此消息之后的消息。

尤其是 PhysicalConfigDedicated 部分,你必须格外小心。如果在「RRC Connection Setup」之后出现下列问题之一,首先要检查的就是 PhysicalConfigDedicated。(你需要检查所有详细参数,确认 UE 正确解码了这些信息并据此正确配置了自身。)

  • i) PUSCH 出现 CRC 错误
  • ii) UE 日志显示它发送了 PUSCH,但网络日志中没有任何 PUSCH,甚至连 CRC 错误也没有 < DL-CCCH-Message > decoded message capture. Field values come from a live capture, not from the specification.
DL-CCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionSetup] +-rrcConnectionSetup ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionSetup-r8] +-rrcConnectionSetup-r8 ::= SEQUENCE  +-radioResourceConfigDedicated ::= SEQUENCE  | +-srb-ToAddModList ::= SEQUENCE OF SIZE(1..2)  OPTIONAL:Exist | | +-SRB-ToAddMod ::= SEQUENCE  | | +-srb-Identity ::= INTEGER (1..2)  | | +-rlc-Config ::= CHOICE [defaultValue] OPTIONAL:Exist | | | +-defaultValue ::= NULL | | +-logicalChannelConfig ::= CHOICE [defaultValue] OPTIONAL:Exist | | +-defaultValue ::= NULL | +-drb-ToAddModList ::= SEQUENCE OF OPTIONAL:Omit | +-drb-ToReleaseList ::= SEQUENCE OF OPTIONAL:Omit | +-mac-MainConfig ::= CHOICE [explicitValue] OPTIONAL:Exist | | +-explicitValue ::= SEQUENCE  | | +-ul-SCH-Config ::= SEQUENCE  OPTIONAL:Exist | | | +-maxHARQ-Tx ::= ENUMERATED [n5] OPTIONAL:Exist | | | +-periodicBSR-Timer ::= ENUMERATED [sf20] OPTIONAL:Exist | | | +-retxBSR-Timer ::= ENUMERATED [sf320] | | | +-ttiBundling ::= BOOLEAN [FALSE] | | +-drx-Config ::= CHOICE [release] OPTIONAL:Exist | | | +-release ::= NULL | | +-timeAlignmentTimerDedicated ::= ENUMERATED [infinity] | | +-phr-Config ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-periodicPHR-Timer ::= ENUMERATED [sf500] | | +-prohibitPHR-Timer ::= ENUMERATED [sf200] | | +-dl-PathlossChange ::= ENUMERATED [dB3] | +-sps-Config ::= SEQUENCE OPTIONAL:Omit | +-physicalConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | +-pdsch-ConfigDedicated ::= SEQUENCE OPTIONAL:Exist | | +-p-a ::= ENUMERATED [dB-3] | +-pucch-ConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | | +-ackNackRepetition ::= CHOICE [release] | | | +-release ::= NULL | | +-tdd-AckNackFeedbackMode ::= ENUMERATED OPTIONAL:Omit | +-pusch-ConfigDedicated ::= SEQUENCE OPTIONAL:Exist | | +-betaOffset-ACK-Index ::= INTEGER (0..15)  | | +-betaOffset-RI-Index ::= INTEGER (0..15)  | | +-betaOffset-CQI-Index ::= INTEGER (0..15)  | +-uplinkPowerControlDedicated ::= SEQUENCE  OPTIONAL:Exist | | +-p0-UE-PUSCH ::= INTEGER (-8..7)  | | +-deltaMCS-Enabled ::= ENUMERATED [en0] | | +-accumulationEnabled ::= BOOLEAN [TRUE] | | +-p0-UE-PUCCH ::= INTEGER (-8..7)  | | +-pSRS-Offset ::= INTEGER (0..15)  | | +-filterCoefficient ::= ENUMERATED [fc4] OPTIONAL:Exist | +-tpc-PDCCH-ConfigPUCCH ::= CHOICE OPTIONAL:Omit | +-tpc-PDCCH-ConfigPUSCH ::= CHOICE OPTIONAL:Omit | +-cqi-ReportConfig ::= SEQUENCE  OPTIONAL:Exist | | +-cqi-ReportModeAperiodic ::= ENUMERATED [rm30] OPTIONAL:Exist | | +-nomPDSCH-RS-EPRE-Offset ::= INTEGER (-1..6)  | | +-cqi-ReportPeriodic ::= CHOICE OPTIONAL:Omit | +-soundingRS-UL-ConfigDedicated ::= CHOICE OPTIONAL:Omit | +-antennaInfo ::= CHOICE [defaultValue] OPTIONAL:Exist | | +-defaultValue ::= NULL | +-schedulingRequestConfig ::= CHOICE [setup] OPTIONAL:Exist | +-setup ::= SEQUENCE | +-sr-PUCCH-ResourceIndex ::= INTEGER (0..2047)  | +-sr-ConfigIndex ::= INTEGER (0..155)  | +-dsr-TransMax ::= ENUMERATED [n4] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

注 1

+-pdsch-ConfigDedicated ::= SEQUENCE OPTIONAL:Exist

| +-p-a ::= ENUMERATED [dB-3]

:发送功率按 3GPP TS36.213 第 5.2 节,由参考信号功率以及本过程所指定的 P_A、P_B 参数值计算得出。这些参数设定了有 RS 与无 RS 的符号之间的 PDSCH 发送功率差。

该值设置不当会导致 UE 侧 PDSCH 接收出现大量 CRC 错误,进而使 UE 发出大量 HARQ NACK。

注 2

如果你看到 SRB-ToAddMod IE,会看到若干 Default Value。这是什么意思?

36.331 的下面两节会给你答案。

  • 9.1.2 SRB 配置
  • 9.2 默认无线配置 这一步是初始注册过程中非常重要的步骤之一,主要是因为 UE 会把自己大量的能力信息(尤其是 NAS 层能力信息)发送给核心网。

树形结构,显示 RRC Connection Setup Complete 在 DedicatedInfoNAS 中携带 Attach Request,而 Attach Request 又在 ESM Message Container 中携带 PDN Connectivity Request

图注:树形结构,显示 RRC Connection Setup Complete 在 DedicatedInfoNAS 中携带 Attach Request,而 Attach Request 又在 ESM Message Container 中携带 PDN Connectivity Request

如你所见,这一步携带两条重要的 NAS 消息,如下所述。

NAS:Attach Request —— 该消息承载的最重要信息是 UE 在加密与完整性方面的能力。如果你没有依据这些信息正确执行后续步骤(尤其是 Attach accept 步骤),UE 将注册失败。更麻烦的是,注册失败的表现形式会随 UE 协议栈实现而异,因此很多情况下很难找到问题的根因。

  • 要点:NAS : Attach Request ESM:PDN Connectivity Request —— 该消息中信息量最大的是协议配置选项(PCO)。由此可以看出 UE 支持或希望获得哪些分组业务。如果你没有正确处理这些信息,同样会导致注册失败,而失败表现也会因 UE 实现而异。

  • 要点:ESM : PDN Connectivity Request < Attach request > decoded message capture. Field values come from a live capture, not from the specification.

Attach request ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Attach request message identity ::= V | +-Message type ::= MSG  +-NAS key set identifier ::= V | +-TSC ::= CHOICE [native security context (for KSI ASME)] | +-NAS key set identifier ::= CHOICE [possible values for the NAS key set identifier 1] +-EPS attach type ::= V | +-Spare ::= FIX  | +-EPS attach type value ::= CHOICE [EPS attach] +-Old GUTI or IMSI ::= LV | +-Octet1 ::= DIVISION | | +-Length of EPS mobile identity contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-Spare ::= FIX [F] | | +-Odd/even indication ::= CHOICE [even number of identity digits and also when the GUTI is used] | | +-Type of identity ::= CHOICE [GUTI] | +-Octet3 ::= DIVISION | | +-MCC digit 2 ::= INT (0..15)  | | +-MCC digit 1 ::= INT (0..15)  | +-Octet4 ::= DIVISION | | +-MNC digit 3 ::= INT (0..15)  | | +-MCC digit 3 ::= INT (0..15)  | +-Octet5 ::= DIVISION | | +-MNC digit 2 ::= INT (0..15)  | | +-MNC digit 1 ::= INT (0..15)  | +-Octet6 ::= DIVISION | | +-MME Group ID ::= INT (0..255)  | +-Octet7 ::= DIVISION | | +-MME Group ID(continued) ::= INT (0..255)  | +-Octet8 ::= DIVISION | | +-MME Code ::= INT (0..255)  | +-Octet9 ::= DIVISION | | +-M-TMSI ::= INT (0..255)  | +-Octet10 ::= DIVISION | | +-M-TMSI(continued) ::= INT (0..255)  | +-Octet11 ::= DIVISION | | +-M-TMSI(continued) ::= INT (0..255)  | +-Octet12 ::= DIVISION | +-M-TMSI(continued) ::= INT (0..255)  +-UE network capability ::= LV | +-Octet1 ::= DIVISION | | +-Length of UE network capability contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-EEA0 ::= CHOICE [EPS encryption algorithm EEA0 supported] | | +-128-EEA1 ::= CHOICE [EPS encryption algorithm 128-EEA1 supported] | | +-128-EEA2 ::= CHOICE [EPS encryption algorithm 128-EEA2 supported] | | +-EEA3 ::= CHOICE [EPS encryption algorithm EEA3 not supported] | | +-EEA4 ::= CHOICE [EPS encryption algorithm EEA4 not supported] | | +-EEA5 ::= CHOICE [EPS encryption algorithm EEA5 not supported] | | +-EEA6 ::= CHOICE [EPS encryption algorithm EEA6 not supported] | | +-EEA7 ::= CHOICE [EPS encryption algorithm EEA7 not supported] | +-Octet3 ::= DIVISION | | +-spare ::= FIX  | | +-128-EIA1 ::= CHOICE [EPS integrity algorithm 128-EIA1 supported] | | +-128-EIA2 ::= CHOICE [EPS integrity algorithm 128-EIA2 supported] | | +-EIA3 ::= CHOICE [EPS integrity algorithm EIA3 not supported] | | +-EIA4 ::= CHOICE [EPS integrity algorithm EIA4 not supported] | | +-EIA5 ::= CHOICE [EPS integrity algorithm EIA5 not supported] | | +-EIA6 ::= CHOICE [EPS integrity algorithm EIA6 not supported] | | +-EIA7 ::= CHOICE [EPS integrity algorithm EIA7 not supported] | +-Octet4 ::= DIVISION | | +-UEA0 ::= CHOICE [UMTS encryption algorithm UEA0 not supported] | | +-UEA1 ::= CHOICE [UMTS encryption algorithm UEA1 not supported] | | +-UEA2 ::= CHOICE [UMTS encryption algorithm UEA2 not supported] | | +-UEA3 ::= CHOICE [UMTS encryption algorithm UEA3 not supported] | | +-UEA4 ::= CHOICE [UMTS encryption algorithm UEA4 not supported] | | +-UEA5 ::= CHOICE [UMTS encryption algorithm UEA5 not supported] | | +-UEA6 ::= CHOICE [UMTS encryption algorithm UEA6 not supported] | | +-UEA7 ::= CHOICE [UMTS encryption algorithm UEA7 not supported] | +-Octet5 ::= DIVISION | | +-UCS2 ::= CHOICE [The UE has a preference for the default alphabet (defined in 3GPP TS 23.038 ) over UCS2 (see ISO/IEC 10646 )] | | +-UIA1 ::= CHOICE [UMTS integrity algorithm UIA1 not supported] | | +-UIA2 ::= CHOICE [UMTS integrity algorithm UIA2 not supported] | | +-UIA3 ::= CHOICE [UMTS integrity algorithm UIA3 not supported] | | +-UIA4 ::= CHOICE [UMTS integrity algorithm UIA4 not supported] | | +-UIA5 ::= CHOICE [UMTS integrity algorithm UIA5 not supported] | | +-UIA6 ::= CHOICE [UMTS integrity algorithm UIA6 not supported] | | +-UIA7 ::= CHOICE [UMTS integrity algorithm UIA7 not supported] | +-Octet6 ::= DIVISION | | +-spare ::= FIX  | | +-1xSRVCC ::= CHOICE [SRVCC from E-UTRAN to cdma2000 1xCS not supported] | | +-spare ::= FIX  | +-Octet7-14 ::= DIVISION | +-Spare ::= OCTETARRAY SIZE(0..8)  +-ESM message container ::= LV-E | +-Octet1-Octet2 ::= DIVISION | | +-Length of ESM message container ::= LEN (0..65535)  | +-Octet3- ::= DIVISION | +-ESM message container contents ::= OCTETARRAY SIZE(0..65535) [0201D031D1271080000100000300000A00000C00000D00] +-Old P-TMSI signature ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-P-TMSI signature IEI ::= IEI  | +-Octet2-4 ::= DIVISION | +-P-TMSI signature value ::= INT (0..16777215)  +-Additional GUTI ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-EPS mobile identity IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of mobile identity IEI ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-Identity digit 1 ::= INT (0..15)  | | +-Odd/even indication ::= CHOICE [even number of identity digits and also when the GUTI is used] | | +-Type of identity ::= CHOICE [IMSI] | +-Octet4 ::= DIVISION | +-Identity digit p ::= OCTETARRAY SIZE(0..10) +-Last visited registered TAI ::= TV OPTIONAL:Exist | +-Octet1 ::= DIVISION | | +-Tracking area identity IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-MCC digit 2 ::= INT (0..15)  | | +-MCC digit 1 ::= INT (0..15)  | +-Octet3 ::= DIVISION | | +-MNC digit 3 ::= INT (0..15)  | | +-MCC digit 3 ::= INT (0..15)  | +-Octet4 ::= DIVISION | | +-MNC digit 2 ::= INT (0..15)  | | +-MNC digit 1 ::= INT (0..15)  | +-Octet5 ::= DIVISION | | +-TAC ::= INT (0..255)  | +-Octet6 ::= DIVISION | +-TAC(continued) ::= INT (0..255)  +-DRX parameter ::= TV OPTIONAL:Omit +-MS network capability ::= TLV OPTIONAL:Omit +-Old location area identification ::= TV OPTIONAL:Omit +-TMSI status ::= TV OPTIONAL:Omit +-Mobile Station Classmark 2 ::= TLV OPTIONAL:Omit +-Mobile Station Classmark 3 ::= TLV OPTIONAL:Omit +-Supported Codecs ::= TLV OPTIONAL:Omit

如果解码 ESM message container contents 部分,会得到如下内容。

< PDN connectivity request > decoded message capture. Field values come from a live capture, not from the specification.

NAS_LTE:ESM,PDN connectivity request PDN connectivity request ::= DIVISION +-EPS bearer identity ::= V | +-EPS bearer identity value ::= CHOICE [No EPS bearer identity assigned] +-EPS session management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Procedure transaction identity ::= V | +-Procedure transaction identity ::= CHOICE [Procedure transaction identity value 1] +-PDN connectivity request message identity ::= V | +-Message type ::= MSG [D0] +-PDN type ::= V | +-spare ::= FIX  | +-PDN type value ::= CHOICE [IPv4v6] +-Request type ::= V | +-Spare ::= FIX  | +-Request type value ::= CHOICE [initial request] +-ESM information transfer flag ::= TV OPTIONAL:Exist | +-Octet1 ::= DIVISION | +-ESM information transfer flag IEI ::= IEI [D-] | +-spare ::= FIX  | +-EIT value ::= CHOICE [security protected ESM information transfer required] +-Access point name ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Access point name IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of access point name contents ::= LEN (0..255)  | +-Octet3-Octet102 ::= DIVISION | +-Access point name value ::= OCTETARRAY SIZE(0..100) +-Protocol configuration options ::= TLV OPTIONAL:Exist +-Octet1 ::= DIVISION | +-Protocol configuration options IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of protocol config options contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-ext ::= EXT1  | +-spare ::= FIX  | +-Configuration protocol ::= CHOICE [PPP for use with IP PDP type] +-Octet4-Octet253 ::= DIVISION +-protocol config options contents ::= OCTETARRAY SIZE(0..250) [000100000300000A00000C00000D00]

这条消息中有若干重要信息,如下所述。

ESM information transfer flag:根据 36.508 的表 4.5.2.3-1(UE 注册过程,状态 1 到状态 2)中的步骤 9a1,网络必须按下述流程走一次 ESM:Information Request。

  • 要点:ESM information transfer flag 如果 UE 在上一条 PDN CONNECTIVITY REQUEST 消息中设置了 ESM information transfer flag,那么 SS 会发送一条 ESM INFORMATION REQUEST 消息,以启动协议配置选项和/或 APN 的交换。

PDN Type:指明 UE 希望 EPS 承载使用的 IP 版本,而网络在 Default(或 Dedicated)EPS Bearer Context Request 中可能使用、也可能不使用相同的 IP 版本。有些 UE 会接受网络在 EPS 承载建立步骤中指定的任何 IP 版本;但另一些 UE,如果网络在 Default(或 Dedicated)EPS Bearer Context Request 中指定的 IP 版本与本消息中的 PDN type 不一致,就会建立 EPS 承载失败。

  • 要点:PDN Type Access Point Name:围绕这个 APN 名称,UE 会表现出许多不同的行为。以下是我在几款不同设备上观察到的一些行为。

  • 要点:Access Point Name

  • i) UE 在这里不指定任何 APN,并接受网络在 Activate Default EPS Bearer Context Request 中指定的任何 APN。

  • ii) UE 在这里指定了某个 APN,但仍接受网络在 Activate Default EPS Bearer Context Request 中指定的任何 APN。

  • iii) UE 在这里指定了某个 APN,如果网络在 Activate Default EPS Bearer Context Request 中指定的 APN 与它在这里指定的不同,就拒绝该 APN。 Protocol Configuration Options:详细内容可参见 TS24_008 第 10.5.6.3 节「Protocol configuration options」,可概括如下。

  • 要点:Protocol Configuration Options 这是一个相当复杂的话题,因此我另写一篇专门说明。

这一步是网络第一次向 UE 发起质询。在此之前的一切都是配置,双方都可以是任何一方。Authentication Request 终结了这种状态。这条消息本身很短,因为几乎全部工作都在它到达之后于 USIM 内部完成。

它作为 NAS 载荷封装在 RRC DL Information Transfer 中传输,这是连接一旦建立后每条 NAS 消息都遵循的模式。RRC 只负责搬运这些字节,从不解读它们。

其中有三个值很关键。RAND 是随机挑战。AUTN 是 UE 在应答之前要校验的鉴权令牌,正是它让鉴权成为双向的,而不是单向的。KSI_ASME 是本次运行将要产生的安全上下文的简短标签,使后续过程可以直接引用该上下文,而不必重复这次交互。

UE 不会立刻应答。它把 RAND 与 AUTN 交给 USIM,USIM 在计算任何东西之前先校验 AUTN,只有 AUTN 有效才会产生下一步回送的 RES。Authentication 完整描述了这一校验,Authentication Failure 则描述了 UE 校验失败时所发送的内容。

  • NAS 搭载在 RRC 之内:由 DL Information Transfer 承载字节,RRC 从不解释它们。
  • RAND 与 AUTN 一同传输:挑战与 UE 用来校验网络的那个令牌在同一条消息中到达。
  • UE 先校验再应答:USIM 先检查 AUTN,因此校验失败时发出的是失败消息而不是 RES。 「鉴权」过程类似于你使用计算机时的「登录」过程。在 C2K 与 GSM 中,这个鉴权过程是「单向」的,即只有网络鉴权 UE,UE 并不鉴权网络。不难想到,这会造成严重的安全问题。如果我搭一个接受任何 UE 的假网络,就可以骗 UE 驻留到这个假网络上,而不是它本应驻留的网络。(不过这种「单向」鉴权倒是让用网络模拟器测试 UE 变得非常轻松 -:)

为解决这一安全问题,LTE(以及 WCDMA)采用「双向」鉴权,即 UE 必须通过鉴权过程,网络同样必须通过该过程。

整体鉴权过程如下。

UE 与网络之间的鉴权呼叫流程,Authentication Request 携带 RAND 与 AUTN,Authentication Response 携带 RES

图注:UE 与网络之间的鉴权呼叫流程,Authentication Request 携带 RAND 与 AUTN,Authentication Response 携带 RES

这个鉴权过程包含三个主要组成部分:

  • i) 输入参数
  • ii) 鉴权算法
  • iii) 输出值(由鉴权算法使用输入参数计算得到) UE 与网络使用相同的输入参数和相同的鉴权算法,因此双方应当产生相同的输出值,否则鉴权失败。

必须记住一点:UE 与网络之间只交换输入参数与输出值,不交换鉴权算法。UE 侧的鉴权算法存放在 USIM 中,网络侧的鉴权算法存放在鉴权中心(Authentication Center)中。双方只是假设自己使用的是完全相同的算法。

通常测试用与实网用的鉴权算法不同。测试中最常用的是我们常说的「Dummy XOR」算法,定义在 36.508 第 4.9 节(LTE 通用测试 USIM 参数)与 34.408 第 8 节(WCDMA 测试 USIM 参数)中。

据我所知,实网中最常用的是 Milenage 算法。

Authentication Request 与 Authentication Response 的一个示例如下。你会注意到 RAND、AUTN 由 Authentication Request 消息携带,而 RES 值由 Authentication Response 携带。

NAS_LTE:EMM,Authentication request

< Authentication request > decoded message capture. Field values come from a live capture, not from the specification.

Authentication request ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Authentication request message type ::= V | +-Message type ::= MSG  +-Spare half octet ::= V | +-Spare half octet ::= FIX  +-NAS key set identifier ASME ::= V | +-TSC ::= CHOICE [native security context (for KSI ASME)] | +-NAS key set identifier ::= CHOICE [possible values for the NAS key set identifier 0] +-Authentication parameter RAND ::= V | +-Octet1-Octet16 ::= DIVISION | +-RAND value ::= OCTETARRAY SIZE(16..16) [A3DE0C6D363E30C364A4078F1BF8D577] +-Authentication parameter AUTN ::= LV +-Octet1 ::= DIVISION | +-Length of AUTN contents ::= LEN (0..255)  +-Octet2-Octet17 ::= DIVISION +-AUTN ::= OCTETARRAY SIZE(0..16) [5E726B56B4EC9001A3CF2E5E726BC6B5]

NAS_LTE:EMM,Authentication response

< Authentication response > decoded message capture. Field values come from a live capture, not from the specification.

Authentication response ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Authentication response message identity ::= V | +-Message type ::= MSG  +-Authentication response parameter ::= LV +-Octet1 ::= DIVISION | +-Length of Authentication response parameter contents ::= LEN (0..255)  +-Octet2-17 ::= DIVISION +-RES ::= OCTETARRAY SIZE(0..16) [A3CF2E5E726B56B4]

鉴权确认了双方各自身份,但并未开启任何保护,此前每条消息都是明文传输的。这一步就是 NAS 侧开始改变的节点,而该命令是直接指明算法,而不是协商算法。

Security Mode Command 消息用于告知 UE 以下信息(指令)。

  • i) 我(网络)支持这些加密(ciphering)算法
  • ii) 我(网络)支持这些完整性算法
  • iii) 在我支持的加密算法中,与你的通信我将使用「这一特定算法」
  • iv) 在我支持的完整性算法中,与你的通信我将使用「这一特定算法」 在 LTE 中,NAS 与 RRC 使用各自独立的安全模式过程;而在 WCDMA 中只有一个安全模式过程(仅针对 RRC,NAS 因为嵌入在 RRC 消息中而作为其一部分被间接保护)。图中蓝色标记的部分对应上面第 i)、ii) 项,红色标记的部分对应第 iii)、iv) 项。

NAS_LTE:EMM,Security mode command

< Security mode command > decoded message capture. Field values come from a live capture, not from the specification.

Security mode command ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Security mode command message identity ::= V | +-Message type ::= MSG [5D] +-Selected NAS security algorithms ::= V | +-Octet1 ::= DIVISION | +-spare ::= FIX  | +-Type of ciphering algorithm ::= CHOICE [EPS encryption algorithm EEA0(ciphering not used)] | +-spare ::= FIX  | +-Type of integrity protection algorithm ::= CHOICE [Reserved 0] +-Spare half octet ::= V | +-Spare half octet ::= FIX  +-NAS key set identifier ::= V | +-TSC ::= CHOICE [native security context (for KSI ASME)] | +-NAS key set identifier ::= CHOICE [possible values for the NAS key set identifier 0] +-Replayed UE security capabilities ::= LV | +-Octet1 ::= DIVISION | | +-Length of UE security capability contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-EEA0 ::= CHOICE [EPS encryption algorithm EEA0 supported] | | +-128-EEA1 ::= CHOICE [EPS encryption algorithm 128-EEA1 supported] | | +-128-EEA2 ::= CHOICE [EPS encryption algorithm 128-EEA2 supported] | | +-EEA3 ::= CHOICE [EPS encryption algorithm EEA3 not supported] | | +-EEA4 ::= CHOICE [EPS encryption algorithm EEA4 not supported] | | +-EEA5 ::= CHOICE [EPS encryption algorithm EEA5 not supported] | | +-EEA6 ::= CHOICE [EPS encryption algorithm EEA6 not supported] | | +-EEA7 ::= CHOICE [EPS encryption algorithm EEA7 not supported] | +-Octet3 ::= DIVISION | | +-spare ::= FIX  | | +-128-EIA1 ::= CHOICE [EPS integrity algorithm 128-EIA1 supported] | | +-128-EIA2 ::= CHOICE [EPS integrity algorithm 128-EIA2 supported] | | +-EIA3 ::= CHOICE [EPS integrity algorithm EIA3 not supported] | | +-EIA4 ::= CHOICE [EPS integrity algorithm EIA4 not supported] | | +-EIA5 ::= CHOICE [EPS integrity algorithm EIA5 not supported] | | +-EIA6 ::= CHOICE [EPS integrity algorithm EIA6 not supported] | | +-EIA7 ::= CHOICE [EPS integrity algorithm EIA7 not supported] | +-Octet4 ::= DIVISION | | +-UEA0 ::= CHOICE [UMTS encryption algorithm UEA0 not supported] | | +-UEA1 ::= CHOICE [UMTS encryption algorithm UEA1 not supported] | | +-UEA2 ::= CHOICE [UMTS encryption algorithm UEA2 not supported] | | +-UEA3 ::= CHOICE [UMTS encryption algorithm UEA3 not supported] | | +-UEA4 ::= CHOICE [UMTS encryption algorithm UEA4 not supported] | | +-UEA5 ::= CHOICE [UMTS encryption algorithm UEA5 not supported] | | +-UEA6 ::= CHOICE [UMTS encryption algorithm UEA6 not supported] | | +-UEA7 ::= CHOICE [UMTS encryption algorithm UEA7 not supported] | +-Octet5 ::= DIVISION | | +-spare ::= FIX  | | +-UIA1 ::= CHOICE [UMTS integrity algorithm UIA1 not supported] | | +-UIA2 ::= CHOICE [UMTS integrity algorithm UIA2 not supported] | | +-UIA3 ::= CHOICE [UMTS integrity algorithm UIA3 not supported] | | +-UIA4 ::= CHOICE [UMTS integrity algorithm UIA4 not supported] | | +-UIA5 ::= CHOICE [UMTS integrity algorithm UIA5 not supported] | | +-UIA6 ::= CHOICE [UMTS integrity algorithm UIA6 not supported] | | +-UIA7 ::= CHOICE [UMTS integrity algorithm UIA7 not supported] | +-Octet6 ::= DIVISION | +-spare ::= FIX  | +-GEA1 ::= CHOICE [GPRS encryption algorithm GEA1 not supported] | +-GEA2 ::= CHOICE [GPRS encryption algorithm GEA2 not supported] | +-GEA3 ::= CHOICE [GPRS encryption algorithm GEA3 not supported] | +-GEA4 ::= CHOICE [GPRS encryption algorithm GEA4 not supported] | +-GEA5 ::= CHOICE [GPRS encryption algorithm GEA5 not supported] | +-GEA6 ::= CHOICE [GPRS encryption algorithm GEA6 not supported] | +-GEA7 ::= CHOICE [GPRS encryption algorithm GEA7 not supported] +-IMEISV request ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | +-IMEISV request IEI ::= IEI [C-] | +-spare ::= FIX  | +-IMEISV request value ::= CHOICE [IMEISV not requested] +-Replayed nonce UE ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Nonce IEI ::= IEI  | +-Octet2-Octet5 ::= DIVISION | +-Nonce value ::= OCTETARRAY SIZE(4..4)  +-Nonce MME ::= TV OPTIONAL:Omit +-Octet1 ::= DIVISION | +-Nonce IEI ::= IEI  +-Octet2-Octet5 ::= DIVISION +-Nonce value ::= OCTETARRAY SIZE(4..4)

Security Mode Complete 是对「Security Mode Command」消息的应答,因此很简单。如果 UE 也支持网络想要使用的完整性/安全算法,它发送「Security Mode Complete」;如果不支持,则发送「Security Mode Failure」。

NAS_LTE:EMM,Security mode complete

< Security mode complete > decoded message capture. Field values come from a live capture, not from the specification.

Security mode complete ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Security mode complete message identity ::= V | +-Message type ::= MSG [5E] +-IMEISV ::= TLV OPTIONAL:Omit +-Octet1 ::= DIVISION | +-Mobile Identity IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of mobile identity contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-Identity digit 1 ::= INT (0..15)  | +-Odd/even indication ::= CHOICE [even number of identity digits and also when the TMSI/P-TMSI is used] | +-Type of identity ::= CHOICE [No Identity] +-Octet4-Octet11 ::= DIVISION +-Identity digit p ::= OCTETARRAY SIZE(0..8)

本次抓包中有两个细节值得注意。这条消息很短,因为它是「同意」而不是「协商」,所以 UE 要么接受该命令指定的算法,要么改用 Security Mode Reject 应答。另外,这是上行方向上第一条受完整性保护的 NAS 消息,使用的是该命令刚刚启用的密钥。因此推导出错误密钥的 UE 会在这里失败,而不会悄悄继续下去。

  • 完成消息只是同意,不做协商:UE 要么接受该命令指定的算法,要么直接拒绝。
  • 这是 UE 发出的第一条受保护的 NAS 消息:它用该命令激活的密钥做完整性保护,因此密钥不匹配会在这一步暴露出来。 LTE 会跑两遍安全过程,这里是第二遍。上面的 NAS 交互保护的是 UE 与 MME 之间的信令;这一遍保护的是 UE 与 eNB 之间的信令,而且即便算法名称看起来差不多,它使用的密钥也不同。

这一步与 NAS:Security Mode Command 是同一个步骤,区别只在于它仅针对 RRC 消息。

RRC_LTE:DL-DCCH-Message

< DL-DCCH-Message > decoded message capture. Field values come from a live capture, not from the specification.

DL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [securityModeCommand] +-securityModeCommand ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [securityModeCommand-r8] +-securityModeCommand-r8 ::= SEQUENCE  +-securityConfigSMC ::= SEQUENCE | +-securityAlgorithmConfig ::= SEQUENCE | +-cipheringAlgorithm ::= ENUMERATED [eea1] | +-integrityProtAlgorithm ::= ENUMERATED [eia1] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit
  • 加密算法参数请参阅 EEA 页面。

  • 完整性算法参数请参阅 EIA 页面。 密钥才是区分这两个过程的关键。NAS 密钥直接来自 K_ASME,并留在 MME 一侧。RRC 密钥来自 K_eNB,而 K_eNB 由 K_ASME 推导后交给 eNB。因此 eNB 可以在不持有 MME 所用密钥的前提下保护空口。WCDMA 只有一个安全模式过程,因为只有一个节点终结这两者;LTE 拆分成了两个节点,因此也拆分成了两个过程。

  • 两个过程是因为有两个节点:NAS 安全终结于 MME,RRC 安全终结于 eNB。

  • 名称相似但密钥不同:NAS 密钥来自 K_ASME,RRC 密钥来自由它推导出的 K_eNB。 < UL-DCCH-Message > decoded message capture. Field values come from a live capture, not from the specification.

UL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [securityModeComplete] +-securityModeComplete ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [securityModeComplete-r8] +-securityModeComplete-r8 ::= SEQUENCE  +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

从这条消息开始,空口信令就受到保护了。eNB 此时已确认 UE 推导出了与自己相同的 K_eNB,此后该连接上的每条 RRC 消息都用它做完整性保护。这一点在读日志时很重要:一条始终不到达的 Security Mode Complete 通常意味着双方对密钥的认知不一致,而不是对消息本身有分歧。

  • 保护从这里开始:此后该连接上的每条 RRC 消息都受完整性保护。
  • Complete 不到达通常指向密钥:双方往往是对 K_eNB 有分歧,而不是对消息本身。 还有一个失败分支,值得了解它到底做什么,而不只是知道它存在。36.331 规定 UE 对无法应用的命令以 SecurityModeFailure 应答。规范对其后的行为写得很明确:UE 继续使用 SecurityModeCommand 到达之前的配置。因此连接在该失败之后仍然存活,只是处于无保护状态。这也是为什么这里的失败表现为呼叫继续进行然后停滞,而不是立刻掉线。

随着移动业务的种类越来越丰富,网络需要准确掌握 UE 的能力,才能为每个 UE 提供恰当的业务。举例来说,如果网络触发一次到某个不支持该能力的 UE 的跨 RAT 切换,会怎样?结果就是通信中断。

在 WCDMA 中,网络可以在 RRC Connection Setup Complete 消息期间就掌握 UE 能力的全部细节,因为 UE 会在该消息中上报自己能力的全部细节。然而 LTE 的 RRC Connection Setup Complete 消息不携带这类信息。LTE 改为设计了一条专门用于查询 UE 能力的新消息,也就是 UE Capability Enquiry 与 UE Capability Information 消息所承担的角色。

严格来说,这属于可选步骤,但随着 LTE 业务演进,它正变得越来越关键。

以下是 ue-CapabilityRequest 消息的一个示例,它的含义是「上报你全部的 LTE 能力与 UTRA 能力」。

DL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [ueCapabilityEnquiry] +-ueCapabilityEnquiry ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [ueCapabilityEnquiry-r8] +-ueCapabilityEnquiry-r8 ::= SEQUENCE  +-ue-CapabilityRequest ::= SEQUENCE OF SIZE(1..maxRAT-Capabilities)  | +-RAT-Type ::= ENUMERATED [eutra ] | +-RAT-Type ::= ENUMERATED [utra ] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

这条消息是对 UE Capability Request 消息的响应,携带 UE 能力的全部细节。由于它非常复杂且种类繁多,我为 UE Capability Information 单独做了一页。

这条消息之所以这么长,原因值得了解,即便你从不完整读它。它是 UE 声明自己能做什么的唯一场所,网络没有别的来源。频段支持、UE 类别、载波聚合组合以及特性组指示都出现在这里,而网络之后下发的任何配置都必须落在本消息所允许的范围之内。

因此当 UE 拒绝一个看起来完全合法的配置时,这里是第一个该查的地方。如果网络配置了本消息从未声明的某项能力,UE 有权忽略它,而故障的表现会离根因很远。细节请参阅 UE Capability 页面。

  • 它是网络的唯一来源:没有别的东西告诉 eNB 这个 UE 支持什么。
  • 后续配置必须落在它允许的范围内:UE 从未声明的特性可以被忽略,而故障会在离根因很远的地方才显现。 有一个细节解释了为什么这条消息的两次抓包可能看起来差别很大。上面的查询会选定它想要哪些无线接入技术,36.331 在可选项中列出了 eutra、utra、geran-cs、geran-ps 与 cdma2000-1XRTT。响应在 ue-CapabilityRAT-ContainerList 中为每种被请求的技术各带一个容器。只回了一个 EUTRA 容器的 UE 并没有遗漏什么,因为它只被要求了这一项。

这一步是呼叫变得有用的地方。此前的一切都只是在建立信令连接,而这条消息增加了将承载数据的无线承载,同时带回了网络对附着的答复。这就是它成为本页最大一条消息的原因。

这一步执行的一个重要过程是「ESM:Activate Default EPS Bearer Context Request」。

这里你会注意到一件事:在 LTE 中分组呼叫由网络发起,而在 UMTS 中大多数分组呼叫由 UE 发起。网络在这里为 UE 指定一个 IP。

如果你有 WCDMA 协议的经验,可以把这条消息看作「Radio Bearer Setup」+「Attach Accept」+ Activate PDP Context Accept 的合体。

在这一步,UE 从网络获得一个 IP;即使在「RRC connection Release」之后、UE 进入 IDLE 模式,这个 IP 也不会被收回。

树形结构,显示 RRC Connection Reconfiguration 在 DedicatedInfoNAS 中携带 Attach Accept,而 Attach Accept 在 ESM Message 中携带 Activate Default EPS Bearer Request

图注:树形结构,显示 RRC Connection Reconfiguration 在 DedicatedInfoNAS 中携带 Attach Accept,而 Attach Accept 在 ESM Message 中携带 Activate Default EPS Bearer Request

RRC Connection Reconfiguration 的一个示例如下。本页展示的示例来自非常早期的 LTE UE,因此与较新的设备相比可能过于简化。我会持续补充各种不同条件下这条消息的更多示例。

  • 仅 IPv4 的示例 —— RRC Connection Reconfiguration + Attach Complete + Activate Default EPS Bearer Req
  • 仅 IPv6 的示例 —— RRC Connection Reconfiguration + Activate Default EPS Bearer Req
  • 仅 IPv4v6 的示例 —— RRC Connection Reconfiguration + Activate Default EPS Bearer Req 不必试图把所有细节都看透,因为这条消息是 LTE 中最复杂的消息之一。先努力理解整体结构,并把上面的树形图与下面的真实消息对照着看。

要理解这些元素的全部细节大概需要好几个月,所以不必着急。

每当你对上图树形图中某个主题研究得更深入一点,就打开这一节,看看所研究主题下的细节。如果你完全理解了下面展示的所有信息元素,你就可以说自己掌握了 LTE。再次强调,不要试图一次全部搞懂,那只会让你血压升高。只要尽可能多地浏览这些条目,先把整体结构熟悉起来。

DL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionReconfiguration] +-rrcConnectionReconfiguration ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionReconfiguration-r8] +-rrcConnectionReconfiguration-r8 ::= SEQUENCE  +-measConfig ::= SEQUENCE OPTIONAL:Omit +-mobilityControlInfo ::= SEQUENCE OPTIONAL:Omit +-dedicatedInfoNASList ::= SEQUENCE OF SIZE(1..maxDRB)  OPTIONAL:Exist | +-DedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [074201E0060000F1100001002C5201C101091003777777 07616E726974737503636F6D05010A012037270E808021 0A0300000A81060A000001500BF600F11080010100000001] +-radioResourceConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | +-srb-ToAddModList ::= SEQUENCE OF SIZE(1..2)  OPTIONAL:Exist | | +-SRB-ToAddMod ::= SEQUENCE  | | +-srb-Identity ::= INTEGER (1..2)  | | +-rlc-Config ::= CHOICE [defaultValue] OPTIONAL:Exist | | | +-defaultValue ::= NULL | | +-logicalChannelConfig ::= CHOICE [defaultValue] OPTIONAL:Exist | | +-defaultValue ::= NULL | +-drb-ToAddModList ::= SEQUENCE OF SIZE(1..maxDRB)  OPTIONAL:Exist | | +-DRB-ToAddMod ::= SEQUENCE  | | +-eps-BearerIdentity ::= INTEGER (0..15)  OPTIONAL:Exist | | +-drb-Identity ::= INTEGER (1..32)  | | +-pdcp-Config ::= SEQUENCE  OPTIONAL:Exist | | | +-discardTimer ::= ENUMERATED [infinity] OPTIONAL:Exist | | | +-rlc-AM ::= SEQUENCE OPTIONAL:Omit | | | +-rlc-UM ::= SEQUENCE OPTIONAL:Exist | | | | +-pdcp-SN-Size ::= ENUMERATED [len12bits] | | | +-headerCompression ::= CHOICE [notUsed] | | | +-notUsed ::= NULL | | +-rlc-Config ::= CHOICE [um-Bi-Directional] OPTIONAL:Exist | | | +-um-Bi-Directional ::= SEQUENCE | | | +-ul-UM-RLC ::= SEQUENCE | | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | +-dl-UM-RLC ::= SEQUENCE | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | +-t-Reordering ::= ENUMERATED [ms50] | | +-logicalChannelIdentity ::= INTEGER (3..10)  OPTIONAL:Exist | | +-logicalChannelConfig ::= SEQUENCE  OPTIONAL:Exist | | +-ul-SpecificParameters ::= SEQUENCE  OPTIONAL:Exist | | +-priority ::= INTEGER (1..16)  | | +-prioritisedBitRate ::= ENUMERATED [infinity] | | +-bucketSizeDuration ::= ENUMERATED [ms100] | | +-logicalChannelGroup ::= INTEGER (0..3)  OPTIONAL:Exist | +-drb-ToReleaseList ::= SEQUENCE OF OPTIONAL:Omit | +-mac-MainConfig ::= CHOICE [explicitValue] OPTIONAL:Exist | | +-explicitValue ::= SEQUENCE  | | +-ul-SCH-Config ::= SEQUENCE  OPTIONAL:Exist | | | +-maxHARQ-Tx ::= ENUMERATED [n5] OPTIONAL:Exist | | | +-periodicBSR-Timer ::= ENUMERATED [sf20] OPTIONAL:Exist | | | +-retxBSR-Timer ::= ENUMERATED [sf320] | | | +-ttiBundling ::= BOOLEAN [FALSE] | | +-drx-Config ::= CHOICE [release] OPTIONAL:Exist | | | +-release ::= NULL | | +-timeAlignmentTimerDedicated ::= ENUMERATED [infinity] | | +-phr-Config ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-periodicPHR-Timer ::= ENUMERATED [sf500] | | +-prohibitPHR-Timer ::= ENUMERATED [sf200] | | +-dl-PathlossChange ::= ENUMERATED [dB3] | +-sps-Config ::= SEQUENCE OPTIONAL:Omit | +-physicalConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | +-pdsch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-pucch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-pusch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-uplinkPowerControlDedicated ::= SEQUENCE OPTIONAL:Omit | +-tpc-PDCCH-ConfigPUCCH ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-tpc-RNTI ::= BIT STRING SIZE(16)  | | +-tpc-Index ::= CHOICE [indexOfFormat3] | | +-indexOfFormat3 ::= INTEGER (1..15)  | +-tpc-PDCCH-ConfigPUSCH ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-tpc-RNTI ::= BIT STRING SIZE(16)  | | +-tpc-Index ::= CHOICE [indexOfFormat3] | | +-indexOfFormat3 ::= INTEGER (1..15)  | +-cqi-ReportConfig ::= SEQUENCE OPTIONAL:Omit | +-soundingRS-UL-ConfigDedicated ::= CHOICE OPTIONAL:Omit | +-antennaInfo ::= CHOICE [explicitValue] OPTIONAL:Exist | | +-explicitValue ::= SEQUENCE  | | +-transmissionMode ::= ENUMERATED [tm1] | | +-codebookSubsetRestriction ::= CHOICE OPTIONAL:Omit | | +-ue-TransmitAntennaSelection ::= CHOICE [release] | | +-release ::= NULL | +-schedulingRequestConfig ::= CHOICE OPTIONAL:Omit +-securityConfigHO ::= SEQUENCE OPTIONAL:Omit +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

尽管上面展示的解码消息看起来已经非常复杂,它其实并未完全解码,只显示了 RRC 部分的解码。如果解码这条消息中的 NAS 部分,会得到如下内容。

有一点非常重要,必须记住:你必须谨慎填充这条消息,使其能正确处理/匹配 UE 通过 Attach Request 发送的信息,否则会导致注册失败。

AS_LTE:EMM,Attach accept

< Attach accept > decoded message capture. Field values come from a live capture, not from the specification.

Attach accept ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Attach accept message identity ::= V | +-Message type ::= MSG  +-Spare half octet ::= V | +-Spare half octet ::= FIX  +-EPS attach result ::= V | +-Spare ::= FIX  | +-EPS attach result value ::= CHOICE [EPS only] +-T3412 value ::= V | +-Octet1 ::= DIVISION | +-Unit ::= CHOICE [value indicates that the timer is deactivated] | +-Timer value ::= INT (0..31)  +-TAI list ::= LV | +-Octet1 ::= DIVISION | | +-Length of tracking area identity list contents ::= LEN (0..255)  | +-Octet2-97 ::= DIVISION | +-tracking area identity list contents ::= OCTETARRAY SIZE(0..96) [0000F1100001] +-ESM message container ::= LV-E | +-Octet1-Octet2 ::= DIVISION | | +-Length of ESM message container ::= LEN (0..65535)  | +-Octet3- ::= DIVISION | +-ESM message container contents ::= OCTETARRAY SIZE(0..65535) [5201C10109100377777707616E726974737503636F6D 05010A012037270E8080210A0300000A81060A000001] +-GUTI ::= TLV OPTIONAL:Exist | +-Octet1 ::= DIVISION | | +-EPS mobile identity IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of EPS mobile identity contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-Spare ::= FIX [F] | | +-Odd/even indication ::= CHOICE [even number of identity digits and also when the GUTI is used] | | +-Type of identity ::= CHOICE [GUTI] | +-Octet4 ::= DIVISION | | +-MCC digit 2 ::= INT (0..15)  | | +-MCC digit 1 ::= INT (0..15)  | +-Octet5 ::= DIVISION | | +-MNC digit 3 ::= INT (0..15)  | | +-MCC digit 3 ::= INT (0..15)  | +-Octet6 ::= DIVISION | | +-MNC digit 2 ::= INT (0..15)  | | +-MNC digit 1 ::= INT (0..15)  | +-Octet7 ::= DIVISION | | +-MME Group ID ::= INT (0..255)  | +-Octet8 ::= DIVISION | | +-MME Group ID(continued) ::= INT (0..255)  | +-Octet9 ::= DIVISION | | +-MME Code ::= INT (0..255)  | +-Octet10 ::= DIVISION | | +-M-TMSI ::= INT (0..255)  | +-Octet11 ::= DIVISION | | +-M-TMSI(continued) ::= INT (0..255)  | +-Octet12 ::= DIVISION | | +-M-TMSI(continued) ::= INT (0..255)  | +-Octet13 ::= DIVISION | +-M-TMSI(continued) ::= INT (0..255)  +-Location area identification ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Location Area Identification IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-MCC digit 2 ::= INT (0..15)  | | +-MCC digit 1 ::= INT (0..15)  | +-Octet3 ::= DIVISION | | +-MNC digit 3 ::= INT (0..15)  | | +-MCC digit 3 ::= INT (0..15)  | +-Octet4 ::= DIVISION | | +-MNC digit 2 ::= INT (0..15)  | | +-MNC digit 1 ::= INT (0..15)  | +-Octet5 ::= DIVISION | | +-LAC ::= INT (0..255)  | +-Octet6 ::= DIVISION | +-LAC (continued) ::= INT (0..255)  +-MS identity ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Mobile Identity IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of mobile identity contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-Identity digit 1 ::= INT (0..15)  | | +-Odd/even indication ::= CHOICE [even number of identity digits and also when the TMSI/P-TMSI is used] | | +-Type of identity ::= CHOICE [No Identity] | +-Octet4-Octet10 ::= DIVISION | +-Identity digit p ::= OCTETARRAY SIZE(0..7) +-EMM cause ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-EMM cause IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Cause value ::= CHOICE [#2:IMSI unknown in HSS] +-T3402 value ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-GPRS Timer IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Unit ::= CHOICE [value is incremented in multiples of 2 seconds] | +-Timer value ::= INT (0..31)  +-T3423 value ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-GPRS Timer IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Unit ::= CHOICE [value is incremented in multiples of 2 seconds] | +-Timer value ::= INT (0..31)  +-Equivalent PLMNs ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-PLMN List IEI ::= IEI [4A] | +-Octet2 ::= DIVISION | | +-Length of PLMN List contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-MCC digit 2 PLMN 1 ::= INT (0..15)  | | +-MCC digit 1 PLMN 1 ::= INT (0..15)  ..... Octet 4 - Octet 45 ..... | +-Octet46 ::= DIVISION | | +-MNC digit 3 PLMN 15 ::= INT (0..15)  | | +-MCC digit 3 PLMN 15 ::= INT (0..15)  | +-Octet47 ::= DIVISION | +-MNC digit 2 PLMN 15 ::= INT (0..15)  | +-MNC digit 1 PLMN 15 ::= INT (0..15)  +-Emergency Number List ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Emergency Number List IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of Emergency Number List IE contents ::= LEN (0..255)  | +-Octet3-50 ::= DIVISION | +-Emergency Number List IE contents ::= OCTETARRAY SIZE(0..48) +-EPS network feature support ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-EPS network feature support IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of EPS network feature support contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | +-Spare ::= FIX  | +-IMS VoPS ::= CHOICE [IMS voice over PS session in S1 mode not supported] +-Additional update result ::= TV OPTIONAL:Omit +-Octet1 ::= DIVISION +-Additional update result IEI ::= IEI [F-] +-Spare ::= FIX  +-Additional update result value ::= CHOICE [no additional information]

从上面展示的内容中可以看到「ESM message container contents」,它可以进一步解码如下。图中蓝色标记的 IE(信息元素)是 UE 接入数据业务应用最重要的那些 IE。

NAS_LTE:ESM,Activate default EPS bearer context request

< Activate default EPS bearer context request > decoded message capture. Field values come from a live capture, not from the specification.

Activate default EPS bearer context request ::= DIVISION +-EPS bearer identity ::= V | +-EPS bearer identity value ::= CHOICE [EPS bearer identity value 5] +-EPS session management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Procedure transaction identity ::= V | +-Procedure transaction identity ::= CHOICE [Procedure transaction identity value 1] +-Activate default EPS bearer context request message identity ::= V | +-Message type ::= MSG [C1] +-EPS QoS ::= LV | +-Octet1 ::= DIVISION | | +-Length of EPS quality of service contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-QCI ::= CHOICE [QCI 9] | +-Octet3 ::= DIVISION | | +-Maximum bit rate for uplink ::= CHOICE [Reserved(network to UE direction)/Subscribed maximum bit rate for uplink(UE to network direction)] | +-Octet4 ::= DIVISION | | +-Maximum bit rate for downlink ::= CHOICE [Reserved(network to UE direction)/Subscribed maximum bit rate for uplink(UE to network direction)] | +-Octet5 ::= DIVISION | | +-Guaranteed bit rate for uplink ::= CHOICE [Reserved(network to UE direction)/Subscribed maximum bit rate for uplink(UE to network direction)] | +-Octet6 ::= DIVISION | | +-Guaranteed bit rate for downlink ::= CHOICE [Reserved(network to UE direction)/Subscribed maximum bit rate for uplink(UE to network direction)] | +-Octet7 ::= DIVISION | | +-Maximum bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the maximum bit rate for uplink in octet 4] | +-Octet8 ::= DIVISION | | +-Maximum bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the maximum bit rate for uplink in octet 4] | +-Octet9 ::= DIVISION | | +-Guaranteed bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the guaranteed bit rate for uplink in octet 6] | +-Octet10 ::= DIVISION | +-Guaranteed bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the guaranteed bit rate for uplink in octet 6] +-Access point name ::= LV | +-Octet1 ::= DIVISION | | +-Length of access point name contents ::= LEN (0..255)  | +-Octet2-Octet101 ::= DIVISION | +-Access point name value ::= OCTETARRAY SIZE(0..100) [0377777707616E726974737503636F6D] +-PDN address ::= LV | +-Octet1 ::= DIVISION | | +-Length of PDN address contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-spare ::= FIX  | | +-PDN type value ::= CHOICE [IPv4] | +-Octet3-14 ::= DIVISION | +-PDN address information ::= OCTETARRAY SIZE(0..12) [0A012037] +-Transaction identifier ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Transaction identifier IEI ::= IEI [5D] | +-Octet2 ::= DIVISION | | +-Length of Transaction identifier contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-TI flag ::= CHOICE [The message is sent from the side that originates the TI] | | +-TIO ::= CHOICE [TI value 0] | | +-Spare ::= FIX  | +-Octet4 ::= DIVISION | +-ext ::= EXT (0..1)  | +-TIE ::= CHOICE [Reserved] +-Negotiated QoS ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Quality of service IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of quality of service IE ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-spare ::= FIX  | | +-Delay class ::= CHOICE [Subscribed delay class(MS to network direction)/Reserved(network to MS direction)] | | +-Reliability class ::= CHOICE [Subscribed reliability class(MS to network direction)/Reserved(network to MS direction)] | +-Octet4 ::= DIVISION | | +-Peak throughput ::= CHOICE [Subscribed peak throughput(MS to network direction)/Reserved(network to MS direction)] | | +-spare ::= FIX  | | +-Precedence class ::= CHOICE [Subscribed precedence(MS to network direction)/Reserved(network to MS direction)] | +-Octet5 ::= DIVISION | | +-spare ::= FIX  | | +-Mean throughput ::= CHOICE [Subscribed mean throughput(MS to network direction)/Reserved(network to MS direction)] | +-Octet6 ::= DIVISION | | +-Traffic Class ::= CHOICE [Subscribed traffic class(MS to network direction)/Reserved(network to MS direction)] | | +-Delivery order ::= CHOICE [Subscribed delivery order(MS to network direction)/Reserved(network to MS direction)] | | +-Delivery of erroneous SDUs ::= CHOICE [Subscribed delivery of erroneous SDUs(MS to network direction) /Reserved(network to MS direction)] | +-Octet7 ::= DIVISION | | +-Maximum SDU size ::= CHOICE [Subscribed maximum SDU size(MS to network direction) /Reserved(network to MS direction)] | +-Octet8 ::= DIVISION | | +-Maximum bit rate for uplink ::= CHOICE [Subscribed maximum bit rate for uplink(MS to network direction) /Reserved(network to MS direction)] | +-Octet9 ::= DIVISION | | +-Maximum bit rate for downlink ::= CHOICE [Subscribed maximum bit rate for uplink(MS to network direction )/Reserved(network to MS direction)] | +-Octet10 ::= DIVISION | | +-Residual BER ::= CHOICE [Subscribed residual BER(MS to network direction)/Reserved(network to MS direction)] | | +-SDU error ratio ::= CHOICE [Subscribed SDU error ratio(MS to network direction)/Reserved(network to MS direction)] | +-Octet11 ::= DIVISION | | +-Transfer delay ::= CHOICE [Subscribed transfer delay(MS to network direction)/Reserved(network to MS direction)] | | +-Traffic Handling priority ::= CHOICE [Subscribed traffic handling priority(MS to network direction) /Reserved(network to MS direction)] | +-Octet12 ::= DIVISION | | +-Guaranteed bit rate for uplink ::= INT (0..255)  | +-Octet13 ::= DIVISION | | +-Guaranteed bit rate for downlink ::= INT (0..255)  | +-Octet14 ::= DIVISION | | +-Spare ::= FIX  | | +-Signalling Indication ::= CHOICE [Not optimised for signalling traffic] | | +-Source Statistics Descriptor ::= CHOICE [unknown] | +-Octet15 ::= DIVISION | | +-Maximum bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet16 ::= DIVISION | | +-Guaranteed bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet17 ::= DIVISION | | +-Maximum bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet18 ::= DIVISION | +-Guaranteed bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] +-Negotiated LLC SAPI ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-LLC SAPI IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Spare ::= FIX  | +-LLC SAPI value ::= CHOICE [LLC SAPI not assigned] +-Radio priority ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | +-Radio priority IEI ::= IEI [8-] | +-spare ::= FIX  | +-Radio priority level value ::= CHOICE [priority level 1 (highest)] +-Packet flow identifier ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Packet Flow Identifier IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of Packet Flow Identifier IE ::= LEN (0..255)  | +-Octet3 ::= DIVISION | +-spare ::= FIX  | +-Packet Flow Identifier value ::= CHOICE [Best Effort] +-APN-AMBR ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-APN aggregate maximum bit rate IEI ::= IEI [5E] | +-Octet2 ::= DIVISION | | +-Length of APN aggregate maximum bit rate contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-APN-AMBR for downlink ::= CHOICE [1kbps] | +-Octet4 ::= DIVISION | | +-APN-AMBR for uplink ::= CHOICE [1kbps] | +-Octet5 ::= DIVISION | | +-APN-AMBR for downlink (extended) ::= CHOICE [Use the value indicated by the APN-AMBR for downlink in octet 3] | +-Octet6 ::= DIVISION | | +-APN-AMBR for uplink (extended) ::= CHOICE [8700kbps] | +-Octet7 ::= DIVISION | | +-APN-AMBR for downlink (extended-2) ::= CHOICE [Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended) in octets 3 and 5 0] | +-Octet8 ::= DIVISION | +-APN-AMBR for uplink (extended-2) ::= CHOICE [Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended) in octets 3 and 5 0] +-ESM cause ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-ESM cause IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Cause value ::= CHOICE [#8:Operator Determined Barring] +-Protocol configuration options ::= TLV OPTIONAL:Exist +-Octet1 ::= DIVISION | +-Protocol configuration options IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of protocol config options contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-ext ::= EXT1  | +-spare ::= FIX  | +-Configuration protocol ::= CHOICE [PPP for use with IP PDP type] +-Octet4-Octet253 ::= DIVISION +-protocol config options contents ::= OCTETARRAY SIZE(0..250) [80210A0300000A81060A000001]

这里有一件重要的事你必须知道,那就是如何指定 PDN 地址。以下三个示例本身应当足够说明问题(希望如此 -:)。关于 IPv6 的更多细节,请参阅 IPv6 页面。

< Example : IPv4 >

< PDN address > decoded message capture. Field values come from a live capture, not from the specification.

+-PDN address ::= LV | +-Octet1 ::= DIVISION | | +-Length of PDN address contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-spare ::= FIX  | | +-PDN type value ::= CHOICE [IPv4] | +-Octet3-14 ::= DIVISION | +-PDN address information ::= OCTETARRAY SIZE(0..12) [0A012037]

< Example : IPv6 >

:指定 IPv6 地址的链路本地地址。

+-PDN address ::= LV | +-Octet1 ::= DIVISION | | +-Length of PDN address contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-spare ::= FIX  | | +-PDN type value ::= CHOICE [IPv6] | +-Octet3-14 ::= DIVISION | +-PDN address information ::= OCTETARRAY SIZE(0..12)

< Example : IPv4v6 >

:指定 IPv6 地址的链路本地地址,其后跟 IPv4 地址。

+-PDN address ::= LV | +-Octet1 ::= DIVISION | | +-Length of PDN address contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-spare ::= FIX  | | +-PDN type value ::= CHOICE [IPv4v6] | +-Octet3-14 ::= DIVISION | +-PDN address information ::= OCTETARRAY SIZE(0..12) [00000000010100020A0A0A0A]

< Protocol configuration options >

这一条消息里带着三个独立的确认,分别来自刚刚配置好的每一层。把它读成三个答复、而不是一条消息,它的嵌套关系就很容易跟上了。

这一步执行的一个重要过程是「ESM:Activate Default EPS Bearer Context Accept」。

RRC Connection Reconfiguration Complete 部分非常简单,如下所示。

RRC_LTE:UL-DCCH-Message UL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionReconfigurationComplete] +-rrcConnectionReconfigurationComplete ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [rrcConnectionReconfigurationComplete-r8] +-rrcConnectionReconfigurationComplete-r8 ::= SEQUENCE  +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

NAS 部分的结构相当复杂,因为它被多次封装(piggyback)。

树形结构,显示 ulInformationTransfer 携带 Attach Complete,而 Attach Complete 在 ESM Message Container 中携带 Activate Default EPS Bearer Context Accept

图注:树形结构,显示 ulInformationTransfer 携带 Attach Complete,而 Attach Complete 在 ESM Message Container 中携带 Activate Default EPS Bearer Context Accept

RRC_LTE:UL-DCCH-Message

UL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [ulInformationTransfer] +-ulInformationTransfer ::= SEQUENCE +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [ulInformationTransfer-r8] +-ulInformationTransfer-r8 ::= SEQUENCE  +-dedicatedInfoType ::= CHOICE [dedicatedInfoNAS] | +-dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [074300035200C2] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

如果解码 dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [074300035200C2],会得到如下消息(Attach Complete)。

NAS_LTE:EMM,Attach complete

< Attach complete > decoded message capture. Field values come from a live capture, not from the specification.

Attach complete ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Plain NAS message, not security protected] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Attach complete message identity ::= V | +-Message type ::= MSG  +-ESM message container ::= LV-E +-Octet1-Octet2 ::= DIVISION | +-Length of ESM message container ::= LEN (0..65535)  +-Octet3- ::= DIVISION +-ESM message container contents ::= OCTETARRAY SIZE(0..65535) [5200C2]

如果解码 ESM message container contents ::= OCTETARRAY SIZE(0..65535) [5200C2] 部分,会得到如下消息(Activate default EPS bearer context accept)。

NAS_LTE:ESM,Activate default EPS bearer context accept

< Activate default EPS bearer context accept > decoded message capture. Field values come from a live capture, not from the specification.

Activate default EPS bearer context accept ::= DIVISION +-EPS bearer identity ::= V | +-EPS bearer identity value ::= CHOICE [EPS bearer identity value 5] +-EPS session management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Procedure transaction identity ::= V | +-Procedure transaction identity ::= CHOICE [No procedure transaction identity assigned] +-Activate default EPS bearer context accept message identity ::= V | +-Message type ::= MSG [C2] +-Protocol configuration options ::= TLV OPTIONAL:Omit +-Octet1 ::= DIVISION | +-Protocol configuration options IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of protocol config options contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-ext ::= EXT1  | +-spare ::= FIX  | +-Configuration protocol ::= CHOICE [PPP for use with IP PDP type] +-Octet4-Octet253 ::= DIVISION +-protocol config options contents ::= OCTETARRAY SIZE(0..250)

与步骤 6 相同,但 establishment cause 有所不同,如下所示。具体是 mt-Access 还是 mo-Data,取决于本次是 MT 呼叫还是 MO 呼叫。

RRC_LTE:UL-CCCH-Message

< UL-CCCH-Message > decoded message capture. Field values come from a live capture, not from the specification.

UL-CCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionRequest] +-rrcConnectionRequest ::= SEQUENCE +-criticalExtensions ::= CHOICE [rrcConnectionRequest-r8] +-rrcConnectionRequest-r8 ::= SEQUENCE +-ue-Identity ::= CHOICE [s-TMSI] | +-s-TMSI ::= SEQUENCE | +-mmec ::= BIT STRING SIZE(8)  | +-m-TMSI ::= BIT STRING SIZE(32)  +-establishmentCause ::= ENUMERATED [mt-Access] +-spare ::= BIT STRING SIZE(1)

要读的字段是 establishment cause,而在这一遍中它也是唯一真正的差别。第一遍 UE 是在注册,因此该原因是 mo-Signalling。这里 UE 已经注册,目的变成传送数据,因此若为终端发起呼叫则该原因是 mo-Data,若 UE 是在响应寻呼则为 mt-Access。

身份发生变化出于同样的原因。已完成附着的 UE 持有 S-TMSI,因此 ue-Identity 携带的是它,而不是第一遍所用的随机值。这样网络从第二遍的第一条消息就能认出这个 UE。

  • 真正不同的只有 establishment cause:第一遍是 mo-Signalling,第二遍是 mo-Data 或 mt-Access。
  • 身份不再是随机值:已注册的 UE 发送自己的 S-TMSI,网络立刻就知道是谁在请求。 RRC Connection Setup 在两遍之间没有变化,这一点值得单独说一句,而不只是给个链接。该消息配置 SRB1 与专用物理层,而这两者都不取决于 UE 是在附着还是在恢复。

参见 RRC Connection Setup

有差别的是应答而不是这条消息。第一遍 UE 以 Attach Request 应答;这里它以 Service Request 应答,这是一条短得多的 NAS 消息,也就是紧接着的下一步。

  • 建立消息本身没有变化:两种情况下它都配置 SRB1 与专用物理层。

  • 差别在于返回的内容:第一遍是 Attach Request,第二遍是 Service Request。 尽管消息本身不变,有一件事确实变了。上一次连接的任何东西都没有在空闲期存活下来,因此这条消息中的每个专用参数都是重新建立的,而不是恢复的。SRB1 被重新建立,物理配置也是全新的。UE 在这里从 IDLE 迁移到 CONNECTED,与第一遍完全一样,而 eNB 对它上次使用的配置毫无记忆。

  • 在 eNB 侧空闲期之后什么都不保留:专用配置是重新建立的,而不是恢复的。 Service Request 是本页最短的 NAS 消息,而它的「短」正是重点。网络在附着时就已持有该 UE 的上下文,因此没有任何东西需要重新描述。这条消息只需标识 UE,并证明它是同一个 UE。

UL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionSetupComplete] +-rrcConnectionSetupComplete ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionSetupComplete-r8] +-rrcConnectionSetupComplete-r8 ::= SEQUENCE  +-selectedPLMN-Identity ::= INTEGER (1..6)  +-registeredMME ::= SEQUENCE OPTIONAL:Omit +-dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [C7E00000] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

如果解码 dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [C7E00000] 部分,会得到如下消息(Service Request)。

NAS_LTE:EMM,Service request

< Service request > decoded message capture. Field values come from a live capture, not from the specification.

Service request ::= DIVISION +-Security header type ::= V | +-Security header type ::= CHOICE [Security header for the SERVICE REQUEST message] +-EPS mobility management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-KSI and sequence number ::= V | +-Octet1 ::= DIVISION | +-KSI ::= CHOICE [no key is available] | +-Sequence number(short) ::= INT (0..31)  +-Message authentication code (short) ::= V +-Octet1 ::= DIVISION | +-Short MAC value ::= INT (0..255)  +-Octet2 ::= DIVISION +-Short MAC value(continued) ::= INT (0..255)

即使 UE 在附着时已经过鉴权,第二遍仍然必须重新建立安全。原因在于密钥,而不是身份。UE 进入空闲、eNB 释放了它的上下文,因此必须为新连接重新建立 K_eNB。

参见 RRC:Security Mode Command

  • 鉴权不重复:UE 已经过鉴权,且 K_ASME 在空闲期之后仍然保留。
  • K_eNB 确实要重复:UE 进入空闲时 eNB 释放了上下文,因此接入层密钥需要重新推导。 值得精确说明安全状态中哪一半存活了下来。NAS 上下文存活了:K_ASME 在附着过程中建立,UE 在整个空闲期都保留着它。这解释了为什么这一遍不跑鉴权,也解释了上面那条 Service Request 为何能够做完整性保护。

接入层上下文没有存活。UE 进入空闲时 eNB 释放了一切,因此 K_eNB 必须重新产生。33.401 规定它由 K_ASME 与上行 NAS COUNT 推导得到。这把新的接入层密钥与 UE 仍持有的 NAS 上下文绑定在一起,也阻止旧的 K_eNB 在新连接上被复用。

应答与第一遍是同一条消息,且标记的是同一个节点。自此该连接上的 RRC 信令就受到保护了。下面的链接指向更完整的描述,此处不再重复。

参见 RRC:Security Mode Complete

这里的诊断与第一遍相同。一条始终不到达的 Security Mode Complete 通常意味着 UE 与 eNB 推导出了不同的 K_eNB。这通常指向推导中所用的 NAS COUNT,而不是这条消息本身。

一旦它到达,连接就为下一步做好了准备。在接入层安全开始运行之前,eNB 不会发送增加承载的重配置。因此这条短消息是「仅供信令的连接」与「能够承载数据的连接」之间的闸门。

  • NAS 上下文能熬过空闲,接入层上下文不能:K_ASME 保留,而 K_eNB 由它与上行 NAS COUNT 重新推导。
  • 这条消息是通往承载的闸门:只有在接入层安全开始运行之后,eNB 才会增加专用承载。 还要注意第二遍中缺少了什么。本页顶部的步骤列表把 UE Capability Enquiry 与 UE Capability Information 编号为 O1 与 O2,这两者只出现在第一遍中。eNB 不会再次询问,因为能力在附着期间就已确立,网络为该 UE 保留着它们。这种「缺失」正是第二遍比第一遍短得多的部分原因。

这一步是增加一个承载,而不是从无到有地创建,几乎每一处与第一遍的差别都源于此。UE 已经有 IP 地址和默认承载,因此这条消息两者都不携带。

这又是一条「RRC Connection Reconfiguration」消息,但你会看到它与步骤 15 那条消息存在一些差别。

你看不到任何「Attach Accept」部分,因为你在注册时已经走过「attach」过程,现在只创建了「Dedicated EPS Bearer」。这是否意味着你不能再使用步骤 15) 创建的「Default EPS Bearer」了?不是——默认承载在注册期间一旦创建就一直存在,所以这一步不必重新创建默认 EPS 承载。

树形结构,显示 RRC Connection Reconfiguration 携带 Activate Dedicated EPS Bearer Context Request,其中包含 Linked EPS Bearer Identity、EPS QoS 与 TFT

图注:树形结构,显示 RRC Connection Reconfiguration 携带 Activate Dedicated EPS Bearer Context Request,其中包含 Linked EPS Bearer Identity、EPS QoS 与 TFT

你可能会注意到「Activate Dedicated EPS Bearer Context Request」没有 IP 地址设置。这是因为专用 EPS 使用默认 EPS 承载所指定的同一套 IP 配置。默认 EPS 承载的作用是建立一条与默认 EPS QoS 不同的 QoS 的数据管道。也就是说,专用 EPS 承载是链接到某个特定默认 EPS 承载上的。

那么,我们怎么知道哪个默认 EPS 承载链接到了哪个专用 EPS 承载?

这个链接由「Linked EPS Bearer Identity」指定。例如,如果「Linked EPS Bearer Identity」被设为 5,就意味着这个「Dedicated EPS Bearer」链接到承载 ID = 5 的默认 EPS 承载,并使用该默认 EPS 承载所定义的同一套 IP 配置。

DL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionReconfiguration] +-rrcConnectionReconfiguration ::= SEQUENCE +-rrc-TransactionIdentifier ::= INTEGER (0..3)  +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [rrcConnectionReconfiguration-r8] +-rrcConnectionReconfiguration-r8 ::= SEQUENCE  +-measConfig ::= SEQUENCE OPTIONAL:Omit +-mobilityControlInfo ::= SEQUENCE OPTIONAL:Omit +-dedicatedInfoNASList ::= SEQUENCE OF SIZE(1..maxDRB)  OPTIONAL:Exist | +-DedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [1700000000036200C5050904686848480000000006213100023011] +-radioResourceConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | +-srb-ToAddModList ::= SEQUENCE OF SIZE(1..2)  OPTIONAL:Exist | | +-SRB-ToAddMod ::= SEQUENCE  | | +-srb-Identity ::= INTEGER (1..2)  | | +-rlc-Config ::= CHOICE [defaultValue] OPTIONAL:Exist | | | +-defaultValue ::= NULL | | +-logicalChannelConfig ::= CHOICE [defaultValue] OPTIONAL:Exist | | +-defaultValue ::= NULL | +-drb-ToAddModList ::= SEQUENCE OF SIZE(1..maxDRB)  OPTIONAL:Exist | | +-DRB-ToAddMod ::= SEQUENCE  | | | +-eps-BearerIdentity ::= INTEGER (0..15)  OPTIONAL:Exist | | | +-drb-Identity ::= INTEGER (1..32)  | | | +-pdcp-Config ::= SEQUENCE  OPTIONAL:Exist | | | | +-discardTimer ::= ENUMERATED [infinity] OPTIONAL:Exist | | | | +-rlc-AM ::= SEQUENCE OPTIONAL:Omit | | | | +-rlc-UM ::= SEQUENCE OPTIONAL:Exist | | | | | +-pdcp-SN-Size ::= ENUMERATED [len12bits] | | | | +-headerCompression ::= CHOICE [notUsed] | | | | +-notUsed ::= NULL | | | +-rlc-Config ::= CHOICE [um-Bi-Directional] OPTIONAL:Exist | | | | +-um-Bi-Directional ::= SEQUENCE | | | | +-ul-UM-RLC ::= SEQUENCE | | | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | | +-dl-UM-RLC ::= SEQUENCE | | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | | +-t-Reordering ::= ENUMERATED [ms50] | | | +-logicalChannelIdentity ::= INTEGER (3..10)  OPTIONAL:Exist | | | +-logicalChannelConfig ::= SEQUENCE  OPTIONAL:Exist | | | +-ul-SpecificParameters ::= SEQUENCE  OPTIONAL:Exist | | | +-priority ::= INTEGER (1..16)  | | | +-prioritisedBitRate ::= ENUMERATED [infinity] | | | +-bucketSizeDuration ::= ENUMERATED [ms100] | | | +-logicalChannelGroup ::= INTEGER (0..3)  OPTIONAL:Exist | | +-DRB-ToAddMod ::= SEQUENCE  | | +-eps-BearerIdentity ::= INTEGER (0..15)  OPTIONAL:Exist | | +-drb-Identity ::= INTEGER (1..32)  | | +-pdcp-Config ::= SEQUENCE  OPTIONAL:Exist | | | +-discardTimer ::= ENUMERATED [infinity] OPTIONAL:Exist | | | +-rlc-AM ::= SEQUENCE OPTIONAL:Omit | | | +-rlc-UM ::= SEQUENCE OPTIONAL:Exist | | | | +-pdcp-SN-Size ::= ENUMERATED [len12bits] | | | +-headerCompression ::= CHOICE [notUsed] | | | +-notUsed ::= NULL | | +-rlc-Config ::= CHOICE [um-Bi-Directional] OPTIONAL:Exist | | | +-um-Bi-Directional ::= SEQUENCE | | | +-ul-UM-RLC ::= SEQUENCE | | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | +-dl-UM-RLC ::= SEQUENCE | | | +-sn-FieldLength ::= ENUMERATED [size10] | | | +-t-Reordering ::= ENUMERATED [ms50] | | +-logicalChannelIdentity ::= INTEGER (3..10)  OPTIONAL:Exist | | +-logicalChannelConfig ::= SEQUENCE  OPTIONAL:Exist | | +-ul-SpecificParameters ::= SEQUENCE  OPTIONAL:Exist | | +-priority ::= INTEGER (1..16)  | | +-prioritisedBitRate ::= ENUMERATED [infinity] | | +-bucketSizeDuration ::= ENUMERATED [ms100] | | +-logicalChannelGroup ::= INTEGER (0..3)  OPTIONAL:Exist | +-drb-ToReleaseList ::= SEQUENCE OF OPTIONAL:Omit | +-mac-MainConfig ::= CHOICE [explicitValue] OPTIONAL:Exist | | +-explicitValue ::= SEQUENCE  | | +-ul-SCH-Config ::= SEQUENCE  OPTIONAL:Exist | | | +-maxHARQ-Tx ::= ENUMERATED [n5] OPTIONAL:Exist | | | +-periodicBSR-Timer ::= ENUMERATED [sf20] OPTIONAL:Exist | | | +-retxBSR-Timer ::= ENUMERATED [sf320] | | | +-ttiBundling ::= BOOLEAN [FALSE] | | +-drx-Config ::= CHOICE [release] OPTIONAL:Exist | | | +-release ::= NULL | | +-timeAlignmentTimerDedicated ::= ENUMERATED [infinity] | | +-phr-Config ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-periodicPHR-Timer ::= ENUMERATED [sf500] | | +-prohibitPHR-Timer ::= ENUMERATED [sf200] | | +-dl-PathlossChange ::= ENUMERATED [dB3] | +-sps-Config ::= SEQUENCE OPTIONAL:Omit | +-physicalConfigDedicated ::= SEQUENCE  OPTIONAL:Exist | +-pdsch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-pucch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-pusch-ConfigDedicated ::= SEQUENCE OPTIONAL:Omit | +-uplinkPowerControlDedicated ::= SEQUENCE OPTIONAL:Omit | +-tpc-PDCCH-ConfigPUCCH ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-tpc-RNTI ::= BIT STRING SIZE(16)  | | +-tpc-Index ::= CHOICE [indexOfFormat3] | | +-indexOfFormat3 ::= INTEGER (1..15)  | +-tpc-PDCCH-ConfigPUSCH ::= CHOICE [setup] OPTIONAL:Exist | | +-setup ::= SEQUENCE | | +-tpc-RNTI ::= BIT STRING SIZE(16)  | | +-tpc-Index ::= CHOICE [indexOfFormat3] | | +-indexOfFormat3 ::= INTEGER (1..15)  | +-cqi-ReportConfig ::= SEQUENCE OPTIONAL:Omit | +-soundingRS-UL-ConfigDedicated ::= CHOICE OPTIONAL:Omit | +-antennaInfo ::= CHOICE [defaultValue] OPTIONAL:Exist | | +-defaultValue ::= NULL | +-schedulingRequestConfig ::= CHOICE OPTIONAL:Omit +-securityConfigHO ::= SEQUENCE OPTIONAL:Omit +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

如果解码 DedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED [1700000000036200C5050904686848480000000006213100023011],会得到如下 NAS 消息。

< Activate dedicated EPS bearer context request > decoded message capture. Field values come from a live capture, not from the specification.

Activate dedicated EPS bearer context request ::= DIVISION +-EPS bearer identity ::= V | +-EPS bearer identity value ::= CHOICE [EPS bearer identity value 6] +-EPS session management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Procedure transaction identity ::= V | +-Procedure transaction identity ::= CHOICE [No procedure transaction identity assigned] +-Activate dedicated EPS bearer context request message identity ::= V | +-Message type ::= MSG [C5] +-Spare half octet ::= V | +-Spare half octet ::= FIX  +-Linked EPS bearer identity ::= V | +-Linked EPS bearer identity value ::= CHOICE [EPS bearer identity value 5] +-EPS QoS ::= LV | +-Octet1 ::= DIVISION | | +-Length of EPS quality of service contents ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-QCI ::= CHOICE [QCI 4] | +-Octet3 ::= DIVISION | | +-Maximum bit rate for uplink ::= CHOICE [384kbps] | +-Octet4 ::= DIVISION | | +-Maximum bit rate for downlink ::= CHOICE [384kbps] | +-Octet5 ::= DIVISION | | +-Guaranteed bit rate for uplink ::= CHOICE [128kbps] | +-Octet6 ::= DIVISION | | +-Guaranteed bit rate for downlink ::= CHOICE [128kbps] | +-Octet7 ::= DIVISION | | +-Maximum bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the maximum bit rate for uplink in octet 4] | +-Octet8 ::= DIVISION | | +-Maximum bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the maximum bit rate for uplink in octet 4] | +-Octet9 ::= DIVISION | | +-Guaranteed bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the guaranteed bit rate for uplink in octet 6] | +-Octet10 ::= DIVISION | +-Guaranteed bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the guaranteed bit rate for uplink in octet 6] +-TFT ::= LV | +-Octet1 ::= DIVISION | | +-Length of traffic flow template IE ::= LEN (0..255)  | +-Octet2 ::= DIVISION | | +-TFT operation code ::= CHOICE [Create new TFT] | | +-E bit ::= CHOICE [parameters list is not included] | | +-Number of packet filters ::= INT (0..15)  | +-Octet3-Octet256 ::= DIVISION | +-Packet filter list/Parameters list ::= OCTETARRAY SIZE(0..254)  +-Transaction identifier ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Transaction identifier IEI ::= IEI [5D] | +-Octet2 ::= DIVISION | | +-Length of Transaction identifier contents ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-TI flag ::= CHOICE [The message is sent from the side that originates the TI] | | +-TIO ::= CHOICE [TI value 0] | | +-Spare ::= FIX  | +-Octet4 ::= DIVISION | +-ext ::= EXT (0..1)  | +-TIE ::= CHOICE [Reserved] +-Negotiated QoS ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Quality of service IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of quality of service IE ::= LEN (0..255)  | +-Octet3 ::= DIVISION | | +-spare ::= FIX  | | +-Delay class ::= CHOICE [Subscribed delay class(MS to network direction)/Reserved(network to MS direction)] | | +-Reliability class ::= CHOICE [Subscribed reliability class(MS to network direction)/Reserved(network to MS direction)] | +-Octet4 ::= DIVISION | | +-Peak throughput ::= CHOICE [Subscribed peak throughput(MS to network direction)/Reserved(network to MS direction)] | | +-spare ::= FIX  | | +-Precedence class ::= CHOICE [Subscribed precedence(MS to network direction)/Reserved(network to MS direction)] | +-Octet5 ::= DIVISION | | +-spare ::= FIX  | | +-Mean throughput ::= CHOICE [Subscribed mean throughput(MS to network direction)/Reserved(network to MS direction)] | +-Octet6 ::= DIVISION | | +-Traffic Class ::= CHOICE [Subscribed traffic class(MS to network direction)/Reserved(network to MS direction)] | | +-Delivery order ::= CHOICE [Subscribed delivery order(MS to network direction)/Reserved(network to MS direction)] | | +-Delivery of erroneous SDUs ::= CHOICE [Subscribed delivery of erroneous SDUs(MS to network direction)/Reserved(network to MS direction)] | +-Octet7 ::= DIVISION | | +-Maximum SDU size ::= CHOICE [Subscribed maximum SDU size(MS to network direction)/Reserved(network to MS direction)] | +-Octet8 ::= DIVISION | | +-Maximum bit rate for uplink ::= CHOICE [Subscribed maximum bit rate for uplink(MS to network direction)/Reserved(network to MS direction)] | +-Octet9 ::= DIVISION | | +-Maximum bit rate for downlink ::= CHOICE [Subscribed maximum bit rate for uplink(MS to network direction)/Reserved(network to MS direction)] | +-Octet10 ::= DIVISION | | +-Residual BER ::= CHOICE [Subscribed residual BER(MS to network direction)/Reserved(network to MS direction)] | | +-SDU error ratio ::= CHOICE [Subscribed SDU error ratio(MS to network direction)/Reserved(network to MS direction)] | +-Octet11 ::= DIVISION | | +-Transfer delay ::= CHOICE [Subscribed transfer delay(MS to network direction)/Reserved(network to MS direction)] | | +-Traffic Handling priority ::= CHOICE [Subscribed traffic handling priority(MS to network direction)/Reserved(network to MS direction)] | +-Octet12 ::= DIVISION | | +-Guaranteed bit rate for uplink ::= INT (0..255)  | +-Octet13 ::= DIVISION | | +-Guaranteed bit rate for downlink ::= INT (0..255)  | +-Octet14 ::= DIVISION | | +-Spare ::= FIX  | | +-Signalling Indication ::= CHOICE [Not optimised for signalling traffic] | | +-Source Statistics Descriptor ::= CHOICE [unknown] | +-Octet15 ::= DIVISION | | +-Maximum bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet16 ::= DIVISION | | +-Guaranteed bit rate for downlink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet17 ::= DIVISION | | +-Maximum bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] | +-Octet18 ::= DIVISION | +-Guaranteed bit rate for uplink (extended) ::= CHOICE [Use the value indicated by the Maximum bit rate for downlink in octet 9.] +-Negotiated LLC SAPI ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-LLC SAPI IEI ::= IEI  | +-Octet2 ::= DIVISION | +-Spare ::= FIX  | +-LLC SAPI value ::= CHOICE [LLC SAPI not assigned] +-Radio priority ::= TV OPTIONAL:Omit | +-Octet1 ::= DIVISION | +-Radio priority IEI ::= IEI [8-] | +-spare ::= FIX  | +-Radio priority level value ::= CHOICE [priority level 1 (highest)] +-Packet flow identifier ::= TLV OPTIONAL:Omit | +-Octet1 ::= DIVISION | | +-Packet Flow Identifier IEI ::= IEI  | +-Octet2 ::= DIVISION | | +-Length of Packet Flow Identifier IE ::= LEN (0..255)  | +-Octet3 ::= DIVISION | +-spare ::= FIX  | +-Packet Flow Identifier value ::= CHOICE [Best Effort] +-Protocol configuration options ::= TLV OPTIONAL:Omit +-Octet1 ::= DIVISION | +-Protocol configuration options IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of protocol config options contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-ext ::= EXT1  | +-spare ::= FIX  | +-Configuration protocol ::= CHOICE [PPP for use with IP PDP type] +-Octet4-253 ::= DIVISION +-protocol config options contents ::= OCTETARRAY SIZE(0..250)

呼叫的最后一步是在两个层次上的确认,两部分都很短。RRC 部分确认重配置,NAS 部分接受专用承载。两者都不需要重复请求已经携带的任何内容。

RRC Connection Reconfiguration Complete 部分非常简单,如下所示。

ESM:Activate dedicated EPS bearer context accept 部分由 UL information transfer 消息承载,如下所示。

RRC_LTE:UL-DCCH-Message UL-DCCH-Message ::= SEQUENCE +-message ::= CHOICE [c1] +-c1 ::= CHOICE [ulInformationTransfer] +-ulInformationTransfer ::= SEQUENCE +-criticalExtensions ::= CHOICE [c1] +-c1 ::= CHOICE [ulInformationTransfer-r8] +-ulInformationTransfer-r8 ::= SEQUENCE  +-dedicatedInfoType ::= CHOICE [dedicatedInfoNAS] | +-dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [6200C6] +-nonCriticalExtension ::= SEQUENCE OPTIONAL:Omit

如果解码 dedicatedInfoNAS ::= OCTET STRING SIZE(ALIGNED) [6200C6] 部分,会得到如下消息(ESM,Activate dedicated EPS bearer context accept)。

NAS_LTE:ESM,Activate dedicated EPS bearer context accept

< Activate dedicated EPS bearer context accept > decoded message capture. Field values come from a live capture, not from the specification.

Activate dedicated EPS bearer context accept ::= DIVISION +-EPS bearer identity ::= V | +-EPS bearer identity value ::= CHOICE [EPS bearer identity value 6] +-EPS session management protocol discriminator ::= V | +-Protocol discriminator ::= PD  +-Procedure transaction identity ::= V | +-Procedure transaction identity ::= CHOICE [No procedure transaction identity assigned] +-Activate dedicated EPS bearer context accept message identity ::= V | +-Message type ::= MSG [C6] +-Protocol configuration options ::= TLV OPTIONAL:Omit +-Octet1 ::= DIVISION | +-Protocol configuration options IEI ::= IEI  +-Octet2 ::= DIVISION | +-Length of protocol config options contents ::= LEN (0..255)  +-Octet3 ::= DIVISION | +-ext ::= EXT1  | +-spare ::= FIX  | +-Configuration protocol ::= CHOICE [PPP for use with IP PDP type] +-Octet4-Octet253 ::= DIVISION +-protocol config options contents ::= OCTETARRAY SIZE(0..250)

图示资源


同族文档