Napatech: Difference between revisions
(Shorten AI Summary) |
(Rewrite: consolidated structure, added quick reference table, streamlined config sections) |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Configuration | = Napatech Integration = | ||
[[Category:Installation]] | |||
[[Category:Configuration]] | |||
This guide covers building VoIPmonitor sniffer with Napatech SmartNIC support, configuration, and troubleshooting. | |||
<kroki lang="mermaid"> | |||
%%{init: {'flowchart': {'nodeSpacing': 15, 'rankSpacing': 30}}}%% | |||
flowchart LR | |||
A[Install Drivers] --> B[Build VoIPmonitor] | |||
B --> C[Configure] | |||
C --> D[Set systemd deps] | |||
D --> E[Start Service] | |||
</kroki> | |||
== | == Prerequisites == | ||
* | * Napatech drivers installed in <code>/opt/napatech3</code> (built per vendor documentation) | ||
* | * Development libraries for compilation | ||
* | * Root access for driver operations | ||
== Building VoIPmonitor with Napatech Support == | |||
<syntaxhighlight lang="bash"> | |||
# Clone source and build | |||
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 | ||
make | |||
# Verify linkage (MUST show /opt/napatech3/lib/libpcap.so.1) | |||
ldd ./voipmonitor | grep pcap | |||
# Install | |||
cp ./voipmonitor /usr/local/sbin/voipmonitor | |||
systemctl restart voipmonitor | |||
</syntaxhighlight> | |||
{{Note|1=The development branch is named <code>develop</code> (not "development"). Use <code>git checkout develop</code> to switch to it.}} | |||
== Upgrading == | |||
=== GUI Upgrade (v24.23+) === | |||
Add to <code>/etc/voipmonitor.conf</code>: | |||
<syntaxhighlight lang="ini"> | |||
upgrade_by_git = yes | |||
git_folder = /usr/src/sniffer | |||
configure_param = --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib | |||
</syntaxhighlight> | |||
After restart, click '''UPGRADE''' in the GUI. The sniffer automatically performs: git pull → configure → make → install → restart. | |||
=== Manual Upgrade === | |||
<syntaxhighlight lang="bash"> | |||
cd /usr/src/sniffer | cd /usr/src/sniffer | ||
git pull | git pull | ||
</ | ./configure --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib | ||
make && make install | |||
systemctl restart voipmonitor | |||
</syntaxhighlight> | |||
== Configuration == | |||
=== VoIPmonitor Configuration === | |||
In <code>/etc/voipmonitor.conf</code>: | |||
<syntaxhighlight lang="ini"> | |||
interface = napa0 | |||
# CRITICAL: BPF filter MUST be disabled - not compatible with Napatech NTPL | |||
#filter = udp or (vlan and udp) | |||
</syntaxhighlight> | |||
= | {{Warning|1=The BPF <code>filter</code> option MUST be commented out when using Napatech. Use NTPL filtering instead (see [[#Traffic Filtering|Traffic Filtering]]).}} | ||
== | === ntpcap.ini === | ||
File: <code>/opt/napatech3/config/ntpcap.ini</code> | |||
<syntaxhighlight lang="ini"> | |||
[Common] | |||
Ntpl1 = "Assign[streamid=0;txport=0;txignore=true]=all" | |||
[napa0] | |||
StreamId = 0 | |||
Tx = 0 | |||
</syntaxhighlight> | |||
For older drivers, use: | |||
<syntaxhighlight lang="ini"> | |||
[napa0] | |||
Rx1="Assign[streamid=252;txport=0;txignore=true]=all" | |||
Tx=0 | |||
</syntaxhighlight> | |||
=== ntservice.ini (Key Settings) === | |||
File: <code>/opt/napatech3/config/ntservice.ini</code> | |||
Essential settings: | |||
<syntaxhighlight lang="ini"> | |||
[System] | |||
TimestampFormat = NATIVE_UNIX | |||
TimestampMethod = EOF | |||
[Adapter0] | |||
AdapterType = NT4E # Match your card type | |||
BusId = 00:07:00:00 # Match your PCI address | |||
Profile = Capture | |||
MaxFrameSize = 9018 | |||
</syntaxhighlight> | |||
'''Time source configuration''' (to avoid 1970-01-01 timestamps): | |||
<syntaxhighlight lang="ini"> | |||
# Newer drivers: | |||
timeSource = OS | |||
= | # Older drivers (in [Adapter0] section): | ||
OsTimeSyncFailover = ENABLE | |||
</syntaxhighlight> | |||
=== Systemd Dependencies === | |||
VoIPmonitor must start AFTER Napatech drivers. Configure dependency: | |||
<syntaxhighlight lang="bash"> | |||
systemctl edit voipmonitor | |||
</syntaxhighlight> | |||
= | Add: | ||
<syntaxhighlight lang="ini"> | |||
[Unit] | |||
After=ntservice.service | |||
Requires=ntservice.service | |||
</syntaxhighlight> | |||
= | For init.d systems, add to <code>/etc/init.d/voipmonitor</code> before binary execution: | ||
<syntaxhighlight lang="bash"> | |||
/opt/napatech3/bin/ntstart.sh | |||
sleep 60 | |||
</syntaxhighlight> | |||
See [[Systemd_for_voipmonitor_service_management#Dependency_Customization|systemd documentation]] for details. | |||
== Traffic Filtering == | |||
To filter traffic on the Napatech card (hardware filtering), create an NTPL file. | |||
Example <code>/opt/napatech3/myfilter.ntpl</code>: | |||
<syntaxhighlight lang="text"> | |||
delete = all | |||
# UDP port macros | |||
DefineMacro("mUdpSrcPort", "Data[DynOffset=DynOffUDPFrame;Offset=0;DataType=ByteStr2]") | |||
DefineMacro("mUdpDestPort", "Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2]") | |||
# SIP filter (ports 5060, 5061) | |||
Assign[StreamId = 0] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061) | |||
# RTP filter (ports 10000-61743) | |||
Assign[StreamId = 0] = (mUdpSrcPort == (0x2710..0xF12F)) | |||
# Deduplication | |||
DeduplicationConfig[drop=duplicate] = GroupID == 0 | |||
Define ckRecipe = CorrelationKey(Begin=StartOfFrame[0], End=EndOfFrame[0], DeduplicationGroupID=0) | |||
Assign[StreamID=0; CorrelationKey=ckRecipe] = Port == 0 | |||
</syntaxhighlight> | |||
Apply filter: | |||
<syntaxhighlight lang="bash"> | |||
/opt/napatech3/bin/ntstart.sh -n myfilter.ntpl | |||
</syntaxhighlight> | |||
== Troubleshooting == | |||
=== Quick Reference === | |||
{| class="wikitable" | |||
! Problem !! Cause !! Solution | |||
|- | |||
| Spool directories dated 1970-01-01 || Time source misconfigured || Set <code>timeSource = OS</code> in ntservice.ini | |||
|- | |||
| No packets captured || Wrong libpcap linked || Verify <code>ldd voipmonitor</code> shows Napatech libpcap | |||
|- | |||
| Sensor DOWN in GUI || ntservice not running || Start ntservice, add systemd dependency | |||
|- | |||
| <code>RTE_ETH_MQ_TX_NONE</code> error || DPDK conflict || Set <code>#define HAVE_LIBDPDK 0</code> in config.h | |||
|- | |||
| <code>libpcap error no such device</code> || Driver not initialized || Add ntservice dependency, restart services | |||
|} | |||
=== Spool Directories with Date 1970-01-01 === | |||
The Napatech card is providing Unix Epoch time instead of system time. | |||
= | <syntaxhighlight lang="bash"> | ||
# Fix in ntservice.ini (see Configuration section above) | |||
( | # Then restart: | ||
systemctl stop ntservice | |||
systemctl start ntservice | |||
systemctl restart voipmonitor | |||
# Verify: | |||
ls -ltd /var/spool/voipmonitor/* | |||
</syntaxhighlight> | |||
=== Napatech Interfaces Not Capturing === | |||
<syntaxhighlight lang="bash"> | |||
# Check interface status | |||
ip link show napa0 | |||
# Verify correct libpcap (MUST show /opt/napatech3/lib/libpcap.so.1) | |||
ldd /usr/local/sbin/voipmonitor | grep pcap | |||
# Restart drivers | |||
systemctl stop voipmonitor | |||
cd /opt/napatech3/bin/ && ./ntstop && ./ntstart | |||
systemctl start voipmonitor | |||
# Verify capture | |||
tshark -i napa0 -Y "sip || rtp" -n -c 10 | |||
</syntaxhighlight> | |||
If libpcap shows system path instead of Napatech path, rebuild VoIPmonitor (see [[#Building VoIPmonitor with Napatech Support|Build section]]). | |||
=== Sensor Shows as Down in GUI === | |||
Error: '''"The requested response from the sensor could not be retrieved"''' | |||
<syntaxhighlight lang="bash"> | |||
# Start ntservice | |||
systemctl start ntservice | |||
systemctl status ntservice | |||
# Configure dependency (see Systemd Dependencies section) | |||
systemctl edit voipmonitor | |||
# Add After= and Requires= for ntservice.service | |||
# Reboot to apply | |||
reboot | |||
</syntaxhighlight> | |||
{{Note|1=The <code>ntservice</code> must be running BEFORE <code>voipmonitor</code> starts. The systemd dependency configuration is critical.}} | |||
=== Compilation Errors (DPDK Conflict) === | |||
If build fails with <code>RTE_ETH_MQ_TX_NONE was not declared</code>: | |||
<syntaxhighlight lang="bash"> | |||
# After running ./configure, edit config.h | |||
# Change: #define HAVE_LIBDPDK 1 | |||
# To: #define HAVE_LIBDPDK 0 | |||
make | |||
</syntaxhighlight> | |||
== See Also == | |||
* [[Sniffer_installation]] - General sniffer installation | |||
* [[DPDK]] - DPDK high-performance capture (alternative to Napatech) | |||
* [[Systemd_for_voipmonitor_service_management]] - Service management details | |||
* [[Scaling]] - Performance optimization | |||
== AI Summary for RAG == | == AI Summary for RAG == | ||
'''Summary:''' | |||
'''Keywords:''' Napatech, compilation | '''Summary:''' Guide for building VoIPmonitor sniffer with Napatech SmartNIC support. Build process: clone source with <code>git clone -b develop</code>, configure with <code>--with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib</code>, and make. Verify build with <code>ldd voipmonitor | grep pcap</code> - must show Napatech libpcap path. For GUI upgrades (v24.23+), set <code>upgrade_by_git=yes</code> and <code>configure_param</code> in voipmonitor.conf. Configuration requires: <code>interface=napa0</code> in voipmonitor.conf (BPF filter must be disabled/commented), ntpcap.ini for stream assignment, ntservice.ini for adapter and time settings. Critical: set <code>timeSource=OS</code> in ntservice.ini to avoid 1970-01-01 timestamps. Systemd dependency on ntservice is mandatory - voipmonitor must start after ntservice. Troubleshooting covers: 1970-01-01 spool directories (time source), interfaces not capturing (wrong libpcap), sensor DOWN in GUI (ntservice not running), DPDK compilation errors (set HAVE_LIBDPDK=0). | ||
'''Keywords:''' Napatech, SmartNIC, high-performance capture, compilation, configure, upgrade_by_git, configure_param, ntpcap.ini, ntservice.ini, timeSource, 1970-01-01, NTPL filter, hardware filtering, libpcap, ntstop, ntstart, HAVE_LIBDPDK, systemd dependency, ntservice, sensor down, "The requested response from the sensor could not be retrieved" | |||
'''Key Questions:''' | '''Key Questions:''' | ||
* How do I compile VoIPmonitor with Napatech support? | * How do I compile VoIPmonitor with Napatech support? | ||
* What configure options are needed for Napatech? | * 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 verify VoIPmonitor is using Napatech libpcap? | |||
* How do I configure NTPL hardware filtering on Napatech? | |||
Latest revision as of 16:48, 8 January 2026
Napatech Integration
This guide covers building VoIPmonitor sniffer with Napatech SmartNIC support, configuration, and troubleshooting.
Prerequisites
- Napatech drivers installed in
/opt/napatech3(built per vendor documentation) - Development libraries for compilation
- Root access for driver operations
Building VoIPmonitor with Napatech Support
# Clone source and build
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
make
# Verify linkage (MUST show /opt/napatech3/lib/libpcap.so.1)
ldd ./voipmonitor | grep pcap
# Install
cp ./voipmonitor /usr/local/sbin/voipmonitor
systemctl restart voipmonitor
ℹ️ Note: The development branch is named develop (not "development"). Use git checkout develop to switch to it.
Upgrading
GUI Upgrade (v24.23+)
Add 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 restart, click UPGRADE in the GUI. The sniffer automatically performs: git pull → configure → make → install → restart.
Manual Upgrade
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
Configuration
VoIPmonitor Configuration
In /etc/voipmonitor.conf:
interface = napa0
# CRITICAL: BPF filter MUST be disabled - not compatible with Napatech NTPL
#filter = udp or (vlan and udp)
⚠️ Warning: The BPF filter option MUST be commented out when using Napatech. Use NTPL filtering instead (see Traffic Filtering).
ntpcap.ini
File: /opt/napatech3/config/ntpcap.ini
[Common]
Ntpl1 = "Assign[streamid=0;txport=0;txignore=true]=all"
[napa0]
StreamId = 0
Tx = 0
For older drivers, use:
[napa0]
Rx1="Assign[streamid=252;txport=0;txignore=true]=all"
Tx=0
ntservice.ini (Key Settings)
File: /opt/napatech3/config/ntservice.ini
Essential settings:
[System]
TimestampFormat = NATIVE_UNIX
TimestampMethod = EOF
[Adapter0]
AdapterType = NT4E # Match your card type
BusId = 00:07:00:00 # Match your PCI address
Profile = Capture
MaxFrameSize = 9018
Time source configuration (to avoid 1970-01-01 timestamps):
# Newer drivers:
timeSource = OS
# Older drivers (in [Adapter0] section):
OsTimeSyncFailover = ENABLE
Systemd Dependencies
VoIPmonitor must start AFTER Napatech drivers. Configure dependency:
systemctl edit voipmonitor
Add:
[Unit]
After=ntservice.service
Requires=ntservice.service
For init.d systems, add to /etc/init.d/voipmonitor before binary execution:
/opt/napatech3/bin/ntstart.sh
sleep 60
See systemd documentation for details.
Traffic Filtering
To filter traffic on the Napatech card (hardware filtering), create an NTPL file.
Example /opt/napatech3/myfilter.ntpl:
delete = all
# UDP port macros
DefineMacro("mUdpSrcPort", "Data[DynOffset=DynOffUDPFrame;Offset=0;DataType=ByteStr2]")
DefineMacro("mUdpDestPort", "Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2]")
# SIP filter (ports 5060, 5061)
Assign[StreamId = 0] = (mUdpSrcPort == 5060, 5061) AND (mUdpDestPort == 5060, 5061)
# RTP filter (ports 10000-61743)
Assign[StreamId = 0] = (mUdpSrcPort == (0x2710..0xF12F))
# Deduplication
DeduplicationConfig[drop=duplicate] = GroupID == 0
Define ckRecipe = CorrelationKey(Begin=StartOfFrame[0], End=EndOfFrame[0], DeduplicationGroupID=0)
Assign[StreamID=0; CorrelationKey=ckRecipe] = Port == 0
Apply filter:
/opt/napatech3/bin/ntstart.sh -n myfilter.ntpl
Troubleshooting
Quick Reference
| Problem | Cause | Solution |
|---|---|---|
| Spool directories dated 1970-01-01 | Time source misconfigured | Set timeSource = OS in ntservice.ini
|
| No packets captured | Wrong libpcap linked | Verify ldd voipmonitor shows Napatech libpcap
|
| Sensor DOWN in GUI | ntservice not running | Start ntservice, add systemd dependency |
RTE_ETH_MQ_TX_NONE error |
DPDK conflict | Set #define HAVE_LIBDPDK 0 in config.h
|
libpcap error no such device |
Driver not initialized | Add ntservice dependency, restart services |
Spool Directories with Date 1970-01-01
The Napatech card is providing Unix Epoch time instead of system time.
# Fix in ntservice.ini (see Configuration section above)
# Then restart:
systemctl stop ntservice
systemctl start ntservice
systemctl restart voipmonitor
# Verify:
ls -ltd /var/spool/voipmonitor/*
Napatech Interfaces Not Capturing
# Check interface status
ip link show napa0
# Verify correct libpcap (MUST show /opt/napatech3/lib/libpcap.so.1)
ldd /usr/local/sbin/voipmonitor | grep pcap
# Restart drivers
systemctl stop voipmonitor
cd /opt/napatech3/bin/ && ./ntstop && ./ntstart
systemctl start voipmonitor
# Verify capture
tshark -i napa0 -Y "sip || rtp" -n -c 10
If libpcap shows system path instead of Napatech path, rebuild VoIPmonitor (see Build section).
Sensor Shows as Down in GUI
Error: "The requested response from the sensor could not be retrieved"
# Start ntservice
systemctl start ntservice
systemctl status ntservice
# Configure dependency (see Systemd Dependencies section)
systemctl edit voipmonitor
# Add After= and Requires= for ntservice.service
# Reboot to apply
reboot
ℹ️ Note: The ntservice must be running BEFORE voipmonitor starts. The systemd dependency configuration is critical.
Compilation Errors (DPDK Conflict)
If build fails with RTE_ETH_MQ_TX_NONE was not declared:
# After running ./configure, edit config.h
# Change: #define HAVE_LIBDPDK 1
# To: #define HAVE_LIBDPDK 0
make
See Also
- Sniffer_installation - General sniffer installation
- DPDK - DPDK high-performance capture (alternative to Napatech)
- Systemd_for_voipmonitor_service_management - Service management details
- Scaling - Performance optimization
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. Verify build with ldd voipmonitor | grep pcap - must show Napatech libpcap path. 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/commented), ntpcap.ini for stream assignment, ntservice.ini for adapter and time settings. Critical: set timeSource=OS in ntservice.ini to avoid 1970-01-01 timestamps. Systemd dependency on ntservice is mandatory - voipmonitor must start after ntservice. Troubleshooting covers: 1970-01-01 spool directories (time source), interfaces not capturing (wrong libpcap), sensor DOWN in GUI (ntservice not running), DPDK compilation errors (set HAVE_LIBDPDK=0).
Keywords: Napatech, SmartNIC, high-performance capture, compilation, configure, upgrade_by_git, configure_param, ntpcap.ini, ntservice.ini, timeSource, 1970-01-01, NTPL filter, hardware filtering, libpcap, ntstop, ntstart, HAVE_LIBDPDK, systemd dependency, ntservice, sensor down, "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 verify VoIPmonitor is using Napatech libpcap?
- How do I configure NTPL hardware filtering on Napatech?