# ntopng

**ntopng**（“ntop next generation”的缩写，即“下一代 ntop”）是一款自托管、基于网页的网络流量监控应用，它同时利用原始数据包捕获和采集到的流数据（如 NetFlow、IPFIX 和 sFlow），对流量进行实时与历史分析。<sup>[1](https://www.itechguides.com/compare/zabbix-vs-ntopng/)</sup> 它于 2013 年 6 月 30 日在 GNU GPL3 许可证下发布，是对 1998 年首次推出的监控工具 ntop 的现代化重写，并通过 nDPI——ntop 的开源深度包检测框架——来识别应用层协议。<sup>[2](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)</sup><sup> • </sup><sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup>

| 关键事实 | 说明 |
|---|---|
| 首次发布 | 2013 年 6 月 30 日，GNU GPL3 许可，作为对原版 ntop（1998 年）的重写<sup>[2](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)</sup><sup> • </sup><sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> |
| 功能 | 被动流量分析：数据包捕获，外加 NetFlow、sFlow 和 IPFIX 流采集，具备第 7 层应用检测以及实时与历史分析能力<sup>[1](https://www.itechguides.com/compare/zabbix-vs-ntopng/)</sup> |
| 应用检测 | 通过 nDPI 实现，无论使用哪个端口，均可检测 450 种以上的第 7 层应用协议<sup>[4](https://www.ntop.org/products/deep-packet-inspection/ndpi/)</sup> |
| 部署方式 | 自托管、基于网页；可运行于 Linux、Windows、macOS 和 BSD<sup>[1](https://www.itechguides.com/compare/zabbix-vs-ntopng/)</sup><sup> • </sup><sup>[2](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)</sup> |
| 版本 | 社区版（免费、开源）、专业版，以及企业版 M/L/XL/XXL/XXXL；许可证按服务器计、永久有效，含一年更新<sup>[5](https://www.ntop.org/guides/ntopng/versions_and_licensing.html)</sup> |
| 最新版本 | ntopng 7.0（2026 年 9 月），新增 nAnalyst AI 辅助流量分析、Wazuh XDR/SIEM 集成，以及 ClickHouse 时序引擎<sup>[6](https://github.com/ntop/ntopng/releases)</sup> |
| 吞吐上限 | 独立运行的 ntopng 的数据包处理吞吐量低于 1 Gbit；配合 nProbe 时低于 10 Gbit；nProbe Cento 覆盖 10/25/40/100 Gbit<sup>[7](https://www.ntop.org/license-and-hardware-sizing-guide/)</sup> |

## 架构

ntopng 以分层堆栈的方式组织。入口数据层通过三类网络接口接收监控数据：libpcap 接口，用于捕获原始数据包；PF_RING 接口，利用 ntop 的开源 Linux 数据包捕获框架达到更高速度；以及 ØMQ 接口，以 JSON 消息的形式从 nProbe 等分布式系统接收与流量相关的数据。<sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> 每个接口都运行自己的数据轮询线程，并拥有按接口划分的数据结构，因此各接口可以独立运行，很可能位于不同的 CPU 核心上。<sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup>

监控引擎整合数据，并将其组织为流与主机。一条流是一组共享同一 6 元组（VLAN、协议、源与目的 IP 及端口）的数据包；它从第一个数据包到达时开始，在持续一段时间未观测到新数据时结束，空闲的流在大约两分钟后从内存中清除，并移入二级缓存。<sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> Redis 这一键值型内存数据存储充当该数据缓存，将 ntopng 引擎与已保存的数据隔离开来。<sup>[2](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)</sup><sup> • </sup><sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> 在引擎之上，一个基于 Lua 的脚本引擎导出监控数据，由网页服务器呈现给浏览器；用户可以用 LuaJIT 为 ntopng 页面编写脚本、进行扩展和修改。<sup>[2](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)</sup><sup> • </sup><sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup>

## 流量分析与 nDPI

应用协议发现由 nDPI 完成，这是一个用于深度包检测的 GPLv3 C 库，它与 ntopng 保持分离，以便两个组件能够独立扩展。<sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> nDPI 无论使用哪个端口都能检测第 7 层应用协议，因此它能识别非标准端口上的 HTTP，反过来也能识别 80 端口上的非 HTTP 流量；它还会提取 URL、TLS 证书和操作系统等元数据，并通过加密流量分析（Encrypted Traffic Analysis，ETA）对加密的 TLS/QUIC 流量进行分类。<sup>[4](https://www.ntop.org/products/deep-packet-inspection/ndpi/)</sup> 该库目前支持 450 种以上的第 7 层协议和 56 种以上的网络安全流风险。<sup>[4](https://www.ntop.org/products/deep-packet-inspection/ndpi/)</sup> 在 2014 年发表设计论文时，它已能识别 170 多种协议，包括 [BitTorrent](https://www.edgepedia.org/zh/bittorrent)、Skype、Facebook、Twitter、Citrix 和 [Webex](https://www.edgepedia.org/zh/webex)，并能将 *.amazon.com 之类的 SSL 服务器证书名匹配到相应服务。<sup>[8](https://www.usenix.org/sites/default/files/lisa14_full_proceedings.pdf)</sup>

除单一协议之外，nDPI 与 ntopng 还将协议归入类别，因此可以把流量作为一个整体来推理，例如把 VPN 流量视为一个整体，而不是某个特定的 VPN 实现；用户还可以通过配置文件或图形界面添加自定义应用规则。<sup>[9](https://www.ntop.org/guides/ntopng/user_interface/shared/settings/applications_and_categories.html)</sup> 仪表盘的“主要应用”视图按应用协议展示带宽划分，未识别的协议标记为“未知”。<sup>[10](https://ntop.org/guides/ntopng/user_interface/network_interface/dashboard/dashboard.html)</sup>

## 使用 nProbe 进行流采集

对于数据包捕获不切实际的网络，ntopng 会采集流导出数据。nProbe 是 ntop 的探针与采集守护进程，它将 sFlow、NetFlow v5 和 NetFlow v9 等传入的流格式转换为 ntopng 能够理解的单一统一格式；在流采集部署中，执行深度包检测的是 nProbe，而非 ntopng。<sup>[11](https://ntop.org/guides/ntopng/flows/nprobe.html)</sup> ntopng 可以监控多个 NetFlow、sFlow 和 IPFIX 导出器，并将它们合并到单个实例中。<sup>[12](https://www.ntop.org/packets-vs-flows-which-option-is-the-best/)</sup>

采样行为因协议而异，并以透明方式处理。数据包采样在 NetFlow/IPFIX 中是可选的，但在 sFlow 中是强制性的；nProbe 利用导出数据中的采样信息自动放大 sFlow 流量，而采样的 NetFlow/IPFIX 则需要配置采样率，采样率不同的导出器需要各自独立的 nProbe 实例。<sup>[13](https://www.ntop.org/how-sampling-and-throughput-calculation-works-netflow-ipfix-vs-sflow-vs-packets/)</sup> ntopng 文档指出，若捕获采样率为例如 x100，除非应用缩放系数，否则观测到的流量体积会小 100 倍。<sup>[14](https://github.com/ntop/ntopng/blob/dev/doc/README.md)</sup>

## 性能

2014 年的设计论文报告称，ntopng 可以监控一条满负载的 10 Gbit 链路而不丢包，且内存占用有限，使用 PF_RING DNA 时数据包捕获不构成瓶颈。<sup>[3](https://luca.ntop.org/Lisa2014.pdf)</sup> 2019 年，丹麦技术大学的张斌赫（Binhe Zhang）、于浩（Hao Yu）和颜颖（Ying Yan）发表了一项同行评审评估，在 1 Gbps 和 10 Gbps 链路速度下测试了 ntopng，考察了它在不同数据包捕获技术下的丢包情况，并利用其历史数据提取进行流量建模。<sup>[15](https://orbit.dtu.dk/en/publications/ntopng-based-traffic-monitoring-and-modelling/)</sup> 实际吞吐取决于数据摄入模式：厂商的选型指南将独立 ntopng 的数据包处理定在 1 Gbit 以下（不使用 ZC 的 PF_RING），ntopng 加 nProbe 在 10 Gbit 以下，nProbe Cento 为 10/25/40/100 Gbit；在流采集场景中，限制因素是导出器设备数量和所采集接口的数量，而非原始带宽。<sup>[7](https://www.ntop.org/license-and-hardware-sizing-guide/)</sup>

## 版本与许可

ntopng 提供免费开源的社区版（源代码托管于 GitHub），以及若干商业版本：专业版，增加图形化报告、流量配置文件和 LDAP/OIDC 单点登录；企业版 M，增加 SNMP 支持与高级告警管理；企业版 L，增加快速 [ClickHouse](https://www.edgepedia.org/zh/clickhouse) 导出、历史数据探索和身份管理；以及企业版 XL/XXL/XXXL，提高主机、SNMP 设备和流采集器的数量上限。<sup>[5](https://www.ntop.org/guides/ntopng/versions_and_licensing.html)</sup> 许可证按服务器计、永久有效，含购买后一年的更新安装权；社区版无需许可证，ntopng 会根据是否存在许可证密钥自动选择版本。<sup>[5](https://www.ntop.org/guides/ntopng/versions_and_licensing.html)</sup> 社区版的限制主要源于缺少数据库支持，这制约了历史分析。<sup>[16](https://www.ntop.org/slides/NOG_0925.pdf)</sup>

## 使用场景

ntop 将 ntopng 定位于故障排查、安全调查和容量规划，部署于 ISP、企业 IT、云与数据中心、制造业和政府部门。<sup>[17](https://www.ntop.org/use-cases/)</sup> 有文档记载的企业场景包括：无需亲临现场，即可从中央仪表盘排查分支机构链路的饱和问题；通过 nDPI 对未经批准的应用进行分类，发现影子 IT；从历史日志审计远程办公人员与 VPN 活动；通过异常告警标记未识别设备。<sup>[18](https://www.ntop.org/enterprise-it/)</sup> 安全用途包括检测可疑流量、恶意软件通信和横向移动，以及在本地缓解 DDoS 攻击。<sup>[17](https://www.ntop.org/use-cases/)</sup>

## 在监控工具中的定位

与广泛的基础设施监控平台相比，ntopng 的侧重点更窄：2026 年的一项对比给 [Zabbix](https://www.edgepedia.org/zh/zabbix) 的基础设施监控打了更高的总分（9.4 对 8.4，满分 10 分），但认为 ntopng 在流量分析和数据包级监控方面更优，指出其数据包捕获、NetFlow、sFlow 和 IPFIX 采集、第 7 层检测以及 REST API 访问能力，同时指出其缺点在于高级功能分散在社区版、专业版和企业版各层级中。<sup>[1](https://www.itechguides.com/compare/zabbix-vs-ntopng/)</sup> 与 [Wireshark](https://www.edgepedia.org/zh/wireshark) 相比，差异在于架构：Wireshark 按需捕获并解析，产出一个文件；而 ntopng 持续运行，汇总来自多个来源（包括它自身从未捕获过的流导出数据）的数据，并通过浏览器将结果呈现给任何有访问权限的人。<sup>[19](https://hysenlabs.com/projects/ntop-ntopng)</sup>

## 近期发展

2026 年 9 月发布的 7.0 版引入了 nAnalyst，这是一项 AI 辅助流量分析功能，包含聊天、AI 策略、AI 仪表盘，以及一个支持多个 LLM 提供商（[Anthropic](https://www.edgepedia.org/zh/anthropic)、OpenAI、Google、Qwen 和本地模型）的智能体循环，另有一个 MCP 服务器；Wazuh XDR/SIEM 集成，用于告警采集与关联；带地理地图和热力图视图的网络到站点层级结构；支持 BGP/BMP 并提供 RPKI 验证；新的 ClickHouse 时序引擎并集成 Grafana；以及新的身份验证选项，包括 OpenID Connect 单点登录、多因素认证、通行密钥和 X-API-Key。<sup>[6](https://github.com/ntop/ntopng/releases)</sup>

## References

1. [Zabbix vs ntopng (2026), iTechGuides](https://www.itechguides.com/compare/zabbix-vs-ntopng/)
2. [ntop is back: ntopng 1.0 just released, ntop blog (June 30, 2013)](https://www.ntop.org/ntop-is-back-ntopng-1-0-just-released/)
3. [Deri, L. et al. ntopng paper, LISA 2014 (ntopng.pages)](https://luca.ntop.org/Lisa2014.pdf)
4. [nDPI product page, ntop](https://www.ntop.org/products/deep-packet-inspection/ndpi/)
5. [Available Versions & Licensing, ntopng 6.7 documentation](https://www.ntop.org/guides/ntopng/versions_and_licensing.html)
6. [Releases, ntop/ntopng, GitHub](https://github.com/ntop/ntopng/releases)
7. [ntop License Sizing Guide, ntop](https://www.ntop.org/license-and-hardware-sizing-guide/)
8. [LISA '14 full proceedings, USENIX](https://www.usenix.org/sites/default/files/lisa14_full_proceedings.pdf)
9. [Applications and Categories, ntopng 6.7 documentation](https://www.ntop.org/guides/ntopng/user_interface/shared/settings/applications_and_categories.html)
10. [Traffic Dashboard, ntopng 6.7 documentation](https://ntop.org/guides/ntopng/user_interface/network_interface/dashboard/dashboard.html)
11. [What nProbe Does, ntopng 6.7 documentation](https://ntop.org/guides/ntopng/flows/nprobe.html)
12. [Packets vs Flows: Which Option is the Best?, ntop](https://www.ntop.org/packets-vs-flows-which-option-is-the-best/)
13. [How Sampling and Throughput Calculation Works, ntop](https://www.ntop.org/how-sampling-and-throughput-calculation-works-netflow-ipfix-vs-sflow-vs-packets/)
14. [ntopng README, ntop/ntopng, GitHub](https://github.com/ntop/ntopng/blob/dev/doc/README.md)
15. [Zhang, Yu, Yan (2019). NTOPNG based Traffic Monitoring and Modelling, IAEAC 2019, IEEE](https://orbit.dtu.dk/en/publications/ntopng-based-traffic-monitoring-and-modelling/)
16. [NOG slides on ntopng community edition limitations, ntop](https://www.ntop.org/slides/NOG_0925.pdf)
17. [Use Cases, ntop](https://www.ntop.org/use-cases/)
18. [Enterprise IT, ntop](https://www.ntop.org/enterprise-it/)
19. [ntopng: Web-Based Network Traffic Monitoring, Hysen Labs](https://hysenlabs.com/projects/ntop-ntopng)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Network monitoring and analysis tools

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/ntopng

English original: https://www.edgepedia.org/ntopng
