5G网络以数据包的形式将终端(UE)和外部网络之间发送和接收的数据进行传送,通常把这些用户的数据包叫做PDU(Packet Data Unit),这些PDU可以是IP的、Ethernet、和非结构化Unstructured的,并且用DNN(Data Network Name)来标识这些5G网络之外的不同的目的网络。DNN和4G的APN(Access Point Name)类似,比如访问公网的“3gnet”APN。5G网络将终端和外部网络之间建立的这一通路,称为一个PDU Session(会话)。
在TS 23.501的5.6.1节就这样描述的“The 5GC supports a PDU Connectivity Service i.e. a service that provides exchange of PDUs between a UE and a data network identified by a DNN. The PDU Connectivity Service is supported via PDU Sessions that are established upon request from the UE.”
5G网络的QoS模型中,SMF是执行会话管理QoS控制的网络功能实体,5G网络下,用户的签约信息结合PCF中的运营商策略控制信息来决定终端QoS。比如在UDM中用户签约,存储了默认(缺省的)QoS Flow的ARP/QFI,Session AMBR信息,终端AMBR;在SMF中存储了单个QoS Flow的ARP/GFBR/MFBR,SessionAMBR;在PCF中存储了专有QoS Flow的QoS参数,包含QoS Flow的ARP/QFI,Session AMBR信息。
在部署了PCF的场景下,最终的QoS策略还是要有PCF进行的参与,SMF向PCF发起策略控制请求,按照PCF的指示进行QoS Flow的控制,UPF负责下行方向的QoS Flow映射,UE和RAN负责上行方向的QoS Flow映射。
在4G EPC网络条件下,终端附着Attach到网络时要建立缺省承载,而5G则无需这样,当5G终端在网络中注册Registration时,无需建立和4G承载类似的PDU会话,这样,当5G终端在有业务需求时,此时会发起建立PDU会话的申请。并且在5G网络下,建立PDU会话只能由终端发起。那你会说只能由终端发起PDU会话,如果终端有要发送的需要可以建立,如果外部网络有数据要发送给终端该怎么办?这个时候,网络对终端进行寻呼,终端接收到寻呼进行响应,再发起Service Request流程,申请PDU会话的建立就可以了。真实网络条件下,场景要复杂得多,终端会处于这样那样的要建立PDU会话的情景,也都是在终端的PDU会话建立的基本流程之外再执行其他流程而已。
具体流程图可以参见TS 23.502的4.3.2节,非漫游(Home)或漫游本地疏通(LBO Local Breakout)的场景下,终端发起的PDU会话建立请求。
终端发起PDU会话建立的申请,这里就是“PDU Session Establishment Request ”信令,携带的关键字段“PDU Session ID”标识申请建立的PDU会话的ID,此ID对每个终端来说是唯一的,编号范围仅限此UE;本此请求中request-type为“initial-request”指示初始请求(已建立的PDU会话需要激活用户面连接时可使用Service Request业务请求流程),DNN值为“ims”指示此PDU会话为IMS而建立,本流程中,PDU会话是为IMS注册建立,所以此处DNN为IMS。
此外,PDU会话建立请求还可以携带更多的参数,比如请求的NSSAI,SSC mode(会话和服务连续性模式)等等。
接收到终端发送的建立PDU会话的请求,AMF需要为此请求选择决定会话管理的SMF,顾名思义,SMF是Session Management Function,就是执行会话管理功能。SMF按照运营商的决定,对会话进行策略控制,分配IP地址,决定SSC模式,等等,这里不做详细讨论,有兴趣了解详细功能描述,可以参见TS 23.501的6.2.2节。
NF发现和选择的总原则,一句话说,就是如果本地配置了服务地址,就按本地配置,否则就向NRF请求。
SMF的发现和选择原则,在TS 23.501的6.3.2节做了描述,AMF发起SMF选择请求,网络中部署了NRF,所以这里是向NRF发起SMF服务的查询请求,请求的目标NF为SMF,请求的服务名称为smfPduSession。其他参数还有请求者和目标服务的PLMN list,用于对服务PLMN进行核对,此处的请求的切片信息是之前终端注册时得到的Allow NSSAI(允许的NSSAI),如果请求建立PDU会话没有携带请求的切片信息,那么AMF会根据缺省的切片信息为PDU会话使用切片。
此处DNN的切片信息是终端发起PDU会话的DNN,也是IMS。
TS 23.501 Table 7.2.3-1 描述了SMF提供的服务,“按照从PCF收到的策略和计费规则管理PDU会话。此服务允许网络功能消费者处理PDU会话”。
SdrMsgHeader: { {Topic:525056 DestKey:{KeyType:2349
GroupId:4294967295 KeyValue:[0 52 0 170]} DestFilter: Ext:[]} }
SrcKey: < KeyType: 2170 KeyValue: “aaaa”DstKey: < KeyType: 2349 KeyValue: “aaaa”
SearchPara: < TargetNfType: NFTypeSMF RequesterNfType: NFTypeAMF ServiceNames: ServiceNamensmfPdusession RequesterNfInstanceFqdn:
“AMF1.CLUSTER1.NET2.AMF.5GC.MNC008.MCC460.3GPPNETWORK.ORG”
TargetPlmnList: <
mcc: “460”
mnc: '01'
RequesterPlmnList: <
mcc: “460”
mnc: “01”
Snssais: <
sst: 1
sd: “010101”
bitFlag: 2
Dnn: 'IMS'
TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
查询得到NRF的响应,得到目的NF实例ID为“1a53d55c-75b1-4610-9023-3d79c9bf3f45”,服务实例ID为“service_instance_0”,服务名称为“ServiceNamensmfPdusession”。Apiroot: 'http://20.20.20.19:31000。
-------UEAM-TRACE-------
TransMsgHeader: { “Topic”: 525058, “DestKey”: {
“KeyType”: 2170,
“GroupId”: 4294967295,
“KeyValue”: “ADQAqg==” }, “DestFilter”: null, “Ext”: null } DstKey: < KeyType: 2170 KeyValue: “aaaa”RetCode: StatusOK NfProfiles: < NfInstanceId: “1a53d55c-75b1-4610-9023-3d79c9bf3f45” NfServices: <
ServiceInstanceId: 'service_instance_0'
ServiceName: ServiceNamensmfPdusession
Version: <
apiVersionInUri: “v1”
apiFullVersion: “1.r15.0.0”**Apiroot: 'http://20.20.20.19:31000'** LogicLink: < Link: '[]byte{0x0, 0x5, 0x3, 0x30, 0x1a, 0x53, 0xd5, 0x5c, 0x75, 0xb1, 0x46, 0x10, 0x90, 0x23, 0x3d, 0x79, 0xc9, 0xbf, 0x3f, 0x45, 0xc, 0xb9, 0x10, 0x7b, 0x6f, 0x1, 0x0}' IPAddr: < Schema: UriSchemehttp IpType: IPv4 LocalIPV4Addr: '20.20.20.9:0' PeerIPV4Addr: '20.20.20.19' PeerIPV4Port: 31000 >
Capacity: 30 Priority: 30
LocalNfInstanceId: “7478c5d1-9648-40ed-7016-85ea90338f70” SearchPara: < TargetNfType: NFTypeSMF RequesterNfType: NFTypeAMF
ServiceNames: ServiceNamensmfPdusession RequesterNfInstanceFqdn:
“AMF1.CLUSTER1.NET2.AMF.5GC.MNC008.MCC460.3GPPNETWORK.ORG”
TargetPlmnList: <
mcc: “460”
mnc: “01”
RequesterPlmnList: <
mcc: “460”
mnc: “01”
Snssais: <
sst: 1
sd: “010101”
bitFlag: 2
Dnn: “IMS”
TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
AMF向NRF查询得到了SMF的候选信息,由于此处网络规模简单,候选信息只有1个服务实例可供选择,那就选择这个SMF发起建立会话管理上下文的请求。AMF和SMF之间采用SBI服务化接口,基于HTTP2.0,“POST /nsmf-pdusession/v1/sm-contexts”向SMF的服务提交SUPI为“imsi-460011200100019”对应的会话管理数据进行处理,这里是增加会话管理的资源。黑体标注的是这个PDU Session为5的PDU会话的DNN,切片信息SNSSAI,对应的服务网络信息,AMF和接入类型以及接入网类型、终端的位置信息(TAC和NRCellID),终端时区信息等等。会话信息的URL为“http://20.20.20.9:31000/nsmf-pdusession/smcontextstatus/v1/sm-contexts/0881be18120a08fd101205003400aa05”。
------HTTP-TRACE-BEGIN------ domain: request, role: client local_addr:20.20.20.9:29184 peer_addr:20.20.20.19:31000 protocal:
TCP msgtype:117571587 rid=112499410, scheme=http, stream id=951POST /nsmf-pdusession/v1/sm-contexts HTTP/2.0 user-agent:
AMF-7478c5d1-9648-40ed-7016-85ea90338f70 content-type:
multipart/related; boundary=----Boundary host: 20.20.20.19:31000
content-length: 909------Boundary Content-Type: application/json
{“supi”:“imsi-460011200100019”,“gpsi”:“msisdn-8618612000019”,“pduSessionId”:5,“dnn”:“IMS”,“sNssai':{“sst”:1,“sd”:“010101”},“servingNfId':“7478c5d1-9648-40ed-7016-85ea90338f70”,“guami”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“amfId”:“000041”},“servingNetwork”:{“mcc”:“460”,“mnc”:“01”},“requestType”:“INITIAL_REQUEST”,“n1SmMsg”:{“contentId”:“n1msg”},“anType”:“3GPP_ACCESS”,“ratType”:“NR”,“ueLocation”:{“nrLocation”:{“tai”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“tac”:“000C26”},“ncgi”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“nrCellId”:“21001f001”}}},“ueTimeZone”:” 08:00”,“smContextStatusUri”:“http://20.20.20.9:31000/nsmf-pdusession/smcontextstatus/v1/sm-contexts/0881be18120a08fd101205003400aa05”,“selMode”:“VERIFIED”,“epsInterworkingInd”:“WITH_N26”}
------Boundary Content-Type: application/vnd.3gpp.5gnas Content-Id: n1msgMsgEnter ng-sm-msg pDU-session-identity:0x5 (5) procedure-transaction-identity:0x44 (68) msg-body pDUSessionEstablishmentRequest integrity-protection-maximum-data-rate maximum-data-rate-per-UE-for-user-plane-integrity-protection-for-uplink:full-data-rate
(255)
maximum-data-rate-per-UE-for-user-plane-integrity-protection-for-downlink:full-data-rate
(255)
pDU-session-type
spare:0x0 (0)
pDU-session-type-value:ipv6 (2)
sSC-mode
spare:0x0 (0)
sSC-mode-value:sSC-mode-1 (1)
extended-protocol-configuration-options
extended-protocol-configuration-options-contents-ue2net:80 00 0A 00 00 02 00 00 01 00 00 03 00------Boundary–
------HTTP-TRACE-END------
收到AMF提出的会话管理上下文创建的请求,SMF进行响应,回送给AMF响应结果,201 Created表示创建成功,会话上下文URL“http://20.20.20.19:31000/nsmf-pdusession/v1/sm-contexts/2160787646”。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.9:29184 peer_addr:20.20.20.19:31000 protocal:
TCP msgtype:117571588 rid=112499410, scheme=http, stream id=951HTTP/2.0 201 Created content-type: application/json content-length: 2
location:
http://20.20.20.19:31000/nsmf-pdusession/v1/sm-contexts/2160787646{}
------HTTP-TRACE-END------
由于终端发起了建立PDU会话的申请,终端的连接管理状态将发生变化,所以SMF将更新UDM中终端连接管理信息;另外,为了处理终端发起的PDU会话建立请求,SMF需要获得终端的签约信息,包括切片和DNN、QoS档案、SSC模式等等信息。
首先,SMF调用Nudm-RegistrationSMFRequest发起SMF的相关注册,“PUT /nudm-uecm/v1/imsi-460011200100019/registrations/smf-registrations/5”对IMSI为位数19的号码SMF注册信息进行注册,对应此PDU会话的SMF实例ID,PDU会话ID、SNSSAI和DNN、PLMN List,pgwFQDN信息等。
------HTTP-TRACE-BEGIN------ domain: request, role: client local_addr:20.20.20.19:28737 peer_addr:10.0.0.82:8080 protocal: TCP
msgtype:117637203 rid=53382330, scheme=http, stream id=319PUT
/nudm-uecm/v1/imsi-4600112001
00019/registrations/smf-registrations/5
HTTP/2.0 user-agent: SMF-1a53d55c-75b1-4610-9023-3d79c9bf3f45
content-type: application/json host: epc.mnc001.mcc460.3gppnetwork.org
content-length: 226{“smfInstanceId':“1a53d55c-75b1-4610-9023-3d79c9bf3f45”,“pduSessionId”:5,“singleNssai”:{“sst”:1,“sd”:“010101”},“dnn”:“ims”,“plmnId”:{“mcc”:“460”,“mnc”:“01”},“pgwFqdn”:'hzsmf001bhw.hz.zj.node.5gc.mnc000.mcc460.3gppnetwork.org”}
------HTTP-TRACE-END------
UDM将SMF发送的注册请求中信息进行处理,成功则回送201Created。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.19:28737 peer_addr:10.0.0.82:8080 protocal: TCP
msgtype:117637204 rid=53382330, scheme=http, stream id=319HTTP/2.0 201 Created content-type: application/json content-length:
226 location:
http://10.0.0.82:8080/nudm-uecm/v1/imsi-460011200100019/registrations/smf-registrations{“smfInstanceId”:“1a53d55c-75b1-4610-9023-3d79c9bf3f45”,“pduSessionId”:5,“singleNssai”:{“sst”:1,“sd”:“010101”},“dnn”:“ims”,“plmnId”:{“mcc”:“460”,“mnc”:“01”},“pgwFqdn”:“hzsmf001bhw.hz.zj.node.5gc.mnc000.mcc460.3gppnetwork.org”}
------HTTP-TRACE-END------
SMF向UDM请求会话管理的签约信息,“GET
/nudm-sdm/v1/imsi-460011200100019/sm-data?single-nssai={“sst”:1,“sd”:“010101”}&dnn=ims”,关键字段有IMSI、Single-NSSAI和DNN,
------HTTP-TRACE-BEGIN------ domain: request, role: client local_addr:20.20.20.19:28736 peer_addr:10.0.0.82:8080 protocal: TCP
msgtype:117637147 rid=53398715, scheme=http, stream id=499GET
/nudm-sdm/v1/imsi-460011200100019/sm-data?single-nssai={“sst”:1,“sd”:“010101”}&dnn=ims
HTTP/2.0 user-agent: SMF-1a53d55c-75b1-4610-9023-3d79c9bf3f45 host:
epc.mnc001.mcc460.3gppnetwork.org------HTTP-TRACE-END------
UDM根据SMF请求的切片和DNN信息,查询用户的签约信息,回送给SMF对应的可以创建的PDU会话类型(这里回送缺省PDU会话类型为IPv4,允许的会话类型为IPv4v6和IPv6),SSC模式(这里回送缺省SSC模式为1,允许的SSC模式为2、3),和EPS互操作的指示iwkEpsInd:True,5G QoS档案信息,5QI为9,ARP分配和保留优先级为1,会话聚合速率sessionAmbr上行和下行均为1Gbps,计费CC字段“3gppChargingCharacteristics”。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.19:28736 peer_addr:10.0.0.82:8080 protocal: TCP
msgtype:117637148 rid=53398715, scheme=http, stream id=499HTTP/2.0 200 OK content-type: application/json content-length: 624
[{“singleNssai”:{“sst”:1,“sd”:“010101”},“dnnConfigurations”:{“ims”:{“pduSessionTypes”:{“defaultSessionType”:“IPV4”,“allowedSessionTypes”:[“IPV4V6”,“IPV6”]},“sscModes”:{“defaultSscMode”:“SSC_MODE_1”,“allowedSscModes”:[“SSC_MODE_2”,“SSC_MODE_3”]},“iwkEpsInd”:true,“ladnIndicator”:false,“5gQosProfile”:{“5qi”:9,“arp”:{“priorityLevel”:1,“preemptCap”:“NOT_PREEMPT”,“preemptVuln”:“NOT_PREEMPTABLE”},“priorityLevel”:1},“sessionAmbr”:{“uplink”:“1
Gbps”,“downlink”:“1
Gbps”},“3gppChargingCharacteristics”:“0000”,“staticIpAddress”:[{“ipv6Addr”:“2408:851a:400:1::19”}],“upSecurity”:{“upIntegr”:“NOT_NEEDED”,“upConfid”:“NOT_NEEDED”}}}}]
------HTTP-TRACE-END------
在UDM完成对应PDU会话的连接管理注册和取回会话管理签约信息之后,SMF向AMF回送创建上下文的响应。“http://20.20.20.19:31000/nsmf-pdusession/v1/sm-contexts/2160787646”是SMF中对应的会话管理上下文地址。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.9:29184 peer_addr:20.20.20.19:31000 protocal:
TCP msgtype:117571588 rid=112499410, scheme=http, stream id=951HTTP/2.0 201 Created content-type: application/json content-length: 2
location:
http://20.20.20.19:31000/nsmf-pdusession/v1/sm-contexts/2160787646{}
------HTTP-TRACE-END------
VOID
前面提到PCF是5G网络中执行策略控制决策的实体,SMF要向PCF发起策略控制的申请,这里是申请会话管理的策略关联的建立。首先要进行PCF的发现和选择。
向NRF发起PCF选择的请求,TargetNfType为NFTypePCF,服务名称为“ServiceNamenpcfSmpolicycontrol”,目标和请求者的PLMN List均为“460 01”。请求者的切片和DNN、SUPI信息。
TransMsgHeader: { “Topic”: 525056, “DestKey”: {
“KeyType”: 2349,
“GroupId”: 0,
“KeyValue”: “AAAABw==” }, “DestFilter”: null, “Ext”: null } SrcKey: < KeyType: 2066 KeyValue: “aaaaaaaaaa”DstKey: < KeyType: 2349 KeyValue: “aaaa”
ReqInfoType: BOTH SearchPara: < TargetNfType: NFTypePCF RequesterNfType: NFTypeSMF ServiceNames:
ServiceNamenpcfSmpolicycontrol TargetPlmnList: <
mcc: “460”
mnc: “01”
RequesterPlmnList: <
mcc: “460”
mnc: “01”
bitFlag: 6
> Snssais: <
sst: 1
sd: “010101”
bitFlag: 2
Dnn: “ims” Supi: “imsi-460011aaaaa0019” Gpsi: 'msisdn-861861aaa0019'
TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
NRF根据SMF请求的切片和DNN信息返回可用的PCF列表, 提供了PCF的网络功能实例的ID,服务实例的ID,“Apiroot: “http://10.10.10.24:8080””,DNNlist中,服务的DNN有“ims”,“ctnet”,“huawei.com”,“3gnet”。
TransMsgHeader: { “Topic”: 525061, “DestKey”: {
“KeyType”: 2066,
“GroupId”: 4294967295,
“KeyValue”: “AA4AAMQ2AAEABQ==” }, “DestFilter”: null, “Ext”: null } DstKey: < KeyType: 2066 KeyValue: “aaaaaaaaaa”RetCode: StatusOK NfProfiles: < NfInstanceId: “4947a69a-f61b-4bc1-b9da-47c9c5d14b65” NfServices: <
ServiceInstanceId: “4947a69a-f61b-4bc1-b9da-47c9c8690002”
ServiceName: ServiceNamenpcfSmpolicycontrol
Version: <
apiVersionInUri: “v1”
apiFullVersion: “1.prer15.1.0”**Apiroot: 'http://10.10.10.24:8080'** LogicLink: < Link: '[]byte{0x0, 0x0, 0x4, 0x30, 0x49, 0x47, 0xa6, 0x9a, 0xf6, 0x1b, 0x4b, 0xc1, 0xb9, 0xda, 0x47, 0xc9, 0xc5, 0xd1, 0x4b, 0x65,
0x13, 0x76, 0x9d, 0x71, 0x60, 0x0, 0x0}'
>
IPAddr: <
Schema: UriSchemehttp
Fqdn: 'bsghzpcrf01fe01bhw.zz.zzdc.pcrf.epc.mnc001.mcc460.3gppnetwork.org'
IpType: IPv4
LocalIPV4Addr: “20.20.20.19:0”
PeerIPV4Addr: '10.10.10.24'
PeerIPV4Port: 8080
>**PcfInfo: <
DnnList: “ims”
DnnList: “ctnet”
DnnList: “huawei.com”
DnnList: “3gnet”
SupiRanges: <
start: “460010aaaaa0000”
end: “460019aaaaa9999”RxDiamHost: 'rx-diam.host' RxDiamRealm: 'rx-diam.domain'**
Priority: 1
LocalNfInstanceId: “1a53d55c-75b1-4610-9023-3d79c9bf3f45” ReqInfoType: BOTH SearchPara: < TargetNfType: NFTypePCF
RequesterNfType: NFTypeSMF ServiceNames:
ServiceNamenpcfSmpolicycontrol TargetPlmnList: <
mcc: “460”
mnc: “01”
RequesterPlmnList: <
mcc: “460”
mnc: “01”
bitFlag: 6
Snssais: <
sst: 1
sd: “010101”
bitFlag: 2
Dnn: “ims” Supi: “imsi-460011aaaaa0019” Gpsi: “msisdn-861861aaa0019”
TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
------HTTP-TRACE-BEGIN------ domain: request, role: client local_addr:20.20.20.19:28672 peer_addr:10.10.10.24:8080 protocal:
TCP msgtype:118030339 rid=73011560, scheme=http, stream id=1POST /npcf-smpolicycontrol/v1/sm-policies HTTP/2.0 user-agent:
SMF-1a53d55c-75b1-4610-9023-3d79c9bf3f45 content-type:
application/json host:
bsghzpcrf01fe01bhw.zz.zzdc.pcrf.epc.mnc001.mcc460.3gppnetwork.org
content-length: 1165{“accNetChId”:{“accNetChaIdValue”:199229956,“sessionChScope”:true},“chargEntityAddr”:{“anChargIpv4Addr”:“20.20.20.19”},“gpsi”:“msisdn-8618612000019”,“supi”:“imsi-460011200100019”,“pduSessionId”:5,“pduSessionType”:“IPV6”,“chargingcharacteristics”:“0000”,“dnn”:“ims”,“notificationUri”:“http://20.20.20.19:31000/npcf-smpolicycontrol/notification/v1/sm-policies/08c1a018120d0892101208000e0000c4360001”,“accessType”:“3GPP_ACCESS”,“ratType”:“NR”,“servingNetwork”:{“mnc”:“01”,“mcc”:“460”},“userLocationInfo”:{“nrLocation”:{“tai”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“tac”:“000C26”},“ncgi”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“nrCellId”:“21001f001”}}},“ueTimeZone”:' 08:00',“subsSessAmbr”:{“uplink”:“1000000000
bps”,“downlink”:“1000000000
bps”},“subsDefQos”:{“5qi':9,“arp”:{“priorityLevel”:1,“preemptCap”:“NOT_PREEMPT”,“preemptVuln”:“NOT_PREEMPTABLE”},“priorityLevel”:1},“numOfPackFilter”:16,'online':true,“offline”:true,“sliceInfo”:{“sst”:1,“sd”:“010101”},“qosFlowUsage”:'IMS_SIG”,“servNfId”:{“servNfInstId”:“7478c5d1-9648-40ed-7016-85ea90338f70”,“guami”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“amfId”:“000041”}},“suppFeat”:“1127A”,“smfId”:“1a53d55c-75b1-4610-9023-3d79c9bf3f45”}
------HTTP-TRACE-END------
PCF对SMF的请求,发送对应的策略控制信息,包含PCC规则,QoS特性,这里看pccrules 10136就是对应的PCC规则,也就是对应QoS Flow的处理规则。按照TS 23.501 5.7.4节关于5G的标准QoS模型QFI的描述,5QI为5是建议为IMS信令所使用。所以PCF响应消息中,返回的QoSFlowUsage(QoS流用途)为“IMS_SIG”(IMS信令)。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.19:28672 peer_addr:10.10.10.24:8080 protocal:
TCP msgtype:118030340 rid=73011560, scheme=http, stream id=1HTTP/2.0 201 Created content-type: application/json content-length:
711 location:
http://10.10.10.24:8080/npcf-smpolicycontrol/v1/sm-policies/e852a11ae47db52c281627950{“pccRules”:{“10316”:{“flowInfos”:[{“flowDescription”:“permit out ip
from any to any”,“flowDirection”:“BIDIRECTIONAL”}],“pccRuleId”:“10316”,“precedence”:65534,“refQosData”:[“10312”],“refTcData”:[“3”]}},“qosDecs”:{“10312”:{“5qi”:5,“arp”:{“preemptCap”:“NOT_PREEMPT”,“preemptVuln”:“PREEMPTABLE”,“priorityLevel”:2},“defQosFlowIndication”:true,“maxbrDl”:“1000000000
bps”,“maxbrUl”:“1000000000
bps”,“qosId”:“10312”}},“qosFlowUsage”:“IMS_SIG”,“sessRules”:{“123”:{“authDefQos”:{“5qi”:5,“arp”:{“preemptCap”:“NOT_PREEMPT”,“preemptVuln”:“PREEMPTABLE”,“priorityLevel”:2}},“authSessAmbr”:{“downlink”:“1000000000
bps”,“uplink”:“1000000000
bps”},“sessRuleId”:“123”}},“traffContDecs”:{“3”:{“flowStatus”:“ENABLED”,“tcId”:“3”}}}------HTTP-TRACE-END------
收到PCF的策略控制信息之后,SMF要控制UPF进行QoS Flow的控制参数下发,首先要选择UPF,UPF不属于控制面,并不使用服务化架构。SMF和UPF之间使用PFCP协议进行交互。这里的UPF选择属于内部消息。这里请求的UPF实例ID为“upf_instance_2”,是SMF上通过PFCP协议建立的连接关系。
SourcKey: < KeyType: 2061 KeyValue: “aaaa”
DstKey: < KeyType: 2350 KeyValue: “aaaa-aaaaaaaaaaaaaaaaa”
CustomSearchPara: < TargetNfType: “NFTypeUPF” RequesterNfType: “NFTypeSMF” UpfCon: <
InstanceId: “upf_instance_2”TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
UPF选择响应消息, 此UPF实例可为DNN为“ims”,“3gnet”,DNNupfinfoList中,对DNN的PDU会话类型进行描述,这里看有IPV4,IPV6,IPV4V6,UNSTRUCTURED,ETHERNET。
TransMsgHeader: { “Topic”: 525107, “DestKey”: {
“KeyType”: 2061,
“GroupId”: 4294967295,
“KeyValue”: “wMsAvg==” }, “DestFilter”: null, “Ext”: null } SrcKey: < KeyType: 2350 KeyValue: “aaaa-aaaaaaaaaaaaaaaaa”DstKey: < KeyType: 2061 KeyValue: “aaaa”
CustomSearchResult: < RetCode: StatusOK UpfResult: <
MetaResult: <
NfInstanceId: “upf_instance_2”
NfStatus: NFStatusREGISTERED
FQDN: “huawei3”
Capacity: 100
APN: “3gnet”
APN: “ims”
Area: “area02”
Area: “area05”
Area: “area07”
SnssaiUpfInfos: <
sNssai: <
sst: 1
sd: “010101”dnnUpfInfoList: < dnn: '3gnet' pduSessionTypes: PduSessionTypeIPV4 pduSessionTypes: PduSessionTypeIPV6 pduSessionTypes: PduSessionTypeIPV4V6 pduSessionTypes: PduSessionTypeUNSTRUCTURED pduSessionTypes: PduSessionTypeETHERNET > dnnUpfInfoList: < dnn: 'ims' pduSessionTypes: PduSessionTypeIPV4 pduSessionTypes: PduSessionTypeIPV6 pduSessionTypes: PduSessionTypeIPV4V6 pduSessionTypes: PduSessionTypeUNSTRUCTURED pduSessionTypes: PduSessionTypeETHERNET > > PduSessionType: PduSessionTypeIPV4 PduSessionType: PduSessionTypeIPV6 PduSessionType: PduSessionTypeIPV4V6 PduSessionType: PduSessionTypeUNSTRUCTURED PduSessionType: PduSessionTypeETHERNET Op: MOD >
LocalNfInstanceId: “1a53d55c-75b1-4610-9023-3d79c9bf3f45” CustomSearchPara: < TargetNfType: “NFTypeUPF” RequesterNfType:
“NFTypeSMF” UpfCon: <
InstanceId: “upf_instance_2”TracePara: < UserIdType: UserIdTypeSUPI UserId: “aaaa-aaaaaaaaaaaaaaa”
选择好UPF后,SMF向UPF发起PFCP会话建立请求,下发QoS Flow控制的参数。
PFCP会话建立请求包含的参数集较多,总体上看主要是UPF的转发规则,首先是PDR(Packet Detection Rule),QoS Flow的特性就是一个或者多个SMF发送给UPF的PDR,TS 23.501 5.8.2.4.2节对IP类型、以太网和非机构化PDU会话类型的PDR组成进行了定义,以IP类型(包含IPV4、IPV6、IPV4V6)为例,PDR由 核心网隧道信息、网络实例、QFI、5.7.6.2节定义的IP包过滤集、应用识别符组成。
下图是PFCP会话建立的基本信息,比如消息类型是'PFCPSessionEstablishmentRequest',节点的IP地址类型为IPv6,地址为2401XXXX。
UPF接受SMF发送的PFCP会话建立请求,回送Accept。
SMF向AMF发送消息,由AMF转发给UE,
------HTTP-TRACE-BEGIN------ domain: request, role: server local_addr:20.20.20.9:31000 peer_addr:20.20.20.19:28736 protocal:
TCP msgtype:118161423 rid=138600715, scheme=http, stream id=425POST /namf-comm/v1/ue-contexts/imsi-460011200100019/n1-n2-messages
HTTP/2.0 host:
amf1.cluster1.net2.amf.5gc.mnc008.mcc460.3gppnetwork.org
content-length: 713 user-agent:
SMF-1a53d55c-75b1-4610-9023-3d79c9bf3f45 content-type:
multipart/related; boundary=----Boundary------Boundary Content-Type: application/json
{“n1MessageContainer”:{“n1MessageClass”:“SM”,“n1MessageContent”:{“contentId”:“n1msg”}},“n2InfoContainer”:{“n2InformationClass”:“SM”,“smInfo”:{“pduSessionId”:5,“n2InfoContent”:{“ngapMessageType”:47,“ngapIeType”:“PDU_RES_SETUP_REQ”,“ngapData”:{“contentId”:“n2msg”}}}},“pduSessionId”:5}
------Boundary Content-Type: application/vnd.3gpp.5gnas Content-Id: n1msgMsgEnter ng-sm-msg pDU-session-identity:0x5 (5) procedure-transaction-identity:0x44 (68)
------Boundary Content-Type: application/vnd.3gpp.ngap Content-Id: n2msg
Ngap-Msg ngnas-message:00 00 05 00 82 00 0A 0C 3B 9A 3F 00 30 3B 9A 3F 00 00 8B 00 16 07 F0 24 08 81 40 3F 00 3F
00 00 00 00 00 00 00 00 01 00 F8 00 3F 00 86 00 01 10 00 8A 00 02 09
00 00 88 00 07 01 01 00 00 05 04 4A------Boundary–
------HTTP-TRACE-END------
AMF向RAN发送分配PDU会话资源的请求,其中AMF-UE-NGAP-ID标识终端的在AMF中的NGAP-ID,RAN-UE-NGAP-ID则是终端在RAN侧的NGAP-ID。还包含PDU会话ID和切片信息。
RAN侧对PDU会话ID为5的资源进行分配,回送建立接受响应,并hi送其他的传输层信息,比如GTP隧道的信息。
RAN侧回送PDU会话资源分配信息后,AMF向SMF发起更新会话管理上下文的请求,将RAN侧回送的SM消息发送给SMF。
------HTTP-TRACE-BEGIN------ domain: request, role: client local_addr:20.20.20.9:29184 peer_addr:20.20.20.19:31000 protocal:
TCP msgtype:117571593 rid=112532180, scheme=http, stream id=955POST /nsmf-pdusession/v1/sm-contexts/2160787646/modify HTTP/2.0
user-agent: AMF-7478c5d1-9648-40ed-7016-85ea90338f70 content-type:
multipart/related; boundary=----Boundary host: 20.20.20.19:31000
content-length: 528------Boundary Content-Type: application/json
{“guami”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“amfId”:“000041”},“servingNetwork”:{“mcc”:“460”,“mnc”:“01”},“anType”:“3GPP_ACCESS”,“ueLocation”:{“nrLocation”:{“tai”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“tac”:“000C26”},“ncgi”:{“plmnId”:{“mcc”:“460”,“mnc”:“01”},“nrCellId”:“21001f001”}}},“n2SmInfo”:{“contentId”:“n2smInfo”},“n2SmInfoType”:“PDU_RES_SETUP_RSP”}
------Boundary Content-Type: application/vnd.3gpp.ngap Content-Id: n2smInfoNgap-Msg ngnas-message:20 0F E0 24 08 3F 60 A0 00 00 00 00 00 00 00 00 00 00 3E B4 F4 A4 3F 00 01 14
------Boundary–
------HTTP-TRACE-END------
接收到AMF转发的RAN侧发送来的会话管理消息,SMF向UPF发送PFCP会话更新请求,请求中更新了FAR-ID,TEID和IPv6信息,对应UPF的SEID和IPv6地址,此PDU会话的通路建立起来。
UPF对SMF发起的PFCP会话修改请求进行响应,发送request-acceptd进行确认。
SMF向AMF回送PDU会话上下文更新成功的响应。
------HTTP-TRACE-BEGIN------ domain: response, role: client local_addr:20.20.20.9:29184 peer_addr:20.20.20.19:31000 protocal:
TCP msgtype:117571594 rid=112532180, scheme=http, stream id=955HTTP/2.0 200 OK content-type: application/json content-length: 2
{}
------HTTP-TRACE-END------
此时PDU会话建立即成功了。
联系客服