在当前的环境下,5G 核心网组网后,必然会与现有的4G EPC 进行交互。在23501当中有5G 和 EPC 交互架构图。其中需要关注的是N26接口。(如下图所示)
那么当 UE 在4G 和 5G 之间切换时,大概流程是怎么样的呢?
背景知识的介绍需要查阅 23501 5.17.2 Interworking with EPC 和 23502 4.11。
先说说一些基本的准则:
本文先关注5G 核心网的行为,EPC 的行为有时间再补上。
先来聊聊 EPS bearer ID allocation
EPS bearer ID allocation 主要目的是更新原有的session management 流程,然后在QOS flow 中映射出EBI,将ebi和相关的信息提供给NG-RAN。
这个过程只会发生于3GPP access supporting EPS interworking with N26已及其他一些限制条件允许的情况下(例如mutil-home,LADN等)。
上图的图就是EPS bearer ID allocation的流程。协议讲得比较全面,由于个人理解能力有限,我简化一下场景,先关注非漫游的情况。
Step 2:
就像前面讲到的,SMF+PGW-C(其实就是SMF在负责这步),在收到AMF的通知 EpsInterworkingIndication = "WITH_N26"后(你要去TS 29502,查看CreateSMContext 的各种IE的指示。在这里就是EpsInterworkingIndication) 。SMF会考虑一些现在条件,例如 User Plane Security Enforcement information, Access Type,mutil-home,LADN等,决定是否去做EPS bearer ID allocation。SMF 调用 Namf_Communication_EBIAssignment Request (PDU Session ID, ARP list),如你所见,这条消息只带了ARP。
Step 3-6:
Steps 3 to 6 apply only when AMF needs to revoke EBI previously allocated for an UE in order to serve a new SMF request of EBI for the same UE.
3-6 步是用于revoke EBI的。如果 AMF 没有可用的EBI能够分配,那么AMF会向SMF revoke 一些之前分配给对应QOS flow的ebi. 这里的SMF 是另外第一个为这个UE服务过的SMF。AMF通过Nsmf_PDUSession_UpdateSMContext (EBI(s) to be revoked) 去要求相关的SMF (called "SMF serving the released resources")去release the mapped EPS QoS parameters corresponding to the EBI to be revoked。然后AMF会存下已经分配的EBI,PDI,SMF 的地址等信息。
这个“拥有资源的SMF”收到上面第3步的请求后,如果想要释放的qos flow 是跟default QoS rule 相联系的QoS Flow,那么这个SMF 就释放全部 ebi 相关联的资源了。发送 Namf_Communication_EBIAssignment Request (PDU Session ID, Released EBI List) 给AMF 去告诉AMF 释放的EBI。 然后通过N1N2 transfer 去通知NGRAN 释放相关资源: Namf_Communication_N1N2Message Transfer (N2 SM information (PDU Session ID, EBI(s) to be revoked), N1 SM container (PDU Session Modification Command (PDU Session ID, EBI(s) to be revoked))) to inform the (R)AN and the UE to remove the mapped EPS QoS parameters corresponding to the EBI(s) to be revoked。
如果UE 在CM-CONNECTED状态,那么AMF发送N2 PDU Session Request (N2 SM information received from SMF, NAS message (PDU Session ID, N1 SM container (PDU Session Modification Command))) 消息到 (R)AN.
如果UE 是CM-IDLE状态,并且ATC is activated(不知道这是什么),AMF 更新并存储UE 上下文,并且跳过第5-6步。当UE reachable 时,AMF forwards the N1 message to synchronize the UE context with the UE.