【5G核心网】PFCP Message PFCP 消息

1. PFCP 消息

    PFCP 消息用在 CP Function 和 UP Function 之间的 N4 接口,用于控制面与用户面的交互

                                       Figure 4.1-1: Control Plane stack over Sxa, Sxb, Sxc and combined Sxa/Sxb and N4 

    PFCP 消息包含 PFCP 消息头,根据消息的类型可能包含后续的 IE

                                                                   Figure 7.2.1-1: PFCP Message Format

    1.1 消息头

  •   字节1 按位设置:

        - 位1: 代表 SEID 标记

        - 位2: 代表 MP 标记(message priority)

       - 位3-5: spare,发送者设置为0,接收将忽略

        - 位6-8: 版本

  •   字节 2 是消息类型
  •   字节3、4是两字节的消息长度
  •   可选项 SEID,占8字节
  •   最后3字节序列号.

                                                               Figure 7.2.2.1-1: General format of PFCP Header                                                                 

     - if S = 0, SEID field is not present, k = 0, m = 0 and n = 5;

     - if S = 1, SEID field is present, k = 1, m = 5 and n = 13.

   1.2 节点相关的 PFCP 消息头

    对于节点相关的消息,PFCP 消息头不包含 SEID 字段,但是会包含 the Sequence Number 字段,最后是 spare

                                               Figure 7.2.2.2-1: PFCP Message Header for node related messages

   1.3 会话相关的 PFCP 消息头

    会话相关的消息的 PFCP 消息头如下,必包含 SEID 设置为1,消息头长度为16,MP可能为0或1,MP为1时,最后一个字节的高4位为优先级。

                                             Figure 7.2.2.3-1: PFCP message Header for session related messages

    如果 MP 设置为 1,第 16字节的 5-8 位指示了消息优先级

    当 S=1,字节 5-12 代表了 SEID 字段

2. PFCP 消息类型

    PFCP 消息分为节点相关(Node related)和会话相关(Session related)消息

Message Type value (Decimal)

Message

Applicability

Sxa

Sxb

Sxc

N4

0

Reserved

PFCP Node related messages

1

PFCP Heartbeat Request

X

X

X

X

2

PFCP Heartbeat Response

X

X

X

X

3

PFCP PFD Management Request

-

X

X

X

4

PFCP PFD Management Response

-

X

X

X

5

PFCP Association Setup Request

X

X

X

X

6

PFCP Association Setup Response

X

X

X

X

7

PFCP Association Update Request

X

X

X

X

8

PFCP Association Update Response

X

X

X

X

9

PFCP Association Release Request

X

X

X

X

10

PFCP Association Release Response

X

X

X

X

11

PFCP Version Not Supported Response

X

X

X

X

12

PFCP Node Report Request

X

X

X

X

13

PFCP Node Report Response

X

X

X

X

14

PFCP Session Set Deletion Request

X

X

-

15

PFCP Session Set Deletion Response

X

X

-

16 to 49

For future use

PFCP Session related messages

50

PFCP Session Establishment Request

X

X

X

X

51

PFCP Session Establishment Response

X

X

X

X

52

PFCP Session Modification Request

X

X

X

X

53

PFCP Session Modification Response

X

X

X

X

54

PFCP Session Deletion Request

X

X

X

X

55

PFCP Session Deletion Response

X

X

X

X

56

PFCP Session Report Request

X

X

X

X

57

PFCP Session Report Response

X

X

X

X

58 to 99

For future use

Other messages

100 to 255

