/tool/sniffer/start

start

Starts the sniffer with the settings in /tool/sniffer. The filter arguments are the filter- settings without the filter- prefix (interface, ip-address, port, ip-protocol), and vlan-id for filter-vlan. With filter...


tool/sniffer/start

Type: Command

使用 /tool/sniffer 中的设置启动嗅探器。过滤器参数是去掉 filter- 前缀的 filter-* 设置(interface、ip-address、port、ip-protocol),以及用于 filter-vlan 的 vlan-id。使用过滤器参数时,本次运行仅使用给定的过滤器;已保存的过滤器不适用也不会更改。嗅探器运行期间,路由器会关闭 IPv4 fast path,以及随之关闭的 FastTrack。捕获的数据包在 stop 后保留在内存中,供 packet、protocol、host 和 connection 使用,保留 10 分钟或直到下一次启动。参见 数据包嗅探器。

参数类型描述
interfaceobject { interface: iface_enum }本次运行要嗅探的接口。
mac-addressobject { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } }最多 16 个 MAC 地址,或带掩码的 MAC 地址;当帧的源或目标 MAC 地址匹配时即匹配。在条目前面加 ! 表示取反。
src-mac-addressobject { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } }最多 16 个源 MAC 地址,或带掩码的 MAC 地址。在条目前面加 ! 表示取反。
dst-mac-addressobject { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } }最多 16 个目标 MAC 地址,或带掩码的 MAC 地址。在条目前面加 ! 表示取反。
mac-protocolobject { mac-protocol-element: super { ! , protocol: alt { mac-protocol: enum () , protocol-number: num [ .. 65535] } } }最多 16 个 MAC(二层)协议,按名称或编号(0..65535),例如 ip、arp、ipv6 或 802.2。在条目前面加 ! 表示取反。
ip-protocolobject { ip-protocol-element: super { ! , ip-protocol: enum () } }最多 16 个 IP 或 IPv6 协议,按名称或编号,例如 icmp、tcp 或 udp。在条目前面加 ! 表示取反。
ip-addressobject { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } }最多 16 个 IPv4 地址或前缀;当数据包的源或目标地址匹配时即匹配。在条目前面加 ! 表示取反。
src-ip-addressobject { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } }最多 16 个源 IPv4 地址或前缀。在条目前面加 ! 表示取反。
dst-ip-addressobject { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } }最多 16 个目标 IPv4 地址或前缀。在条目前面加 ! 表示取反。
ipv6-addressobject { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } }最多 16 个 IPv6 前缀;当数据包的源或目标地址匹配时即匹配。在条目前面加 ! 表示取反。
src-ipv6-addressobject { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } }最多 16 个源 IPv6 前缀。在条目前面加 ! 表示取反。
dst-ipv6-addressobject { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } }最多 16 个目标 IPv6 前缀。在条目前面加 ! 表示取反。
portobject { port-element: super { ! , port: enum () } }最多 16 个端口,按编号或名称(例如 ssh 或 telnet);当数据包的源或目标端口匹配时即匹配。在条目前面加 ! 表示取反。
src-portobject { port-element: super { ! , port: enum () } }最多 16 个源端口,按编号或名称。在条目前面加 ! 表示取反。
dst-portobject { port-element: super { ! , port: enum () } }最多 16 个目标端口,按编号或名称。在条目前面加 ! 表示取反。
vlan-idobject { vlan-element: super { ! , vlan: num [ .. 4095] } }最多 16 个 VLAN ID(0..4095)。在条目前面加 ! 表示取反。
directionenum (any | tx | rx) { any:0, tx:1, rx:2 }本次运行要捕获的方向。 - any(默认)- 接收和发送的数据包。 - rx - 接收的数据包。它们在防火墙之前被捕获,因此被防火墙规则丢弃的数据包仍会被捕获。 - tx - 发送的数据包,在防火墙之后捕获。
operator-between-entriesenum (or | and) { or:0, and:1 }本次运行中一个过滤器的各条目如何组合。 - or(默认)- 当数据包匹配过滤器中的任一条目时,即匹配该过滤器。 - and - 仅当数据包匹配过滤器中的所有条目时才匹配该过滤器。
cpuobject { cpu-element: super { ! , cpu: num } }处理数据包的 CPU 核心。在条目前面加 ! 表示取反。
sizeobject { size-element: super { ! , size-range: range [0 .. 65535] } }数据包大小或大小范围(字节,0..65535),例如 1000-1500。在条目前面加 ! 表示取反。