> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/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/fpp/3.2/concepts/vppinterface.md).

# VPPInterface CR

`VPPInterface` Custom Resource (CR) is applied on the Core Cluster and can be created manually, by the FPP-CNI or by the VPP switch pod, the latter being used for VXLAN meshing.

The name of the VPP interface is generated by VPP itself by default, e.g. `memif1/100`.  If `spec.ifName` is set, that value is used instead of the name of the interface.  The special case is the `spec.ifName` beginning with a dash (`-`). In this case, `spec.ifName` is updated using its value as a suffix for the VPP device name, so that `-mydev` as `spec.ifName` becomes `memif1/100-mydev`, and this name is also used as the VPP interface name. This suffix mechanism is used by FPP-CNI on the VPP switch pod side to provide meaningful names for the network interfaces corresponding to pods. There are several types of VPPInterface resources supported.

## VPPInterface: uplink/bond

This corresponds to VFs or NICs that VPP switch pod owns, e.g. DPDK interfaces. DPDK interfaces are available upon startup in VPP, so no extra NIC details are specified there. The `ifName` must match the name of the interface that is created upon VPP startup. The name itseft is based on `MAPPING_...` environment variable value.

> **CAUTION:** Uplinks are generated automatically by VPP Operator. Manual modification are overriden.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: node1
  namespace: fpp
  # target VPP switch pod on the node node1
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  # VPP interface name
  ifName: uplink0
  # IP address of the node
  ips:
  - 10.150.0.3/24
  mtu: 9000
  # VRF to use
  table: 500
status:
  # status report by VPP switch pod
  ready: true
  swIfIndex: 1
  vppName: uplink0 # same as ifName
```

It's also possible to bond the uplink interfaces. If, for example, there are several uplinks configured like this:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  # also node1-{1..3}
  name: node1-0
  namespace: fpp
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  # also uplink{1..3}n0
  ifName: uplink0n0
  mtu: 9000
```

they can be bonded together in a single uplink like this:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: node1-bond
  namespace: fpp
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  bond:
    lb: L34
    members:
    - node1-0
    - node1-1
    - node1-2
    - node1-3
    # can also use ActiveBackup, XOR, Broadcast, RoundRobin
    mode: LACP
  ifName: bond0
  ips:
  - 10.150.0.3/24
  mtu: 9000
  table: 500
```

You can find more about bonding in the [dedicated section](https://docs.cennso.com/components/fpp/3.2/crs.md#bonding-parameters).

## VPPInterface: loopback

The loopback interface is useful when a VPP instance must create a local interface. One of the possible use cases is to expose a network gateway on the FPP node. This incorporates a CGW use case on FPP daemonset. You must specify on which node to create the gateway. Regular properties of a VPP interface can be defined as well: VPP interface name (**ifName**), IPs, MTU, routing table to use, FPPNetwork, or bridge domain to connect to.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: net-a-gw
  # target FPP node name
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  # Type needs to be set to loopback
  type: loopback
  # VPP interface name
  ifName: net-a-gw
  # IP address of loopback interface
  ips:
  - 10.150.0.3/24
  mtu: 9000
  # Routing table to use
  table: 100
  # Name of the FPPNetwork, to which the loopback interface will be bridged into
  networkName: net-a
  # Bridge domain can be configured directly, without using networkName
  bridgeDomain: 10
  # Specify the MAC address
  hardwareAddress: "de:ad:00:ce:23:4"
```

If the MAC address is not specified, it is generated to be unique. The loopback interface is set as a Bridge Virtual Interface (BVI) to be able to respond to the ping.

## VPPInterface: external network

When VPPConfig has the **spec.externalNetworkConfig** section specified, each physical interface that matches the interface name prefix will be configured as an external network after FPP instance is setup by VPP Operator. External interfaces are marked with VPPInterface.Spec attribute Type set to `extnet`. The name of the VPPInterface object is constructed using the node name, externalNetworkConfig.Name and a number: `<node-name>-<ext-net-name>-<id>`.

