《5G核心网原理与实践》实践篇 · SMF 网元功能
《5GC实践篇》之SMF篇(8)N4接口支持之使用量上报
爱卫生
2023年03月26日 21:14
2.4.5 使用量上报
一 概述
CU分离之后,UPF需要根据SMF的指示,向SMF发送使用量报告。
相关的流程在TS29.244的5.2.2.3 Reporting of Usage Report to the CP function中介绍。
大致流程是:
1)SMF在N4会话建立流程中向UPF下发URR即使用量报告规则。
2)UPF为用户转发流量,并检查是否超过URR定义的门限值。
3)当达到门限值时,UPF需要触发本流程,向SMF上报该用户使用的流量。
信令图如下:
二 信令中主要参数介绍
1)Reporting Triggers:使用量报告的触发条件。SMF在会话建立时下发给UPF。条件满足,则UPF必须向SMF上
报。本节的取值为VOLTH(Volume Threshold),表示当使用量到达门限值,UPF需向SMF上报使用量。
2)Measurement Method:测量的方法。决定了使用量的单位。本节取值为Volume,对应到计费的话就是按流量计
费,单位是字节。是目前数据业务最常用的测量方法。
3)Volume Threshold:SMF下发给UPF的门限值大小。
4)Report Type:报告类型。本例取值为USAR,表示这是一个使用量报告。
5)Usage Report:UPF发给SMF的使用量报告的具体内容。包括Usage Report Trigger(报告触发器,需要和SMF下
发的报告触发器一致,本节为VOLTH)、Volume Measurement(报告的使用量大小)、Time of First/Last Packet
(第一个和最后一个报文的时间戳)、Start/End Time(报告的起止时间)、URR-ID(关联的URR的ID)、URSEQN(使用量报告的序列号,用于某个URR的使用量报告的排序。)
三 检查点与消息举例
1)检查SMF发出的PFCP Session Establishment Request消息是否下发了前面提到的URR、报告触发器、使用量门
限等相关参数。以下是PFCP Session Establishment Request消息中下发的URR举例:
Create URR :
IE Type: Create URR
IE Length: 32
URR ID : Dynamic by CP 1
IE Type: URR ID
IE Length: 4
0... .... .... .... .... .... .... .... = Allocation type: Dynamic by CP
.000 0000 0000 0000 0000 0000 0000 0001 = URR ID: 1
Reporting Triggers :
IE Type: Reporting Triggers
IE Length: 2
0... .... = LIUSA (Linked Usage Reporting): False
.0.. .... = DROTH (Dropped DL Traffic Threshold): False
..0. .... = STOPT (Stop of Traffic): False
...0 .... = START (Start of Traffic): False
.... 0... = QUHTI (Quota Holding Time): False
.... .0.. = TIMTH (Time Threshold): False
.... ..1. = VOLTH (Volume Threshold): True
.... ...0 = PERIO (Periodic Reporting): False
000. .... = Spare: 0
..0. .... = EVEQU (Event Quota): False
...0 .... = EVETH (Event Threshold): False
.... 0... = MACAR (MAC Addresses Reporting): False
.... .0.. = ENVCL (Envelope Closure): False
.... ..0. = TIMQU (Time Quota): False
.... ...0 = VOLQU (Volume Quota): False
Measurement Method :
IE Type: Measurement Method
IE Length: 1
Flags: 0x02, VOLUM (Volume)
0000 0... = Spare: 0
.... .0.. = EVENT (Event): False
.... ..1. = VOLUM (Volume): True
.... ...0 = DURAT (Duration): False
Volume Threshold :
IE Type: Volume Threshold
IE Length: 9
Flags: 0x01, TOVOL
Total Volume: 10240
2)检查UPF发出的PFCP Session Report Request消息是否根据SMF的要求,使用了相同的报告触发器、门限值是否
和SMF下发的相同、并携带了正确的使用量报告的具体内容。以下是消息举例,在本例中,UPF向SMF正确的报告了
会话的使用量(TotalVolume=10288、其中上行=3088、下行=7200,因为上下行流量都是要收费的。都要记入
TotalVolume)。
Packet Forwarding Control Protocol
Flags: 0x21, SEID (S)
Message Type: PFCP Session Report Request
Length: 104
SEID: 0x0000000066668888
Sequence Number: 65536
Spare: 0
Report Type :
IE Type: Report Type
IE Length: 1
Flags: 0x02, USAR (Usage Report)
0000 .... = Spare: 0
.... 0... = UPIR (User Plane Inactivity Report): False
.... .0.. = ERIR (Error Indication Report): False
.... ..1. = USAR (Usage Report): True
.... ...0 = DLDR (Downlink Data Report): False
Usage Report (Session Report Request) : [Grouped IE]
IE Type: Usage Report (Session Report Request)
IE Length: 83
Usage Report Trigger :
IE Type: Usage Report Trigger
IE Length: 2
0... .... = IMMER (Immediate Report): False
.0.. .... = DROTH (Dropped DL Traffic Threshold): False
..0. .... = STOPT (Stop of Traffic): False
...0 .... = START (Start of Traffic): False
.... 0... = QUHTI (Quota Holding Time): False
.... .0.. = TIMTH (Time Threshold): False
.... ..1. = VOLTH (Volume Threshold): True
.... ...0 = PERIO (Periodic Reporting): False
0... .... = EVETH (Event Threshold): False
.0.. .... = MACAR (MAC Addresses Reporting): False
..0. .... = ENVCL (Envelope Closure): False
...0 .... = MONIT (Monitoring Time): False
.... 0... = TERMR (Termination Report): False
.... .0.. = LIUSA (Linked Usage Reporting): False
.... ..0. = TIMQU (Time Quota): False
.... ...0 = VOLQU (Volume Quota): False
Volume Measurement :
IE Type: Volume Measurement
IE Length: 25
Flags: 0x07, DLVOL, ULVOL, TOVOL
Total Volume: 10288
Uplink Volume: 3088
Downlink Volume: 7200
Time of First Packet : Apr 17, 2022 03:13:27.000000000 UTC
Time of Last Packet : Apr 17, 2022 03:13:27.000000000 UTC
Start Time : Apr 17, 2022 03:13:18.000000000 UTC
End Time : Apr 17, 2022 03:13:27.000000000 UTC
URR ID : Dynamic by CP 1
IE Type: URR ID
IE Length: 4
0... .... .... .... .... .... .... .... = Allocation type: Dynamic by CP
.000 0000 0000 0000 0000 0000 0000 0001 = URR ID: 1
UR-SEQN : 0