1. URSP基本概念
1.1 什么是URSP
URSP: UE Route Selection Policy, 即用户路由选择策略。该策略描述了手机应用与网路切片之间的对应关系,终端根据URSP规则,为app选择网路切片。
1.2 应用背景
在4G网路环境下,终端设备的操作系统会在开机时建立一路默认数据承载,其应用程序数据都是通过这一路默认承载进行传输的,且应用数据都跑在用一个网路上。
到了5G,引入网络切片,就是让手机里不同的app数据,通过不同的数据承载跑在由运营商划分出来的不同的逻辑网络上,实现网络资源面向不同业务需求进行灵活动态的分配
1.3 URSP规则例子
2. UE策略管理流程
2.1 创建
2.1.1 总体流程
2.1.2 Registration Request
UE触发UE STATE INDICATION流程,实际上包含在Registration Request消息的Payload Container 中,其中Payload Container IE 是 UE Policy Container。
消息定义
IEI | Information Element | Type/Reference | P | Format | Length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PTI | Proecdure transaction identify | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
UE STATE INDICATION message identify | UE policy delivery service message type | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
UPSI list | UPSI list | M | LV-E | 9-65531 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
UE policy classmark | UE policy classmark | M | LV | 2-4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | UE OS Id | OS Id | O | TLV | 18-242 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The total length of the UE STATE INDICATION message content cannot exceed 65535 octets. |
参考:TS24.501(5G系统NAS协议)Annex D: UE policy deivery service D.5.4
2.1.3 Npcf_UEPolicyControl_Create
NF服务消费者创建用户策略关联场景如下:
- UE初始注册到网络
- UE移动性注册,且AMF和PCF之间不存在用户策略关联
- AMF重定向,新的AMF选择到新的PCF
方法:POST
资源URI:{apiRoot}/npcf-ue-policy-control/v1/policies
请求消息数据结构:PolicyAssociationRequest
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
notificationUri | Uri | M | 1 | AMF的URI,用来接收来自PCF的通告 | |||||||||||||||||||||||||||||||||||||||||||||
supi | Supi | M | 1 | 用户的标识 | |||||||||||||||||||||||||||||||||||||||||||||
uePolReq | UePolicyRequest | C | 0..1 | 当AMF收到 "UE STATE INDICATION"消息,提供该字段请求用户策略. | |||||||||||||||||||||||||||||||||||||||||||||
guami | Guami | Ck | 0..1 | 当NF服务消费者是AMF,提供guami | |||||||||||||||||||||||||||||||||||||||||||||
serviceName | ServiceName | O | 0..1 | 当NF服务消费者是AMF,提供npcf-ue-policy-control 字段,期望通过Npcf_UEPolicyControlControl_UpdateNotify收到信息 | |||||||||||||||||||||||||||||||||||||||||||||
serviceNfId | NfInstanceId | C | 0..1 | 当NF服务消费者是AMF,提供AMF实例ID |
响应消息数据结构:PolicyAssociation
消息头"Location"包含创建资源的URI:{apiRoot}/npcf-ue-policy-control/v1/policies/{polAssoId}
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
request | PolicyAssiciationRequest | O | 0..1 | AMF请求创建策略关联时提供的信息 | |||||||||||||||||||||||||||||||||||||||||||||
uePolicy | UePolicy | O | 0..1 | PCF确定的用户策略 | |||||||||||||||||||||||||||||||||||||||||||||
uePolicy | UePolicyRequest | C | 0..1 | 当AMF收到 "UE STATE INDICATION"消息,提供该字段请求用户策略. | |||||||||||||||||||||||||||||||||||||||||||||
triggers | array(RequestTrigger) | O | 0..1 | PCF订阅的请求触发,只有LOC_CH,PRA_CH, PLMN_CH,CON_STATE_CH 被允许 |
响应虽然有uePolicy字段,但协议未明确说明该字段的值能传输给UE。
参考 TS29.525(5G系统用户策略管理服务)
2.1.4 Namf_N1N2MessageSubscribe
方法:POST
资源URI:{apiRoot}/namf-comm/v1/{ueContextId}/n1-n2-message/subscriptions
请求消息数据结构:UeN1N2InfoSubscriptionCreateData
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
n1MessageClass | N1MessageClass | C | 0..1 | PCF订阅N1 Message(UE Policy Delivery result)通告,值为UPDP | |||||||||||||||||||||||||||||||||||||||||||||
n1NotifyCallbackUri | N1NotifyCallbackUri | O | 0..1 | PCF的URI |
响应消息数据结构:UeN1N2InfoSubscriptionCreatedData
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
n1n2NotifySubscriptionId | string | M | 1 | AMF为订阅创建的Id,用户向PCF通知UE相关的N1/N2信息 |
参考 TS29.518(5G系统接入与移动管理服务)
2.1.5 Namf_N1N2MessageTransfer
方法:POST
资源URI:{apiRoot}/namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-message
请求消息数据结构:N1N2MessageTransferReqData
响应消息数据结构:UeN1N2InfoSubscriptionCreatedData
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
n1MessageContainer | N1MessageContainer | C | 0..1 | AMF为订阅创建的Id,用户向PCF通知UE相关的N1/N2信息 | |||||||||||||||||||||||||||||||||||||||||||||
n1n2FailureTxfNotifURI | Uri | O | 0..1 | If included, this IE represents the callback URI on which the AMF shall notify the N1/N2 message transfer failure. |
响应消息数据结构:N1N2MessageTransferRspData
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
cause | n1n2MessageTransferCause | M | 1 | This IE shall provide the result of the N1/N2 message transfer processing at the AMF. |
参考 TS29.518(5G系统接入与移动管理服务)
2.1.6 Delivery of UE policies
Manage UE Policy Command
IEI | Information Element | Type/Reference | P | Format | Length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PTI | Proecdure transaction identify | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
MANAGE UE POLICY COMMAND message identify | UE policy delivery service message type | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
UE policy section management list | UE policy section management list | M | LV-E | 11-65533 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
The total length of the MANAGE UE POLICY COMMAND message content cannot exceed 65535 octets. |
Manage UE Policy Complete
IEI | Information Element | Type/Reference | P | Format | Length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PTI | Proecdure transaction identify | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
MANAGE UE POLICY COMPLETE message identify | UE policy delivery service message type | M | V | 1 |
Manage UE Policy Command Reject
IEI | Information Element | Type/Reference | P | Format | Length | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PTI | Proecdure transaction identify | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
MANAGE UE POLICY COMPLETE REJECT message identify | UE policy delivery service message type | M | V | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
UE policy section management result | UE policy section management result | M | LV-E | 11-65533 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
The total length of the MANAGE UE POLICY COMMAND REJECT message content cannot exceed 65535 octets. |
参考:TS24.501(5G系统NAS协议)Annex D: UE policy deivery service D.5.4
2.1.7 Namf_N1MessageNotify
方法:POST
资源URI:{n1NotifyCallbackUri}
请求消息数据结构:N1MessageNotification
Attribute name | Data Type | P | Cardinality | Description | |||||||||||||||||||||||||||||||||||||||||||||
n1n2NotifySubscriptionId | string | C | 0..1 | 订阅过程生成的ID | |||||||||||||||||||||||||||||||||||||||||||||
n1MessageContainer | N1MessageContainer | M | 1 | 包含N1 messaage class 和 N1 message content |
响应消息数据结构:n/a 参考 TS29.518(5G系统接入与移动管理服务)
2.2 修改
AMF 被重新定位,新的 AMF 选择维护与旧 PCF 的策略关联并更新通知 URI
2.3 删除
在用户去注册时,相关用户上下文终止时,AMF请求 UE policy association删除
3. UE 策略请求和下发决策
3.1 AMF
当接收到来自用户的UE Policy Container,AMF通过发送Npcf_UEPolicyControl Create Request向PCF发起用户策略关联请求。如果没有收到UE Policy Container,AMF根据本地配置发起用户策略关联请求。
3.2 PCF
当收到 “UE STATE INDICATION” 消息时, PCF根据消息中的OS Id和UPSIs,以及存储在UDR和本地的UPSCs,来确定是否安装新的用户策略或者已存在的用户策略 是否要更新。
4. 重要信元定义和编码
4.1 PTI
由UE或者PCF为UE policy delivery 流程动态分配,将请求和回复消息联系起来,当流程完成后释放PTI。
每一条UE policy delivery消息的第一个八位字节的Bits 1到 Bits 8 包含PTI。
4.2 UE policy deliver service message type
4.3 UPSI list
UPSI list 信元以PLNN作为分组依据。每个子UPSI list 包含一组UPSC。
UPSC 是用户策略块的标识,由PCF设置。
UPSI list最小长度是10字节,最大长度是65532字节
4.4 UE policy classmark
该信元用来提供用户策略方面的网络信息。
目前只有SupportANDSP 比特位有用。
当比特位值为1表示用户支持ANDSP。
4.5 UE OS Id
提供用户操作系统的信息。
UE OS Id 最小长度18字节,最大长度242字节。
OS Id 被编码为 16 个八位字节 OS Id 值字段的序列。
4.6 Payload Container
如果 payload container type 设置为 “UE policy container”,那么payload container contents根据TS24.501 的 Annex D所定义的格式进行编码.
4.7 UE policy section management
UE policy section management
UE policy section management list contents
UE policy section management sublist
UE policy section management sublist contents
Instruction contents
UE policy section contents
UE policy part contents
UE policy part type
UE poliy part contents
URSP rule
Traffic descriptor
Route selection descriptor
4.8 SCC mode type
4.9 S-NSSAI type
4.10 PDU session type type
4.11 UE Policy section management result