sampling_test - openconfig/featureprofiles GitHub Wiki
The goal is to validate that packet sampling is working as expected, clients can connect to the gNPSI service and receive samples.
- Configure DUT with two ports with IPv4/IPv6 addresses
- Configure sFlow and gNPSI on DUT with following parameters:
- Sample size = 256 bytes
- Sampling rate is 1:1M
- Configure OTG traffic with different traffic profiles.
- IPv4 and Ipv6
- Varying packet sizes (64, 512, 1500)
- Start OTG traffic
-
Start the gRPC client and subscribe to the gNPSI service on the DUT.
-
Verify the samples received by the client are as per expectations:
- Samples are formatted as per the sFLOW datagram specifications.
- Appropriate number of samples are received based on the sampling raste. e.g. ~1 in 1M samples is received for a sampling rate of 1:1M.
- Datagram contents are set correctly.
- Sampling rate is correct
- Ingress and egress interfaces are correct
- Inner packets can be parsed correctly
-
Start 2 gRPC clients and subscribe to the gNPSI service on the DUT.
-
Verify each client receives ~1 sample for every 1M packet through the DUT.
-
Start a gRPC client and subscribe to the gRPC service on the DUT, and verify the connection is healthy and samples are received.
-
Disconnect and reconnect the client, and verifying the reconnection is successful, and samples are received.
-
Start a gRPC client and subscribe to the gRPC service on the DUT, and verify the connection is healthy and samples are received.
-
Restart the gNPSI service (This can be done by a switch reboot).
-
Let the gRPC client try to reconnect to gNPSI service every few seconds. The gRPC client should successfully connect to gNPSI service after gNPSI service is up.
-
Verify that the samples are received.
rpcs:
gnpsi:
gNPSI.Subscribe:
N/A