1. URSP基本概念
1.1 什么是URSP
URSP: UE Route Selection Policy, 也就是说,用户路由选择策略。该策略描述了移动应用程序与网络切片之间的对应关系,终端基于URSP规则,为app选择网络切片。
1.2 应用背景
在4G在网络环境下,终端设备的操作系统将在启动时建立默认数据承载,其应用数据将通过默认承载传输,应用数据将运行在网络上。
到了5G,引入网络切片是为了让手机不同app数据,通过运营商划分的不同逻辑网络商划分的不同逻辑网络上,实现不同业务需求网络资源的灵活动态分配 图片来源:https://zhuanlan.zhihu.com/p/265146451
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
方法: 资源URI: 请求信息数据结构:
| 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 | |||||||||||||||||||||||||||||||||||||||||||||
响应消息数据结构: 消息头"Location"包含创建资源的URI:
| 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 被允许 |
参考 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信息 |
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. |
| 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. |
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 |
| 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
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
4.8 SCC mode type
4.9 S-NSSAI type
4.10 PDU session type type
4.11 UE Policy section management result