When the type is not set, the VPPInterface object is considered to be an uplink interface.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: node1-ext-net-0
  namespace: fpp
  # target VPP switch pod on the node node1
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  ifName: ext-net0n0
  type: extnet
  bridgeDomain: 31
  mtu: 9000
status:
  # status report by VPP switch pod
  ready: true
  swIfIndex: 1
  memberCount:  0
  vppName: ext-net0n0
```

It's also possible to create a bond interface consisting of external interfaces. Prefix name defined in the `externalNetworkConfig.name` needs to match multiple physical interfaces mappings in FPP pod's `MAPPING_...` environment variable value.

## VPPInterface: VXLAN endpoint

This corresponds to a VXLAN tunnel endpoint. The endpoints are created internally by the VPP switch instances based on `VPPInterface` objects corresponding to uplinks, and `VXLAN` objects, so, most of the time, you don't need to create any `vxlanTunnel` type objects by hand, and they're reserved for possible special cases.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: nv-node1-31
  namespace: fpp
  labels:
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  bridgeDomain: 31
  ifName: vxlan31
  mtu: 9000
  vxlanTunnel:
    # the peer
    destIP: 10.150.0.3
    # this corresponds to the VRF in the uplink VPPInterface
    encapVRFID: 500
    instance: 31
    sourceIP: 10.150.0.1
    # VNI id
    vni: 31
status:
  # status report by VPP switch pod
  ready: true
  swIfIndex: 2
  vppName: vxlan31
```

## VPPInterface: GRE tunnel

This corresponds to a GRE tunnel endpoint. FPP supports only L3 GRE tunnels at the moment. Another GRE tunnel endpoint is expected to be present at the `destIP`, not necessarily provided by FPP. The `sourceIP` must correspond to an address of an interface belonging to this VPP instance. The traffic destined for the GRE interface will be encapsulated and sent from `sourceIP` towards the `destIP` using GRE datagrams. Conversely, the traffic arriving at `sourceIP` from the `destIP` will be decapsulated. It's possible to use another table ID for the encapsulated traffic by specifying `encapVRFID` inside the `greTunnel` section of the spec. GRE tunnel may have a `key` configured like it's defined in ``RFC 2890``. If present, should match similar configuration parameters on another GRE tunnel endpoint.

> **NOTE**: You cannot set **spec.ifName** for the GRE interface to values like `gre0` or `gre1` because of possible collision with the internal VPP interface name.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: mygre31
  namespace: fpp
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-instance: mycgw
spec:
  bridgeDomain: 31
  # ifName for GRE cannot match such regex: ^gre[0-9]+$, for example: gre0, gre11
  ifName: mygre31
  mtu: 9000
  greTunnel:
    # the peer
    destIP: 10.150.0.3
    # source IP
    sourceIP: 10.150.0.1
    # This corresponds to the VRF used for the encapsulated packets.
    # Defaults to 0
    encapVRFID: 500
    # The VPP tunnel instance ID. Can be omitted, in which case it
    # will be generated. Doesn't affect anything, most of the time,
    # if ifName is set.
    # The instance ID is used to generate VPP interface names,
    # but FPP renames the interface according to ifName.
    instance: 31
    # Key for the tunnel may be omitted, by default Key will not
    # be used for GRE tunnels matching. If present, should be
    # configured for both GRE peers. Allowed range: 0 to (2^32) - 1
    key: 12345
    # The options may be omitted, defaults are listed below.
    # They control how the corresponding bits are copied
    # from the payload to the tunnel header during encap
    # and vice-versa during decap
    options:
      # handling of the DF bit during encap (none, copy, set)
      dfMode: none
      # copy DSCP bits during encap if true
      copyDSCP: false
      # copy the ECN bit during encap if true
      encapCopyECN: false
      # copy the ECN bit during decap if true
      decapCopyECN: false
      # compute flow hash on the inner packet for more entropy
      # during encap if true
      encapInnerHash: false
      # copy the hop-limit/TTL during encap if true
      copyHopLimit: false
      # copy the Flow Label during encap if true
      copyFlowLabel: false
