Napatech
Napatech Integration
This guide covers building VoIPmonitor sniffer with Napatech SmartNIC support, configuration, and troubleshooting.
First Installation
Prerequisites
- Download latest Napatech drivers and untar into
/opt/napatech3 - Build the Napatech driver according to vendor documentation
- Install required development libraries
Build Steps
# Clone the sniffer source
cd /usr/src
git clone -b develop https://github.com/voipmonitor/sniffer.git
cd sniffer
# Configure with Napatech library paths
./configure --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib
# Install missing dependencies if configure reports errors, then run make
make
ℹ️ Note: The development branch is named develop (NOT "development"). Use git checkout develop to switch to it.
If you already have the repository cloned and want to switch to the develop branch:
cd /usr/src/sniffer
git fetch origin
git checkout develop
git pull
Verify Build
Check that voipmonitor is linked against Napatech's libpcap:
ldd ./voipmonitor | grep pcap
Expected output:
libpcap.so.1 => /opt/napatech3/lib/libpcap.so.1 (0x00007fc0b69b0000)
Install and Run
# Replace original binary
cp ./voipmonitor /usr/local/sbin/voipmonitor
# Restart the service
systemctl restart voipmonitor
Upgrade
GUI Upgrade (v24.23+)
From sensor version 24.23, you can perform upgrades via the GUI using the upgrade_by_git option. The configure_param option ensures the Makefile is created with appropriate includes/libs.
Add these options to /etc/voipmonitor.conf:
upgrade_by_git = yes
git_folder = /usr/src/sniffer
configure_param = --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib
After restarting the sniffer, click UPGRADE in the GUI. The sniffer will automatically perform: git pull → configure → make clean → make → stop → make install → start.
Manual Upgrade
cd /usr/src/sniffer
git checkout develop
git pull
./configure --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib
make
make install
systemctl restart voipmonitor
Napatech Driver Configuration
VoIPmonitor Configuration
In /etc/voipmonitor.conf:
interface = napa0
# IMPORTANT: BPF filter option must be commented out!
#filter = udp or (vlan and udp)
⚠️ Warning: The BPF filter option MUST be commented out or removed when using Napatech. BPF filters are not compatible with Napatech's NTPL filtering.
ntpcap.ini Configuration
File: /opt/napatech3/config/ntpcap.ini
[Common]
Ntpl1 = "Assign[streamid=0;txport=0;txignore=true]=all"
[napa0]
StreamId = 0
Tx = 0
For older Napatech driver versions:
[napa0]
Rx1="Assign[streamid=252;txport=0;txignore=true]=all"
Tx=0
ntservice.ini Configuration
File: /opt/napatech3/config/ntservice.ini
[System]
TimestampFormat = NATIVE_UNIX
TimestampMethod = EOF
HostBufferWaitMethod = 0
SDRAMFillLevelWarning = 0
[logging]
LogMask = 0x07
LogToFile = 0
LogFileName = /tmp/Log3G_%s.log
LogBufferWrap = wrap
[Adapter0]
AdapterType = NT4E
BusId = 00:07:00:00
PacketDescriptor = NT
HostBuffersRx = [8,16,0]
HostBuffersTx = [8,16,0]
TimeSyncProtocol = NT
TimeSyncConnectorIn = Ext
TimeSyncConnectorOut = None
TimeSyncConnectorRepeat = None
TimeSyncTimeJumpThreshold = 1
TimeSyncTimeOffset = 0
MaxFrameSize = 9018
AltTPID = 0x8100
Profile = Capture
DiscardSize = 16
OsTimeSyncFailover = DISABLE
Time Source Configuration
By default, Napatech uses GMT timestamps. To use system time instead:
For newer Napatech drivers:
TimesynConnectorExt1 = None
TimeSyncReferencePriority = OSTime
Alternative for older drivers:
# For GMT (external PPS):
TimeSyncConnectorExt1 = PpsIn
# For system-dependent time:
TimeSyncConnectorExt1 = NttsIn
💡 Tip: If spool directories are created with incorrect dates (e.g., 1970-01-01), see troubleshooting section below.
Systemd Service Configuration
You need to ensure Napatech drivers (ntservice) start before VoIPmonitor. See systemd service file configuration for adding:
After=ntservice.service
Requires=ntservice.service
Traffic Filtering on Napatech Card
To filter traffic directly on the Napatech card, create an NTPL filter file.
Example: /opt/napatech3/myfilter.ntpl
# Start NTPL
# Delete all existing filter
delete = all
# Setup UDP macros
DefineMacro("mUdpSrcPort", "Data[DynOffset=DynOffUDPFrame;Offset=0;DataType=ByteStr2]")
DefineMacro("mUdpDestPort", "Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2]")
# Setup filters
# SIP filter (ports 5060, 5061)
Assign[StreamId = 0] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061)
# RTP filter (ports 10000-61743 in HEX)
Assign[StreamId = 0] = (mUdpSrcPort == (0x2710..0xF12F))
Assign[StreamId = 1] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061)
Assign[StreamId = 1] = (mUdpSrcPort == (0x2710..0xF12F))
Assign[StreamId = 2] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061)
Assign[StreamId = 2] = (mUdpSrcPort == (0x2710..0xF12F))
Assign[StreamId = 3] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061)
Assign[StreamId = 3] = (mUdpSrcPort == (0x2710..0xF12F))
# End NTPL
# Enable Deduplication
DeduplicationConfig[drop=duplicate] = GroupID == 0
Define ckRecipe = CorrelationKey(Begin=StartOfFrame[0], End=EndOfFrame[0], DeduplicationGroupID=0)
Assign[StreamID=0,1,2,3; CorrelationKey=ckRecipe] = Port == 0,1,2,3
Apply the filter:
/opt/napatech3/bin/ntstart.sh -n myfilter.ntpl
Troubleshooting
Spool Directories with Date 1970-01-01
If spool directories are created with incorrect timestamps (e.g., 1970-01-01), the Napatech card is providing Unix Epoch time instead of actual system time.
Solution:
- Edit
/opt/napatech3/config/ntservice.ini - For newer drivers, add:
timeSource = OS
- For older drivers, in the
[Adapter0]section: OsTimeSyncFailover = ENABLE
- Restart services:
systemctl stop ntservice systemctl start ntservice systemctl restart voipmonitor
- Verify fix:
ls -ltd /var/spool/voipmonitor/*
Napatech Interfaces in DOWN State
If tcpdump or tshark show no packets on Napatech interfaces:
- Check interface status:
ip link show napa0 ip link show | grep napa
- Verify drivers are loaded:
lsmod | grep ntpcap systemctl status ntservice
- Verify voipmonitor uses Napatech libpcap:
ldd /usr/local/sbin/voipmonitor | grep pcap
- Expected output should show
/opt/napatech3/lib/libpcap.so.1, NOT system libpcap.
- If using system libpcap, rebuild voipmonitor:
cd /usr/src/sniffer git pull ./configure --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib make make install systemctl restart voipmonitor
Drivers Not Capturing Traffic
Symptoms:
- GUI shows no calls
tshark -i napa0shows no packets- Interfaces are UP but not receiving data
Solution: Restart Napatech drivers:
systemctl stop voipmonitor
cd /opt/napatech3/bin/
./ntstop
./ntstart
systemctl start voipmonitor
Verify traffic capture:
tshark -i napa0 -Y "sip || rtp" -n -c 10
If issues persist, check logs:
journalctl -u ntservice -n 50
tail -f /tmp/Log3G_*.log
Compilation Errors with DPDK Headers
If compilation fails with errors like RTE_ETH_MQ_TX_NONE was not declared, system DPDK libraries are conflicting with Napatech SDK.
Solution: Disable DPDK support in config.h:
- Run configure first:
./configure --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib
- Edit
config.h- change#define HAVE_LIBDPDK 1to:#define HAVE_LIBDPDK 0
- Then compile:
make
Sensor Shows as Down in GUI
If the GUI displays an error message "The requested response from the sensor could not be retrieved" or shows the Napatech sensor status as DOWN (red), this indicates the Napatech driver service (ntservice) is not running or failed to start.
Symptoms:
- GUI shows sensor as down (red status icon)
- Error message: "The requested response from the sensor could not be retrieved"
- Napatech interfaces may not appear in GUI Settings -> Sensors
Solution:
- Start the
ntservicemanually:systemctl start ntservice
- Verify ntservice is running:
systemctl status ntservice lsmod | grep ntpcap
- Modify systemd service configuration to ensure
ntservicestarts beforevoipmonitorat boot:systemctl edit voipmonitor
- Add this override:
[Unit] After=ntservice.service Requires=ntservice.service
- Reboot the OS to apply the startup order changes:
reboot
- After reboot, verify the napatech interface is listed in the GUI under Settings > Sensors. The sensor should appear with GREEN status.
- If needed, manually restart the voipmonitor service:
systemctl stop voipmonitor systemctl start voipmonitor
ℹ️ Note: The ntservice must be running BEFORE voipmonitor starts, or the napatech interface will not be available. This is why the systemd dependency configuration is critical.
Service Startup Order (init.d)
If VoIPmonitor fails with libpcap error no such device exists after upgrade, Napatech drivers may not be initialized when VoIPmonitor starts.
For init.d systems: Edit /etc/init.d/voipmonitor and add before voipmonitor binary execution:
/opt/napatech3/bin/ntstart.sh
sleep 60
For systemd systems: Add to the service unit file:
After=ntservice.service
Requires=ntservice.service
See systemd documentation for details.
AI Summary for RAG
Summary: Guide for building VoIPmonitor sniffer with Napatech SmartNIC support. Build process: clone source with git clone -b develop, configure with --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib, and make. For GUI upgrades (v24.23+), set upgrade_by_git=yes and configure_param in voipmonitor.conf. Configuration requires: interface=napa0 in voipmonitor.conf (BPF filter must be disabled), ntpcap.ini for stream assignment, ntservice.ini for adapter settings. Time source configuration: set timeSource=OS for system time. Troubleshooting covers: 1970-01-01 spool directories (time source misconfiguration), interfaces in DOWN state (requires Napatech libpcap), drivers not capturing (restart with ntstop/ntstart), DPDK compilation errors (set HAVE_LIBDPDK=0 in config.h), service startup order (add ntservice dependency), sensor shows as down in GUI with "The requested response from the sensor could not be retrieved" (start ntservice, configure systemd dependency).
Keywords: Napatech, SmartNIC, compilation, configure, upgrade_by_git, configure_param, ntpcap.ini, ntservice.ini, timeSource, 1970-01-01, NTPL filter, libpcap, ntstop, ntstart, HAVE_LIBDPDK, systemd, init.d, sensor down, ntservice, "The requested response from the sensor could not be retrieved"
Key Questions:
- How do I compile VoIPmonitor with Napatech support?
- What configure options are needed for Napatech?
- How do I upgrade VoIPmonitor with Napatech via GUI?
- Why are spool directories created with date 1970-01-01?
- How do I fix Napatech interfaces in DOWN state?
- VoIPmonitor not capturing calls with Napatech, how to fix?
- How do I restart Napatech drivers?
- How to fix RTE_ETH_MQ_TX_NONE compilation error?
- How to configure Napatech driver dependency in systemd?
- What does libpcap error no such device exists mean?
- Sensor shows as down in GUI with "The requested response from the sensor could not be retrieved"?
- How do I fix "The requested response from the sensor could not be retrieved" error with Napatech?