Set up probe mode
In probe mode, SGW Simulator holds a small number of permanent sessions, and each session is pinned to its own named tunnel interface. Each interface gets exactly one user equipment (UE) IP address. External tools, such as the Network Performance Probe (NPP), can then measure the data plane through each tunnel and export metrics keyed by the interface name. SGW Simulator itself runs no probes.
Probe mode requires the sgwsimulatorv2 binary. To select it, set the binary parameter to sgwsimulatorv2 in the Helm chart values.
How it works
Probe mode combines three configuration elements:
- The s5u_ip address range in the sgw.instances section sets the number of S5-U instances. For example,
192.0.2.10~192.0.2.11creates two instances. - Each S5-U instance creates its own tunnel interface. The gtpu_tunnel.interface_names parameter assigns names to instances positionally: the first name goes to the instance with the first address in the range. The list may be shorter than the number of instances; unnamed instances get derived names and stay available for regular traffic. See Serving Gateway configuration.
- One
probe_sessiondevice pins a permanent session to each named interface. See theprobe_sessionbehaviour in User equipment configuration.
With gtpu_conn.type set to memif, a probe_session can also reference an interface that no S5-U instance defines.
The simulator then creates the interface on start and attaches it to the S5-U address of the first instance, so the probe needs no address of its own.
A configuration can mix probe_session devices with regular load devices when there are more S5-U instances than probes. Devices with other behaviours select their S5-U instance randomly among the instances not claimed by a probe_session, so each pinned interface keeps exactly one UE IP address. When every instance is claimed, regular devices fall back to random selection over all instances. This makes the address resolution ambiguous for external tools, so keep at least one unclaimed instance for load traffic.
The simulator validates the setup on start. It stops with an error in these cases:
- gtpu_tunnel.interface_names has more entries than there are S5-U instances.
- A
probe_sessionreferences an unknown interface and gtpu_conn.type is notmemif. - Two
probe_sessiondevices claim the same interface.
Requirements
Probe mode needs a real network device for each S5-U instance, so an external tool can bind to it:
- Set gtpu_tunnel.type to
tun. Thekernel-moduletype supports only a single S5-U instance and cannot be used in probe mode. - Both supported gtpu_conn.type values work with the
tuntunnel:socketandmemif.
Example
The following configuration runs two S5-U instances with named interfaces and one permanent probe session on each:
Probe with Network Performance Probe
The Network Performance Probe (NPP) operator schedules a probe pod on the same node as the SGW Simulator pod and enters its network namespace. The probe detects all tunnel interfaces with their UE IP addresses, binds to the address of each interface, and exports Prometheus metrics. Name each NPP probe configuration after the interface it probes, so the metrics are keyed by the interface name.