status:
  # status report by VPP switch pod
  ready: true
  swIfIndex: 2
  vppName: mygre31
```

## VPPInterface: memif

Memifs are used to attach FPP pods or other tools that use memifs, such as [Cisco TRex](https://trex-tgn.cisco.com/) to VPP switch FPP pod. A pair of memif `VPPInterface` objects is created by FPP-CNI for each such network attachment.

Note that many of the `fpp-manager.cennso.com/...` labels below are used internally by FPP CNI which has generated the VPPInterface objects below.

Master memif:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: vpp-webserver-0-memif-1-fc2p2
  namespace: fpp-sample
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-container-id: f2a66d02f81ae739dffb29f8b54eb57fbe2fb32c
    fpp-manager.cennso.com/plumbing-ifname: net1
    fpp-manager.cennso.com/plumbing-instance-uid: 296f1d55-bbcd-45af-872a-c3dcb906a437
    fpp-manager.cennso.com/plumbing-memif-role: master
    fpp-manager.cennso.com/plumbing-node: fpp-cluster-control-plane
    fpp-manager.cennso.com/plumbing-pod-name: vpp-webserver-0
    fpp-manager.cennso.com/plumbing-type: memif
    fpp-manager.cennso.com/plumbing-vni: "1"
spec:
  bridgeDomain: 1
  hardwareAddress: 02:fe:09:d3:05:40
  # FPP-CNI sets the name to '-net1', and VPP Operator then updates it to avoid name collisions.
  ifName: "memif1/100-net1"
  memif:
    id: 100
    role: master
    ringSize: 8192
    bufferSize: 4096
  mtu: 9000
  # TX queue placement on the VPP switch pod (master) side
  # Corresponds to txPlacement in the NetworkAttachmentDefinition.
  # This example is for a VPP switch pod with three worker threads.
  txPlacement: ["0,1", "2,3"]
status:
  memberCount: 0
  ready: true
  swIfIndex: 2
  vppName: memif1/100-net1
```

Slave (client) memif. `ifName` is set to the `name` of `NetworkAttachmentDefinition` below. It is used as the VPP interface name in the VPP app:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-container-id: f2a66d02f81ae739dffb29f8b54eb57fbe2fb32c
    fpp-manager.cennso.com/plumbing-ifname: net1
    fpp-manager.cennso.com/plumbing-instance-uid: 296f1d55-bbcd-45af-872a-c3dcb906a437
    fpp-manager.cennso.com/plumbing-memif-role: slave
    fpp-manager.cennso.com/plumbing-pod-name: vpp-webserver-0
    fpp-manager.cennso.com/plumbing-type: memif
    fpp-manager.cennso.com/plumbing-vni: "1"
  name: vpp-webserver-0-memif-client-1-bnvd2
  namespace: fpp-sample
spec:
  hardwareAddress: 02:67:03:2d:20:be
  ifName: srv
  ips:
  - 10.0.0.1/24
  memif:
    id: 100
    role: slave
    # FPP-CNI sets the number of queues on the slave only.
    numRxQueues: 2
    numTxQueues: 2
    ringSize: 8192
    bufferSize: 4096
  mtu: 9000
  # TX queue placement on the client (slave) side
  # Corresponds to clientTxPlacement in the NetworkAttachmentDefinition.
  # This example is for a client with two worker threads.
  txPlacement: ["0,1", "2"]
status:
  memberCount: 0
  ready: true
  swIfIndex: 1
  vppName: srv
```

Sample NetworkAttachmentDefinition with the CNI config from which FPP-CNI has derived the above VPPInterface:

```yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: vpp-net
  namespace: fpp-sample
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {
        "addresses": [
          {
            "address": "10.0.0.1/24"
          }
        ],
        "type": "static"
      },
      "mtu": 9000,
      "name": "srv",
      "type": "fpp-cni",
      "vni": 1,
      "vppIfaceType": "memif",
      "numRxQueues": 2,
      "numTxQueues": 2,
      "memifRingSize": 8192,
      "memifBufferSize": 4096,
      "txPlacement": ["0,1", "2,3"],
      "clientTxPlacement": ["0,1", "2"]
    }
