/tool/sniffer
sniffer
Settings of the packet sniffer: which packets it captures (the filter- settings), where it keeps them (memory and a file) and whether it streams them to a TZSP receiver. start and quick without filter arguments use...
tool/sniffer
Type: Settings Directory
数据包嗅探器的设置:捕获哪些数据包(filter-* 设置)、将其保存在何处(内存和文件),以及是否将其流式发送到 TZSP 接收者。不带过滤器参数的 start 和 quick 使用已保存的过滤器;带过滤器参数时,它们仅使用该次运行给出的过滤器,已保存的过滤器不适用也不会改变。参见 数据包嗅探器。
| 参数 | 类型 | 描述 |
|---|---|---|
only-headers | bool | 仅存储和保存数据包头,不保存载荷。数据包列表仍显示原始数据包大小。默认值:no。 |
memory-limit | num | 捕获数据包的内存,单位为 KiB(10..4294967295)。无法容纳的部分按 memory-scroll 指定的方式处理。默认值:100KiB。 |
memory-scroll | bool | 达到 memory-limit 时的行为:yes 用新数据包替换最旧的数据包,因此内存中保留最新数据包;no 保留最先的数据包,不再存储更多。默认值:yes。 |
file-name | file | 嗅探器运行时捕获数据包写入的文件,pcapng 格式。每次启动都会覆盖该文件。其他磁盘上的路径(例如 usb1/capture.pcap)会将文件写入那里。为空(默认)时仅将数据包保留在内存中;稍后使用 save 将其写入文件。 |
file-limit | num | file-name 的大小限制,单位为 KiB(10..4294967295)。文件达到限制时,嗅探器停止写入,但继续运行。默认值:1000KiB。 |
streaming-enabled | bool | 通过 UDP 将每个捕获的数据包作为 TZSP(版本 1、以太网封装、整个帧)发送到 streaming-server,例如发送到 Wireshark。默认值:no。 |
streaming-server | composite { ip: ipAddr , port: [ enum ()] } | TZSP 流的接收者:一个地址,或 address:port。没有端口时使用 37008。默认值:0.0.0.0:37008。 |
max-packet-size | num | 最大数据包大小,单位为字节(2048..65536)。默认值:2048。 |
filter-stream | bool | 使用 yes 时,嗅探器不会捕获其流式发送到 streaming-server 的数据包,也不会捕获往返 streaming-server 地址的 ICMP 数据包,即使在流式传输关闭时也是如此。当朝向流接收者的接口被嗅探时设置为 yes:使用 no 时,流数据包会被捕获并再次流式发送,形成循环。默认值:no。 |
filter-interface | object { interface: iface_enum } | 要嗅探的接口。为空(默认)时嗅探所有接口;通过网桥往返路由器的数据包随后会在网桥上显示一次,并在网桥端口上显示一次。 |
filter-mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 最多 16 个 MAC 地址,或带掩码的 MAC 地址;当帧的源或目标 MAC 地址匹配时即匹配。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-src-mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 最多 16 个源 MAC 地址,或带掩码的 MAC 地址。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-dst-mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 最多 16 个目标 MAC 地址,或带掩码的 MAC 地址。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-mac-protocol | object { mac-protocol-element: super { ! , protocol: alt { mac-protocol: enum () , protocol-number: num [ .. 65535] } } } | 最多 16 个 MAC(L2)协议,按 EtherType 编号(0..65535)或名称:802.2(0x0004)、arp(0x0806)、capsman(0x88BB)、dot1x(0x888E)、homeplug-av(0x88E1)、ip(0x0800)、ipv6(0x86DD)、ipx(0x8137)、lacp(0x8809)、lldp(0x88CC)、loop-protect(0x9003)、macsec(0x88E5)、mpls-multicast(0x8848)、mpls-unicast(0x8847)、mvrp(0x88F5)、packing-compr、packing-simple、pppoe(0x8864)、pppoe-discovery(0x8863)、rarp(0x8035)、romon(0x88BF)、service-vlan(0x88A8)、vlan(0x8100)。带 VLAN 标签的帧匹配标签内的协议,vlan 本身不匹配;请使用 filter-vlan 选择 VLAN。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 最多 16 个 IPv4 地址或前缀;当数据包的源或目标地址匹配时即匹配。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-src-ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 最多 16 个源 IPv4 地址或前缀。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-dst-ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 最多 16 个目标 IPv4 地址或前缀。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 最多 16 个 IPv6 前缀;当数据包的源或目标地址匹配时即匹配。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-src-ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 最多 16 个源 IPv6 前缀。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-dst-ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 最多 16 个目标 IPv6 前缀。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-ip-protocol | object { ip-protocol-element: super { ! , ip-protocol: enum () } } | 最多 16 个 IP 或 IPv6 协议,按编号或名称:dccp、ddp、egp、encap、etherip、ggp、gre、hmp、icmp、icmpv6、idpr-cmtp、igmp、ipencap、ipip、ipsec-ah、ipsec-esp、ipv6-encap、ipv6-frag、ipv6-nonxt、ipv6-opts、ipv6-route、iso-tp4、l2tp、ospf、pim、pup、rdp、rspf、rsvp、sctp、st、tcp、udp、udp-lite、vmtp、vrrp、xns-idp、xtp。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-port | object { port-element: super { ! , port: enum () } } | 最多 16 个端口,按编号或名称,例如 ssh、dns、bootps(67)或 bootpc(68);当数据包的源或目标端口匹配时即匹配。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-src-port | object { port-element: super { ! , port: enum () } } | 最多 16 个源端口,按编号或名称。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-dst-port | object { port-element: super { ! , port: enum () } } | 最多 16 个目标端口,按编号或名称。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-vlan | object { cpu-element: super { ! , vlan: num [ .. 4095] } } | 最多 16 个 VLAN ID(0..4095)。它匹配承载这些 VLAN 的接口(例如 trunk 端口)上的带标签帧;IP 和 MAC 过滤器匹配标签内的数据包。在 VLAN 接口本身上,数据包不带标签,因此不匹配。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-cpu | object { cpu-element: super { ! , cpu: num } } | 处理该数据包的 CPU 核心。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-size | object { size-element: super { ! , size-range: range [0 .. 65535] } } | 数据包大小或大小范围,单位为字节(0..65535),例如 1000-1500。在条目前加 ! 可将其取反。为空(默认)表示无过滤。 |
filter-direction | enum (any | tx | rx) { any:0, tx:1, rx:2 } | 要捕获的方向。 - any(默认)- 接收和发送的数据包。 - rx - 接收的数据包。它们在防火墙之前被捕获,因此被防火墙规则丢弃的数据包仍会被捕获。 - tx - 发送的数据包,在防火墙之后捕获。 |
filter-operator-between-entries | enum (or | and) { or:0, and:1 } | 一个过滤器的条目如何组合。不同过滤器始终组合:数据包必须匹配每个已设置的过滤器。 - or(默认)- 数据包匹配该过滤器中的任一条目时即匹配该过滤器。 - and - 数据包仅当匹配该过滤器的所有条目时才匹配,例如 filter-ip-address=192.168.88.10/32,192.168.88.1/32 中的两个地址。 |
quick-rows | num | 未提供 rows 参数时 quick 显示的数据包数量。默认值:20。 |
quick-show-frame | bool | 未提供 show-frame 参数时 quick 是否显示帧内容。默认值:no。 |
| 只读参数 | 类型 | 描述 |
|---|---|---|
running | bool | 嗅探器运行时为 yes。 |