For future use

                                                                 Table 7.3-1: Message Types

   2.1 PFCP Association

     在 UP 功能上建立 PFCP 会话之前,应在 CP 功能和 UP 功能之间建立 PFCP 关联。即使 CP 和/或 UP 功能暴露了多个 IP 地址,在给定的一对 CP 和 UP 功能之间也只能建立一个 PFCP 关联。

    一个 CP 功能和 UP 功能将由唯一的 Node ID 标识,Node ID 将被设置位 FQDN 或者 ID 地址

    在建立 PFCP 关联之前,负责建立 PFCP 关联的职能应查找对对方功能,例如使用 DNS 程序,NRF 程序或者本地配置。如果对方功能支持多个 IP 地址,任何 IP 地址都可以用来最为目的地址来发送  PFCP 关联建立请求。

   2.1.1 已经建立 PFCP 关联

    当和 UP 建立 PFCP 连接,CP 如下行为:

   - 提供 node 相关参数

   - 提供 UP 功能特性

   - 使用 Heartbeat 程序检查 UP 的响应

   - 可能建立 PFCP 会话

   - 如果 UP 已经指示优雅的关闭,避免尝试建立新的 PFCP 会话

    当和 CP 建立 PFCP 关联,UP 如下行为:

   - 更新 CP 支持的特性

   - 更新 CP load/overload 控制信息功能

   - 可能更新 UP IP 可用资源给 CP

   - 接收从 CP 发来的 PFCP 会话相关信息

   - 使用 Heartbeat 程序检查 CP 的响应

   - 当失败或不再服务区,指示 CP 优雅的关闭

   2.1.2 未建立 PFCP 关联

    未和 UP 建立 PFCP 关联,CP 行为:

    - 拒绝从 UP 发来的 PFCP 会话相关消息

    未和 CP 建立 PFCP 关联,UP 行为:

    - 拒绝从 CP 发来的 PFCP 会话相关信息

    2.1.2 PFCP Association Setup Request body 参数

    - Node ID,发送方以为的标识符

    - Recovery Time Stamp,当 CP 或 CP 已经启动的时间戳

    - UP Function Features,指示 UP 功能支持的特性(UP 发送)

    - CP Function Features,指示 CP 功能支持的特性(CP 发送)

    - User Plane IP Resource Information,包含 IPv4 / IPv6,还有 TEID,用来在 UP 分配 GTP-U F-TEID(UP 发送)

3. PFCP 会话相关消息

   3.1 PFCP Session Establishment Request

Information elements

P

Condition / Comment

Node ID

M

This IE shall contain the unique identifier of the sending Node.

CP F-SEID

M

This IE shall contain the unique identifier allocated by the CP function identifying the session.

Create PDR

M

This IE shall be present for at least one PDR to be associated to the PFCP session.

Several IEs with the same IE type may be present to represent multiple PDRs.

See Table 7.5.2.2-1.

Create FAR

M

This IE shall be present for at least one FAR to be associated to the PFCP session.

Several IEs with the same IE type may be present to represent multiple FARs.

See Table 7.5.2.3-1.

Create URR

C

This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.

Several IEs within the same IE type may be present to represent multiple URRs.

See Table 7.5.2.4-1.

Create QER

C

This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching one or more PDR(s) of this PFCP session.

Several IEs within the same IE type may be present to represent multiple QERs.

See Table 7.5.2.5-1.

Create BAR

O

When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1.

                            Table 7.5.2.1-1: Information Elements in an PFCP Session Establishment Request

    3.1.1 在 PFCP 会话建立请求创建 PDR IE

type PDR struct {
	PDRID uint16

	Precedence         uint32
	PDI                PDI
	OuterHeaderRemoval *pfcpType.OuterHeaderRemoval

	FAR *FAR
	URR *URR
	QER *QER

	State RuleState
}

Information elements

P

Condition / Comment

PDR ID

M

This IE shall uniquely identify the PDR among all the PDRs configured for that PFCP session.

Precedence

M

This IE shall indicate the PDR's precedence to be applied by the UP function among all PDRs of the PFCP session, when looking for a PDR matching an incoming packet.

PDI

M

This IE shall contain the PDI against which incoming packets will be matched.

See Table 7.5.2.2-2.

Outer Header Removal

C

This IE shall be present if the UP function is required to remove one or more outer header(s) from the packets matching this PDR.

FAR ID

C

This IE shall be present if the Activate Predefined Rules IE is not included or if it is included but it does not result in activating a predefined FAR.

When present this IE shall contain the FAR ID to be associated to the PDR.

URR ID

C

This IE shall be present if a measurement action shall be applied to packets matching this PDR.

When present, this IE shall contain the URR IDs to be associated to the PDR.

Several IEs within the same IE type may be present to represent a list of URRs to be associated to the PDR.

QER ID

C

This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching this PDR.

When present, this IE shall contain the QER IDs to be associated to the PDR. Several IEs within the same IE type may be present to represent a list of QERs to be associated to the PDR.

Activate Predefined Rules

C

This IE shall be present if Predefined Rule(s) shall be activated for this PDR. When present this IE shall contain one Predefined Rules name.

