Architecture and workflow
NetCap is designed to capture and aggregate traffic from multiple VPP-based Data Plane components. It provides a long-term storage and access to the captured traffic for analysis. A key design goal is to offload I/O-intensive operations to dedicated NetCap components, reducing resource usage and improving the scalability of Data Plane components. Such architecture enables traffic capture in distributed environment while maintaining centralized control and management.
Architecture
NetCap architecture includes the following components:
- NetCap VPP Plugin – captures traffic from VPP interfaces and sends labeled traffic streams to NetCap Collector.
- NetCap Collector – receives traffic streams from NetCap VPP Plugin, converts them into PCAP files, and forwards the PCAP files through Cennso Data Mesh (CDM) to the NetCap Sink component.
- NetCap Sink – collects PCAP files from CDM, merges traffic streams, and stores the result locally or in a remote storage, such as SFTP or S3.
- NetCap Provider – manages NetCap deployment and translates Kubernetes custom resources (CRs) into configuration key-value entries in CDM.
- Cennso Data Mesh (CDM) - a NATSOpens in a new tab-based connectivity layer used by NetCap to transfer captured traffic from NetCap Collector to NetCap Sink, and to distribute traffic capture configuration across Cennso clusters using key-value entries propogated by NetCap Provider.
NetCap VPP Plugin
NetCap VPP Plugin captures traffic directly from VPP interfaces using a shared memory packet interface (memif). It runs inside Fast Path Provider (FPP), Connectivity Gateway (CGW), and User Plane Gateway (UPG) pods and can capture multiple traffic streams in parallel. Each stream is labeled with a target identifier and sent to NetCap Collector for further processing.
NetCap Collector
NetCap Collector gathers traffic streams from VPP Plugin instances running in FPP, CGW, or UPG pods located on the same node. Communication between them uses a shared memory interface for efficient data transfer. NetCap Collector:
- Converts raw traffic streams into the
pcapngformatOpens in a new tab - Sends PCAPs to CDM, either using pub-subOpens in a new tab or JetStreamOpens in a new tab
NetCap Sink
NetCap Sink retrieves PCAPs from CDM and merges them into one PCAP file. Then, NetCap Sink stores PCAP data as a *.pcapng file locally and/or uploads data to remote locations, such as SFTP or S3. You can also configure NetCap Sink to expose an HTTP endpoint for real-time analysis.
NetCap Provider
NetCap Provider manages NetCap deployment and translates Kubernetes custom resources into key-value entries in CDM. The key-value configuration is then used by NetCap components across the system to control and coordinate traffic capturing behaviour.
Workflow
This is a sample operational workflow for capturing and processing traffic with NetCap:
The user initiates traffic capturing by creating two Kubernetes custom resources:
NetCaptureStorage, which defines where PCAP files will be stored, andNetCaptureJob, which specifies what traffic to capture.NetCap Provider processes these custom resources and creates the associated
NetCaptureStreamandNetCaptureDestinationKubernetes objects. It then reconciles them and writes the resulting configuration into CDM as key-value (KV) entries.Cennso Data Plane components, such as FPP, CGW, and UPG, watch for new KV configuration changes in CDM. When any changes are detected, the new configuration is applied to the NetCap VPP Plugin of the given component.
NetCap Collector and NetCap Sink are connected to CDM. They apply the relevant configuration for sending and receiving traffic streams. NetCap Sink aggregates PCAP data sent from multiple Collectors in a single location.
VPP instances (within FPP, CGW, or UPG pods) start generating traffic streams. Each stream is labeled with a target name (which matches the name of the
NetCaptureJob) to support aggregation and routing.NetCap Collector processes the stream:
- Collects traffic from multiple VPP Plugins on the same node
- Aggregates streams by their target names (tags)
- Converts the data into
pcapngformat - Sends traffic data to the destination as a CDM NATS message
NetCap Sink receives and stores the data:
- Subscribes to relevant CDM NATS subjects
- Receives the PCAP data
- Stores it in a defined location:
- local disk
- remote location (SFTP server or S3 storage)
- Makes it available over HTTP for real-time analysis, for example using Wireshark