For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

Configure SPAN mappings

SPAN mapping can be configured on any VPPInterface by adding spanSource field to its spec. SPAN mappings work by applying SPAN settings that tell VPPSwitch to copy all of the traffic targeted towards the interface mentioned in spanSource towards the interface for which that spanSource is set in its spec. The VPPInterface and NetworkAttachmentDefinition CRs used in this guide are created on the Core Cluster.

spanSource can be defined in one of three ways:

  1. By specifying the name of a particular VPPInterface
  2. By specifying a set of labels that match a single VPPInterface
  3. By specifying the name and namespace of a CNI-less slave memif

You can use all the above methods manually on the VPPInterface definition or automatically through the FPP-CNI configuration in NetworkAttachmentDefinition.

VPPInterface object name

Sample definition of a tap interface with a SPAN source from another interface specified using name:

yaml

Matching label of source VPPInterface

Sample definition of a tap interface with the SPAN source specified using labels:

yaml

Example FPP-CNI NAD with SPAN configuration:

yaml

VPPInterfaceRef for CNI-less SPANs

When the CNI-less feature is used, the SPAN source interface is not visible as a Kubernetes API object.

In this case, you must define vppInterfaceRef in the spanSource section when defining a Network Attachment Definition:

yaml

The vppInterfaceRef section must include the name and the namespace of the slave memif VPPInterface CR.

Verification

After creating the SPAN interface, you can describe the created VPPInterface object using kubectl and check if the VPPSPANSourceSet event is present, for example:

bash

Sample output:

yaml

To further verify the setup, access a Linux pod associated with the VPP interface and use a tool like tcpdump to monitor traffic mirrored from the source VPP interfaces. For example:

bash

Sample output:

text

We can see 2 packets (PFCP Heartbeat) exchanged between UPG and SMC in the above output.