Several IEs with the same IE type may be present to represent multiple "Activate Predefined Rules" names.

                                         Table 7.5.2.2-1: Create PDR IE within PFCP Session Establishment Request

    3.1.2 PDI 详解

  •     Source Interface:识别传入数据包的源接口
  •     Local F-TEID:如果 TEID 设置,该参数不应该出现。如果出现则标识 local F-TEID 来匹配收到的数据包
  •     Network Instance:如果 TEID 设置,该参数不应该出现。如果出现则标识 Network instance 来匹配收到的数据包
  •     UE IP address:如果 TEID 设置,该参数不应该出现。如果出现则标识源和目的 IP 地址来匹配收到的数据包
  •     SDF Filter:Service Data Flow  服务数据流
type PDI struct {
	SourceInterface pfcpType.SourceInterface
	LocalFTeid      *pfcpType.FTEID
	NetworkInstance util_3gpp.Dnn
	UEIPAddress     *pfcpType.UEIPAddress
	SDFFilter       *pfcpType.SDFFilter
}

Information elements

P

Condition / Comment

Source Interface

M

This IE shall identify the source interface of the incoming packet.

Local F-TEID

O

This IE shall not be present if Traffic Endpoint ID is present.

If present, this IE shall identify the local F-TEID to match for an incoming packet.

The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of F-TEID and the CP function requests the UP function to assign a local F-TEID to the PDR.

Network Instance

O

This IE shall not be present if Traffic Endpoint ID is present.

If present, this IE shall identify the Network instance to match for the incoming packet. See NOTE 1, NOTE2.

UE IP address

O

This IE shall not be present if Traffic Endpoint ID is present.

If present, this IE shall identify the source or destination IP address to match for the incoming packet. (NOTE 5)

Traffic Endpoint ID

C

This IE may be present if the UP function has indicated the support of PDI optimization.

If present, this IE shall uniquely identify the Traffic Endpoint for that PFCP session.

SDF Filter

O

If present, this IE shall identify the SDF filter to match for the incoming packet. Several IEs with the same IE type may be present to provision a list of SDF Filters. The full set of applicable SDF filters, if any, shall be provided during the creation or the modification of the PDI.

See NOTE 3.

                                            Table 7.5.2.2-2: PDI IE within PFCP Session Establishment Request

   3.1.3 在 PFCP 会话建立请求中创建 FAR IE

// Forwarding Action Rule. 7.5.2.3-1
type FAR struct {
	FARID uint32

	ApplyAction          pfcpType.ApplyAction
	ForwardingParameters *ForwardingParameters

	BAR   *BAR
	State RuleState
}

Octet 1 and 2

Create FAR IE Type = 3 (decimal)

Octets 3 and 4

Length = n

Information elements

P

Condition / Comment

FAR ID

M

This IE shall uniquely identify the FAR among all the FARs configured for that PFCP session.

Apply Action

M

This IE shall indicate the action to apply to the packets, See clauses 5.2.1 and 5.2.3.

Forwarding Parameters

C

This IE shall be present when the Apply Action requests the packets to be forwarded. It may be present otherwise.

When present, this IE shall contain the forwarding instructions to be applied by the UP function when the Apply Action requests the packets to be forwarded.

See table 7.5.2.3-2.

BAR ID

O

When present, this IE shall contain the BAR ID of the BAR defining the buffering instructions to be applied by the UP function when the Apply Action requests the packets to be buffered.

NOTE 1: The same user plane packets may be required, according to operator's policy and configuration, to be duplicated to different SX3LIFs.

                                   Table 7.5.2.3-1: Create FAR IE within PFCP Session Establishment Request

    3.1.4 FAR 转发参数 IE

type ForwardingParameters struct {
	DestinationInterface pfcpType.DestinationInterface
	NetworkInstance      util_3gpp.Dnn
	OuterHeaderCreation  *pfcpType.OuterHeaderCreation
}

    Destination Interface: 标识出去的数据包的目的接 

Octet 1 and 2

Forwarding Parameters IE Type = 4 (decimal)

Octets 3 and 4

Length = n

Information elements

P

Condition / Comment

Destination Interface

M

This IE shall identify the destination interface of the outgoing packet.

Network Instance

O

When present, this IE shall identify the Network instance towards which to send the outgoing packet. See NOTE 1.

Redirect Information

C

This IE shall be present if the UP function is required to enforce traffic redirection towards a redirect destination provided by the CP function.

Outer Header Creation

C

