Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

示例:M、MX 和 T Series 路由器上的采样和丢弃计费配置

丢弃核算允许您对流量进行采样,将其发送到流服务器进行分析,然后丢弃所有数据包,而不将其转发到其预期目的地。丢弃计费是通过层次[edit firewall family inet filter filter-name term term-name then]结构级别防火墙过滤器中的discard accounting group-name 语句启用的。然后,在层次结构级别将过滤器应用于带有filter语句[edit interfaces interface-name unit unit-number family inet]的接口,并在层次结构级别使用output语句[edit forwarding-options accounting group-name]进行处理。

图 1:主动流监控 — 采样和丢弃记帐拓扑图 Network diagram showing traffic flow through an Active Monitoring Router. TCP traffic, blue dashed lines, flows through term t2. Other traffic, orange dashed lines, flows through term default. Router 1 to the Active Monitoring Router uses IP 10.11.1.x, while the Active Monitoring Router to cflowd server uses IP 10.60.2.x.

图 1 中,来自路由器 1 的流量到达监控路由器的千兆以太网 ge-2/3/0 接口。通向流服务器的导出接口为 fe-1/0/0 ,没有出口接口。

在此示例中,TCP 流量将发送到一个计费组,而所有其他流量将转移到第二个组。对这两种类型的流量进行采样和计数后,将由采样和计费过程处理。这些进程创建流记录,并将这些记录发送到版本 8 流服务器进行分析。由于将多种类型的流量发送到同一服务器,我们建议您在计费和抽样层次结构中手动配置 engine-idengine-typesource-address statement。这样,当流量类型到达流服务器时,您可以区分它们。

验证您的工作

要验证您的配置是否正确,请在为主动流监控配置的监控站上使用以下命令:

  • show services accounting aggregation (仅适用于版本 8 流)

  • show services accounting errors

  • show services accounting (flow | flow-detail)

  • show services accounting memory

  • show services accounting packet-size-distribution

  • show services accounting status

  • show services accounting usage

下面显示了与配置示例一起使用的命令的 show 输出: