gNPSI export for sFlow

Overview

Note: This feature is supported on 7250 IXR Gen 2c+ and 7250 IXR Gen 3 platforms.

The gRPC Network Packet Sampling Interface (gNPSI) is a gRPC-based interface for streaming sFlow samples from network devices to collection systems. It standardizes how devices export packet samples, replacing fragmented, vendor-specific approaches with a single programmatic API. gNPSI operates over a mutually authenticated, TLS-encrypted gRPC channel, enabling real-time delivery of sampled packet data as soon as it is generated.

Architecture

The following figure shows the gNPSI architecture.

Figure 1. gNPSI architecture
  • The forwarding complex extracts sFlow samples and forwards them to the CPM (Control Processor Module) CPU.

  • The CPM CPU supports up to two concurrent gNPSI sessions to separate collectors and forwards the samples to both collectors in parallel.

  • Only the sFlow payload is transmitted through gNPSI. Any encapsulating IP or UDP transport headers are stripped before transmission.

gNPSI operates in a mutually exclusive mode with traditional IP-based flow export. When gNPSI transport is enabled:

  • You cannot configure the IP collector.

  • If no active gNPSI session exists, no samples are exported.

  • DSCP marking and UDP checksum options do not apply.

gNPSI service

To use gNPSI as the sFlow transport, you must first configure system grpc-server <name> services option to gnpsi and bring up the gNPSI service, because this service acts as the endpoint for all subscription-based sample streaming. After the service is active, any existing sFlow collectors under the sFlow configuration must be removed. Finally, to ensure that the samples are exported through the gNPSI session, configure the system sflow transport mode to gnpsi.

Congestion handling

gNPSI uses an acknowledged streaming model, where each transmitted message requires confirmation from the collector. Under high sampling rates, this model may introduce local congestion. To manage the congestion, you can configure a maximum size limit for the local buffer. gNPSI discards new samples when the buffer reaches the configured capacity.

gNPSI considerations

When configuring gNPSI transport, consider the following:

7250 IXR Gen 3
  • Sample size configurations of 256 B and 512 B are supported.
  • With 256 B configuration, captured samples is 256 B.
  • With 512 B configuration, captured samples is 414 B
7250 IXR Gen 2c+
  • Only 256 B sample size configuration is supported.
  • Actual captured sample size is limited to 205 B.
gNPSI egress sampling
  • Supported for flow sampling of GUE packets
  • With 256 B configuration, captured samples is 192 B.
  • With 512 B configuration, captured samples is 448 B.