```

The following additional tunable settings are available for memifs in the CNI config:

* **numRxQueues** (goes into **spec.memif.numRxQueues** on the slave memif interfaces): number of RX queues, defaults to `1`
* **numTxQueues** (goes into **spec.memif.numTxQueues** on the slave memif interfaces): number of TX queues, defaults to `1`
* **memifRingSize** (goes into **spec.memif.ringSize**): number of entries of the RX and TX rings, defaults to `4096`
* **memifBufferSize** (goes into **spec.memif.bufferSize**): size of the buffer for each ring entry, defaults to `2048`
* **txPlacement** (goes into **spec.txPlacement** on the master memif interfaces): TX queue placement on the VPP switch pod side
* **clientTxPlacement** (goes into **spec.txPlacement** on the slave memif interfaces): TX queue placement on the client side

Both placements have one comma-separated list of VPP thread indices for each TX queue on their side. **txPlacement** contains thread indices of the VPP switch pod, and **clientTxPlacement** contains thread indices of the client. Each TX queue of the VPP switch pod is an RX queue of the client, so **txPlacement** has **numRxQueues** lists. **clientTxPlacement** has **numTxQueues** lists. On both sides, thread 0 is the VPP main thread, and threads 1 and higher are the worker threads. On a VPP instance without worker threads, use `"0"` for every queue.

> [!IMPORTANT]
> In **txPlacement**, put every thread of the VPP switch pod in at least one list. In **clientTxPlacement**, put every thread of the client in at least one list. This rule includes thread 0, the VPP main thread. By convention, add thread 0 to the list of queue 0, for example `"0,1"`. If a thread is in no list, VPP discards the packets that this thread sends on the interface. For thread 0, these packets include Address Resolution Protocol (ARP) and IPv6 neighbor discovery requests. VPP counts the discarded packets in the `no tx queue available` error counter. To see the counter, run `vppctl show error`.

## VPPInterface: memif without CNI

A newer way to connect a memif-based workload to VPP L2 switch was developed to omit the use of CNI.
The user creates just the client (slave) interface, and VPP Operator creates a matching ephemeral master memif.
Ephemeral means that the VPPInterface CR is not actually stored in the Kubernetes API Server.

The VPPInterface has to have:

- `plumbing-instance` label
- `attachToNetwork` parameter which must be a valid FPPNetwork
- Role `slave`
- IP address/mask

To configure the TX queue placement of the master memif, set **serverTxPlacement** in the `VPPInterface` object of the slave memif. Both **txPlacement** and **serverTxPlacement** have one comma-separated list of VPP thread indices for each TX queue on their side. **txPlacement** contains thread indices of the client, and **serverTxPlacement** contains thread indices of the VPP switch pod.

> [!IMPORTANT]
> In **txPlacement**, put every thread of the client in at least one list. In **serverTxPlacement**, put every thread of the VPP switch pod in at least one list. This rule includes thread 0, the VPP main thread. By convention, add thread 0 to the list of queue 0. If a thread is in no list, VPP discards the packets that this thread sends on the interface.

If the targeted instance of UPG is v2.x, an additional `fpp-manager.cennso.com/legacy-instance=true` label is required.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-instance: vpp-webserver
    # If target is UPG 2.x
    # fpp-manager.cennso.com/legacy-instance: true
    fpp-manager.cennso.com/slice: default
  name: vpp-webserver
  namespace: fpp-sample
spec:
  attachToNetwork: fpp-test-network
  ifName: srv
  ips:
  - 10.0.0.2/24
  memif:
    role: slave
    # Optional parameters:
    ringSize: 4096
    bufferSize: 2048
    numTxQueues: 4
    numRxQueues: 2
  table: 0
  # TX placement for slave memif interface:
  # - The number of lists must equal numTxQueues.
  # - Each list has one or more comma-separated thread indices of the client.
  # - This example is for a client with two worker threads.
  txPlacement: ["0,1","2","1","2"]
  # TX placement for master memif interface:
  # - The number of lists must equal numRxQueues.
  # - Each list has one or more comma-separated thread indices of the VPP switch pod.
  # - This example is for a VPP switch pod with four worker threads.
  serverTxPlacement: ["0,1,2","3,4"]
  mtu: 1500
```

