在当前的环境下,5G 核心网组网后,必然会与现有的4G EPC 进行交互。在23501当中有5G 和 EPC 交互架构图。其中须要关注的是N26接口。(以下图所示)网络
那么当 UE 在4G 和 5G 之间切换时,大概流程是怎么样的呢?session
背景知识的介绍须要查阅 23501 5.17.2 Interworking with EPC 和 23502 4.11。架构
先说说一些基本的准则:app
本文先关注5G 核心网的行为,EPC 的行为有时间再补上。spa
先来聊聊 EPS bearer ID allocationorm
EPS bearer ID allocation 主要目的是更新原有的session management 流程,而后在QOS flow 中映射出EBI,将ebi和相关的信息提供给NG-RAN。blog
这个过程只会发生于3GPP access supporting EPS interworking with N26已及其余一些限制条件容许的状况下(例如mutil-home,LADN等)。接口
上图的图就是EPS bearer ID allocation的流程。协议讲得比较全面,因为我的理解能力有限,我简化一下场景,先关注非漫游的状况。资源
Step 2:rem
就像前面讲到的,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.