This IE shall be present if the UP function is required to add one or more outer header(s) to the outgoing packet. If present, it shall contain the F-TEID of the remote GTP-U peer when adding a GTP-U/UDP/IP header, or the Destination IP address and/or Port Number when adding a UDP/IP header or an IP header or the C-TAG/S-TAG (for 5GC). See NOTE 2.

   3.2 PFCP Session Modification Request (PFCP 会话修改请求)

Information elements

P

Condition / Comment

CP F-SEID

C

This IE shall be present if the CP function decides to change its F-SEID for the PFCP session. The UP function shall use the new CP F-SEID for subsequent PFCP Session related messages for this PFCP Session. See Note 2.

Remove PDR

C

When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.

Several IEs within the same IE type may be present to represent a list of PDRs to remove.

Remove FAR

C

When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.

Several IEs within the same IE type may be present to represent a list of FARs to remove.

Remove URR

C

When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.

Several IEs within the same IE type may be present to represent a list of URRs to remove.

Remove QER

C

When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-9-1.

Several IEs within the same IE type may be present to represent a list of QERs to remove.

Remove BAR

C

When present, this IE shall contain the BAR Rule which is requested to be removed. See Table 7.5.4.12-1.

Remove Traffic Endpoint

C

When present, this IE shall contain the Traffic Endpoint ID identifying the traffic endpoint to be removed, if the UP function has indicated support of PDI optimization.

All the PDRs that refer to the removed Traffic Endpoint shall be deleted.

See Table 7.5.4.14-1.

Create PDR

C

This IE shall be present if the CP function requests the UP function to create a new PDR.

See Table 7.5.2.2-1.

Several IEs within the same IE type may be present to represent a list of PDRs to create.

Create FAR

C

This IE shall be present if the CP function requests the UP function to create a new FAR.See Table 7.5.2.3-1.

Several IEs within the same IE type may be present to represent a list of FARs to create.

Create URR

C

This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.

Several IEs within the same IE type may be present to represent a list of URRs to create.

Create QER

C

This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1.

Several IEs within the same IE type may be present to represent a list of QERs to create.

Create BAR

C

This IE shall be present if the CP function requests the UP function to create a new BAR.

See Table 7.5.2.6-1.

Create Traffic Endpoint

C

When present this IE shall contain the information associated with the Traffic Endpoint to be created, if the UP function has indicated support of PDI optimization. See Table 7.5.2.7-1.

Update PDR

C

This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.

Several IEs within the same IE type may be present to represent a list of PDRs to update.

Update FAR

C

This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update.

Update URR

C

This IE shall be present if URR(s) previously created for the PFCP session need to be modified.

Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1.

Update QER

C

This IE shall be present if QER(s) previously created for the PFCP session need to be modified.

Several IEs within the same IE type may be present to represent a list of modified QERs.

Previously created QERs that are not modified shall not be included.

See Table 7.5.4.5-1.

Update BAR

C

This IE shall be present if a BAR previously created for the PFCP session needs to be modified.

A previously created BAR that is not modified shall not be included.

See Table 7.5.4.11-1.

Update Traffic Endpoint

C

When present this IE shall contain the information associated with the traffic endpoint to be updated, if the UP function has indicated support of PDI optimization.

All the PDRs that refer to the Traffic Endpoint shall use the updated Traffic Endpoint information.

See Table 7.5.4.13-1.

PFCPSMReq-Flags

C

This IE shall be included if at least one of the flags is set to "1".

- DROBU (Drop Buffered Packets): the CP function shall set this flag if the UP function is requested to drop the packets currently buffered for this PFCP session (see NOTE 1).

- QAURR (Query All URRs): the CP function shall set this flag if the CP function requests immediate usage report(s) for all the URRs previously provisioned for this PFCP session (see NOTE 3).

Query URR

C

This IE shall be present if the CP function requests immediate usage report(s) to the UP function.

Several IEs within the same IE type may be present to represent a list of URRs for which an immediate report is requested.

See Table 7.5.4.10-1.

See NOTE 3.

User Plane Inactivity Timer

C

This IE shall be present if it needs to be changed.

Query URR Reference

O

This IE may be present if the Query URR IE is present or the QAURR flag is set to "1". When present, it shall contain a reference identifying the query request, which the UP function shall return in any usage report sent in response to the query.

                                    Table 7.5.4.1-1: Information Elements in a PFCP Session Modification Request

参考:

   DNS 程序 TS 29.303

   NRF 程序 29.510

猜你喜欢

转载自blog.csdn.net/zhonglinzhang/article/details/107542866