> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/3.2/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/upg/3.2/operation-guides/pfcp-server.md).

# Configure PFCP server

You can configure PFCP (Packet Forwarding Control Protocol) server settings in User Plane Gateway (UPG) using the [**UPGConfig**](https://docs.cennso.com/components/upg/3.2/concepts/upgconfig.md) Custom Resource (CR) in the Core Cluster. Based on the `spec` configuration from the UPGDeployment CR on the Management Cluster, the UPGConfig CR is created. UPG then configures the PFCP server based on this CR.

## PFCP heartbeat configuration

PFCP heartbeats are periodic messages exchanged between User Plane Function (UPF) and a Control Plane Function (CPF) nodes in 5G or LTE networks. PFCP heartbeats are used to identify connectivity problems between UPF and CPF.

In UPG, you can configure the number of retries for unanswered PFCP heartbeat requests and the timeout between retries in seconds. Use these configuration parameters:

```yaml
spec:
  pfcpHeartbeatRetries: "5"
  pfcpHeartbeatTimeout: "10"
```

>**NOTE:** The number of retires should not be greater than `30`, and the timeout should be a positive number not greater than `120`.

You can also configure these options using the **spec.pfcp** section in the UPGConfig CR:

```yaml
apiVersion: upg-manager.cennso.com/v1alpha1
kind: UPGConfig
metadata:
  labels:
    fpp-manager.cennso.com/created-for: upg-operator
    fpp-manager.cennso.com/plumbing-instance: upg-fpp-inst01
  name: upg-fpp-inst01
  namespace: upg-fpp
spec:
  pfcp:
    heartbeat:
      retries: 10
      timeout: 3
```

To verify the PFCP heartbeat configuration, use VPP CLI:

```
vppctl show upf heartbeat-config
```

See the output example:

```
Timeout: 10 Retries: 5
```