### Automatic queue negotiation

For CNI-less memif interfaces, you can enable automatic queue negotiation using the `fpp-manager.cennso.com/perf-hint: fast` annotation on the slave memif interface. When enabled, the operator automatically:

- Detects the number of worker threads on both master and slave VPP instances
- Calculates optimal TX/RX queue counts based on the worker counts
- Sets the queue placements on both sides of the memif connection

The queue negotiation algorithm aims to:
- Assign each TX queue to one worker thread, so that worker threads do not share TX queues.
- Add the main thread (thread 0) to TX queue 0, so that VPP does not discard packets from the main thread.
- Distribute RX queues evenly across worker threads.

> [!CAUTION]
> If the two worker counts have no common factor, the memif gets `2 × N × M` queues in total, for N and M worker threads. For example, four and five worker threads give 40 queues. More queues use more memory.

Example:
```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  labels:
    fpp-manager.cennso.com/plumbing-instance: vpp-webserver
  name: vpp-webserver
  namespace: fpp-sample
  annotations:
    # Enable automatic queue negotiation
    fpp-manager.cennso.com/perf-hint: fast
spec:
  attachToNetwork: fpp-test-network
  ifName: srv
  ips:
  - 10.0.0.2/24
  memif:
    role: slave
    # Queue counts and placement will be calculated automatically
    # based on detected worker counts
  mtu: 1500
```

When queue negotiation is active, the operator adds these annotations automatically:
- `fpp-manager.cennso.com/master-worker-count` - Number of worker threads on master VPP
- `fpp-manager.cennso.com/slave-worker-count` - Number of worker threads on slave VPP

The interface sync will wait until both worker counts are detected before creating the memif interface, ensuring proper queue configuration from the start.

The operator writes the calculated values into the `VPPInterface` object of the slave memif. On a side without worker threads, the operator assigns every TX queue to thread 0. For example, with two worker threads on the master side and three on the slave side, the operator writes the following values:

```yaml
spec:
  ...
  memif:
    ...
    numRxQueues: 6
    numTxQueues: 6
  # TX queue placement on the slave side, with thread indices of the slave VPP instance
  txPlacement: ["0,1", "2", "3", "1", "2", "3"]
  # TX queue placement on the master side, with thread indices of the VPP switch pod
  serverTxPlacement: ["0,1", "2", "1", "2", "1", "2"]
```

In both placements, thread 0 and thread 1 share queue 0. Each of the other queues has one worker thread.

## VPPInterface: tap

VPPInterface of type tap is used to connect pods that use Linux networking to the VPP switch pod. Note that in the example below, the IP address information is not included as it's handled by the CNI plugin itself in this case.

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-container-id: 92b86f0e629c10966389ee1acfd9fff6e445147c
    fpp-manager.cennso.com/plumbing-ifname: net1
    fpp-manager.cennso.com/plumbing-instance-uid: 4b879b86-3789-421e-a636-caafec73a6ba
    fpp-manager.cennso.com/plumbing-node: fpp-cluster-control-plane
    fpp-manager.cennso.com/plumbing-pod-name: linux-app-0
    fpp-manager.cennso.com/plumbing-type: tap
    fpp-manager.cennso.com/plumbing-vni: "1"
  name: linux-app-0-tap-1-b4v8g
  namespace: fpp-sample
spec:
  bridgeDomain: 1
  hardwareAddress: 02:fe:12:d9:3f:ff
  ifName: tap0-net1
  mtu: 9000
  tap:
    hostIfName: net1
    hostNS: /var/run/netns/cni-3ab3b5f8-de69-93d1-8dba-b1333ee01e32
    numRxQueues: 2
    rxRingSize: 8192
    txRingSize: 8192
status:
  memberCount: 0
  ready: true
  swIfIndex: 1
  vppName: tap0-net1
