导读
在正式讨论SA注册的相关NAS流程之前,笔者觉得有必要先讨论下SA下的RRC连接的建立流程,毕竟这是终端与网络交互的连接基础,同时也会讨论下不同场景下的RRC建立流程中信令内容的异同。
RRC连接建立流程
SA注册流程主要是终端与5GC之间的信令交互,但两者之间的通信必须通过5G基站gNB来完成。所以笔者想在介绍SA注册流程的过程中,顺便讨论下5G SA的RRC连接建立流程。
先来看两个RRC建立流程,分别是终端开机注册的RRC连接建立以及Service Request流程中的RRC连接建立
我们可以看到,虽说两幅图都是RRC Connection流程,但是还是有区别的。
先来看看RRCSetupRequest消息这个消息主要包括ue-Identity和establishmentCause这两部分内容:
- 对于ue-Identity,如果高层提供了5G-S-TMSI,终端使用ng-5G-S-TMSI-Part1作为ue-Identity;否则终端使用一个39bit的随机数。回想下RACH里面的Msg3,用于竞争解决终端需要携带ue-identity其实就是指这块内容。
- 对于establishmentCause,主要是携带一个原因值表明终端想干什么,比如mt-Access, mo-Signalling, mo-Data等等
- 看看上面的图片对比一下,是不是ue-Identity有所不同啊!对于刚开机未注册的终端,它还没有5G-S-TMSI,所以采用了39bit的random value;而对于已经完成注册进行service request流程的终端,它是有合法的5G-S-TMSI的,因此它会将5G-S-TMSI的Part1作为ue-Identity使用
TS 38331 5.3.3.3 Actions related to transmission of RRCSetupRequest message
The UE shall set the contents of RRCSetupReques tmessage as follows:
1> set the ue-Identity as follows:
2> if upper layers provide a 5G-S-TMSI:
3> set the ue-Identity to ng-5G-S-TMSI-Part1;
2> else:
3> draw a 39-bit random valuein the range 0..239-1 and set the ue-Identity to this value;
NOTE 1: Upper layers provide the 5G-S-TMSI if the UE is registered in the TA of the current cell.
1> set the establishmentCause in accordance with the information received from upper layers;
再来看看RRCSetupComplete, 它主要包含三方面的内容:选择的PLMN,gNB选择AMF的参考信息和携带的NAS消息(如registration request, service request等),这里重点说说gNB选择AMF的参考信息:
- 一种是终端已经完成SA的注册,拥有合法的5G-GUTI/5G-S-TMSI,gNB根据5G-S-TMSI就可以选择AMF;
- 另一种是终端刚刚开机,准备开始注册流程,此时终端没有合法的5G-S-TMSI,gNB也没有关于这个终端合法的上下文。gNB需要一定的信息才能将终端的NAS消息转发至正确的AMF,所以在RRCSetupComplete中终端要给基站足够的信息供其选择AMF使用
The AMF selection functionality in the 5G-AN may consider the following factors for selecting the AMF Set:
- AMF Region ID and AMF Set ID derived from GUAMI.
- Requested NSSAI.
- Local operator policies.
如果高层提供了5G-S-TMSI,前面说了part1已经在RRCSetupRequest中发了,那么part2将在RRCSetupComplete中发送,这对应于第二幅图的情况(service request中的RRC连接建立);如果高层没有提供5G-S-TMSI,终端会携带registered AMF信息和guami-Type以及s-NSSAI-List,供gNB选择AMF使用,这对应于第一幅图中的情况(终端开机注册的RRC连接建立)。对比一下上面图片中的RRCSetupComplete消息,体会一下携带信息的不同之处吧!
1> set the content of RRCSetupComplete message as follows:
2> if upper layers provide a 5G-S-TMSI:
3> if the RRCSetup is received in response to an RRCSetupRequest:
4> set the ng-5G-S-TMSI-Value to ng-5G-S-TMSI-Part2;
3> else:
4> set the ng-5G-S-TMSI-Value to ng-5G-S-TMSI;
2> set the selectedPLMN-Identity to the PLMN selected by upper layers (TS 24.501 [23]) from the PLMN(s) included in the plmn-IdentityList in SIB1;
2> if upper layers provide the 'Registered AMF':
3> include and set the registeredAMF as follows:
4> if the PLMN identity of the 'Registered AMF' is different from the PLMN selected by the upper layers:
5> include the plmnIdentity in the registeredAMF and set it to the value of the PLMN identity in the 'Registered AMF' received from upper layers;
4> set the amf-Identifier to the value received from upper layers;
3> include and set the guami-Type to the value provided by the upper layers;
2> if upper layers provide one or more S-NSSAI (see TS 23.003 [21]):
3> include the s-NSSAI-Listand set the content to the values provided by the upper layers;
2> set the dedicatedNAS-Message to include the information received from upper layers;
– AMF-Identifier
The IE AMF-Identifier (AMFI) comprises of an AMF Region ID, an AMF Set ID and an AMF Pointer as specified in TS 23.003 [21], clause 2.10.1.
<GUAMI> := <MCC> <MNC> <AMF Region ID> <AMF Set ID> <AMF Pointer>
<5G-GUTI> := <GUAMI> <5G-TMSI>
<5G-S-TMSI> := <AMF Set ID> <AMF Pointer> <5G-TMSI>
欢迎关注微信公众号:GiveMe5G
本文暂时没有评论,来添加一个吧(●'◡'●)