```

Below is the sample NetworkAttachmentDefinition with the CNI config from which FPP-CNI has derived the above VPPInterface.

```yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: linux-net
  namespace: fpp-sample
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {
        "addresses": [
          {
            "address": "10.0.0.2/24"
          }
        ],
        "type": "static"
      },
      "mtu": 9000,
      "name": "tst",
      "type": "fpp-cni",
      "vni": 1,
      "vppIfaceType": "tap",
      "numRxQueues": 2,
      "tapTxRingSize": 8192,
      "tapRxRingSize": 8192
    }
```

It is also possible to specify multiple IP addresses for an interface:

```yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: linux-net
  namespace: fpp-sample
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {
        "addresses": [
          {
            "address": "10.0.0.2/24"
          },
          {
            "address": "fd8a:a9f:3294:1::20/64"
          }
        ],
        "type": "static"
      },
      "mtu": 9000,
      "name": "tst",
      "type": "fpp-cni",
      "vni": 1,
      "vppIfaceType": "tap",
      "numRxQueues": 2,
      "tapTxRingSize": 8192,
      "tapRxRingSize": 8192
    }
```

The following additional tunable settings are available for taps in the CNI config:

* `numRxQueues` (goes into `spec.tap.numRxQueues`): number of rx queues, defaults to 1
* `tapRxRingSize` (goes into `spec.tap.txRingSize`) - the number of entries of TX ring, defaults to 4096
* `tapTxRingSize` (goes into `spec.tap.txRingSize`) - the number of entries of RX ring, defaults to 4096

## VPPInterface: VLAN

VPPInterface of the `VLAN` type is used to create a sub-interface that processes packets with the `802.1q` VLAN ID tag attached.
Creating this sub-interface requires another interface on the same VPP that serves as a parent.
Every VPPInterface of the `VLAN` type corresponds with one sub-interface.
Due to limitations in VPP, the **ifName** parameter always changes to `<parentIfName>.<VLAN ID>`.

See the example of the VPPInterface of the `VLAN` type:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: nv-node1-31
  namespace: fpp
  labels:
    fpp-manager.cennso.com/created-for: node-op
    fpp-manager.cennso.com/plumbing-node: node1
spec:
  ifName: myTap.42
  vlan:
    ID: 42
    parentIfName: myTap # ifName of some other VPPInterface on the same vpp
status:
  # status report by VPP switch pod
  ready: true
  swIfIndex: 2
  vppName: myTap.42
```

## VPPInterface: IPsec tunnel

> [!IMPORTANT]
> IPsec support is an alpha feature and is not suitable for production deployments.

A `VPPInterface` with **spec.ipsecTunnel** set creates a VPP IPsec tunnel interface for route-based IPsec.
The `charon` `VPPTool` attaches the Security Associations of a CHILD_SA to the interface whose **spec.ipsecTunnel.instance** equals the `if_id` of the CHILD_SA.
Routes through the interface select which traffic goes into the tunnel.

The **spec.ipsecTunnel.instance** parameter is required and must be from `1` to `16383`.
If more than one `VPPInterface` requests the same instance in one VPP instance, the oldest one uses it.
The others stay not ready and get a Warning event.
When you delete the interface, VPP removes its tunnel protection, but the Security Associations stay, because `charon` owns them.

The following example creates an IPsec tunnel interface with instance `1`:

```yaml
apiVersion: fpp-manager.cennso.com/v1alpha1
kind: VPPInterface
metadata:
  name: cgw-a-vti
  namespace: cgw-system
  labels:
    fpp-manager.cennso.com/created-for: vpp-operator
    fpp-manager.cennso.com/plumbing-instance: cgw-a
spec:
  ifName: vti
  ips:
  - 10.90.0.1/30
  mtu: 1399
  tableName: lan
  ipsecTunnel:
    # must equal if_id_in and if_id_out of the CHILD_SA
    instance: 1
```

See [Set up IPsec](https://docs.cennso.com/components/fpp/3.2/deployment-guides/ipsec.md) for the full configuration.
