Tools commands

cache

Syntax

cache aggregate {src-dst-proto | src-dst-proto-port} family {ipv4 | ipv6}

cached all family {ipv4 | ipv6}

Context

tools>dump>cflowd

Platforms

7210 SAS-Mxp and 7210 SAS-Sx/S 1/10GE (standalone)

Description

This command displays the contents of the cflowd active cache. This information can be displayed either in raw form, where every flow entry is displayed, or in an aggregated form.

Parameters

all

Displays the raw active cache flow data with no aggregation.

aggregate

Displays the aggregated active cache flow data.

src-dst-proto — Aggregates the active flow cache based on the source and destination IP address and the IP protocol value.

src-dst-proto-port — Aggregates the active flow cache based on the source and destination IP address, IP protocol value, and the source and destination port numbers.

family

Specifies the IP address family flow for which data should be displayed.

ipv4 — Displays the IPv4 flow data.

ipv6 — Displays the IPv6 flow data.

Output

The following output is an example of cflowd cache information, Table: Output fields: tools dump cflowd cache describes the output fields.

Sample output
INFO: |18:59:55 +00:00.153| tools dump cflowd cache all family ipv4 
Current time: 08/26/2021 13:29:55
--------------------------------------------------------------------------------
Intf/Ingr  SrcIP             Intf/Egr  DstIP             Prot ToS   Flgs    Pkts
vRtr-ID   S-Port Msk AS     D-Port Msk AS     NextHop          Pkt-Size  Active
--------------------------------------------------------------------------------
1          150.1.1.2         2         150.2.1.2         17   0x00  0x00      25
1         7      /24 200    7      /24 300    150.2.1.2        46             0
--------------------------------------------------------------------------------
Table: Output fields: tools dump cflowd cache
Label Description

Proto/Protocol

Displays the IPv4 or IPv6 protocol type

Source Address/Src-IP

Displays the source IP address of the flow (IPv4 or IPv6)

Destination Address/Dst-IP

Displays the destination IP address of the flow (IPv4 or IPv6)

Intf/Ingr

Displays the ingress interface associated with the sampled flow (only displayed with the raw (all) output)

Intf/Egr

Displays the egress interface associated with the sampled flow (only displayed with the raw (all) output)

S-Port

Displays the source protocol port number

D-Port

Displays the destination protocol port number

Pkt-Cnt

Displays the total number of packets sampled for the associated flow

Byte-Cnt

Displays the total number of bytes of traffic sampled for the associated flow

Start-Time

Displays the system time when the first packet was sampled for the associated flow

Flags

Displays the IP flag value from the sampled IP flow header (only displayed with the raw (all) output)

ToS

Displays the ToS byte values from the sampled IP flow header (only displayed with the raw (all) output)

(Src) Mask

Displays the IP route mask for the route to the flow source IP address associated with the flow (only displayed with the raw (all) output)

(Dst) Mask

Displays the IP route mask for the route to the flow destination IP address associated with the flow (only displayed with the raw (all) output)

(Src) AS

Displays the ASN associated with the route to the flow source IP address associated with the flow (only displayed with the raw (all) output)

(Dst) AS

Displays the ASN associated with the route to the flow destination IP address associated with the flow (only displayed with the raw (all) output)

vRtr-ID

Displays the virtual router ID associated with the reported IP flow (only displayed with the raw (all) output)

packet-size

Syntax

packet-size protocol [clear]

Context

tools>dump>cflowd

Platforms

7210 SAS-Mxp and 7210 SAS-Sx/S 1/10GE (standalone)

Description

This command displays packet size distribution for sampled IP traffic. Values are displayed in decimal format (1.0 = 100%, .500 = 50%). Separate statistics are maintained and displayed for IPv4 and IPv6 traffic.

Parameters

protocol

Displays packet size information for the specified protocol.

Values

ipv4, ipv6, mcast-ipv4, mcast-ipv6

clear

Keyword to clear statistics.

Output

The following output is an example of cflowd packet size information.

Sample output
A:Dut-A# 
INFO: |18:57:06 +00:00.100| tools dump cflowd packet-size ipv4 
IPv4 unicast packet size distribution (30 total packets):
     Current Time: 08/26/2021 13:27:05
Last Cleared Time: 08/26/2021 13:26:32
1-32   64   96  128  160  192  224  256  288  320  352  384  416  448  480
.033 .067 .100 .033 .033 .033 .033 .033 .033 .033 .033 .033 .033 .033 .033 
 512  544  576 1024 1536 2048 2560 3072 3584 4096 4608 9000
.033 .033 .033 .033 .033 .033 .033 .033 .033 .033 .033 .033 

top-flows

Syntax

top-flows protocols [clear]

Context

tools>dump>cflowd

Platforms

7210 SAS-Mxp and 7210 SAS-Sx/S 1/10GE (standalone)

Description

This command displays the top 20 (highest traffic volume) flows for IPv4, IPv6, or MPLS traffic types collected since the cflowd top-flow table was last cleared or initialized.

Parameters

protocol

Displays top-flow information for the specified protocol.

Values

ipv4, ipv6, mpls, l2, mcast-ipv4, mcast-ipv6

clear

Keyword to clear statistics.

Output

The following output is an example of cflowd top-flow information, and Table: Output fields: tools dump cflowd top-flows describes the output fields.

Sample output
INFO: |18:57:05 +00:00.086| tools dump cflowd top-flows ipv4 
The top 20 IPv4 unicast flows seen by cflowd are:
     Current Time: 08/26/2021 13:27:05
Last Cleared Time: 08/26/2021 13:26:32
   ifIndexContext: global
Intf/Ingr  SrcIP             Intf/Egr  DstIP             Pro  ToS   Flgs    Pkts
 vRtr-ID   S-Port Msk AS     D-Port Msk AS     NextHop          Pkt-Size    Time
--------------------------------------------------------------------------------
1          150.1.1.2         2         150.2.1.2         6    0x00  0x00      26
 1         10     /24 200    20     /24 300    150.2.1.2        1079          18
1          1.20.1.2          0         1.20.1.3          6    0xc0  0x18       1
 1         179    /0  0      51201  /0  0      0.0.0.0          71             0
1          150.1.1.2         2         150.2.1.2         2    0x00  0x00       1
 1         0      /24 200    0      /24 300    150.2.1.2        28             0
--------------------------------------------------------------------------------
Table: Output fields: tools dump cflowd top-flows
Label Description

Ingress

Displays the ingress interface ID

Src IP

Displays the source IP address of the flow (IPv4 or IPv6)

Egress

Displays the egress interface ID

Dest IP

Displays the destination IP address of the flow (IPv4 or IPv6)

Pr

Displays the protocol type for flow

TOS

Displays the Type of Service/DSCP bits filed markings

Flgs

Displays the protocol flag markings

Pkts

Displays the total number of packets sampled for this flow (since stats were last cleared)

vRtr-ID

Displays the vRouter context the flow was sampled in

S-Port

Displays the source protocol port number

Msk

Displays the route prefix length for route to source IP address

AS

Displays the AS number for the source route (the AS is either originating or peer, depending on the cflowd configuration)

DstIP

Displays the destination protocol port number

Msk

Displays the route prefix length for route to destination IP address (Forwarding route)

AS

Displays the AS number for the destination route (the AS is either originating or peer, depending on the cflowd configuration)

Nexthop

Displays the next-hop address used to forward traffic associated with the flow

Avg pkt size

Displays the average packet size of a sampled traffic associated with this flow (total number of packets sampled / total number of packets sampled)

Active

Displays the number of seconds the flow has been active

top-protocols

Syntax

top-protocols protocols [clear]

Context

tools>dump>cflowd

Platforms

7210 SAS-Mxp and 7210 SAS-Sx/S 1/10GE (standalone)

Description

This command displays the summary information for the top 20 protocols traffic in the cflowd cache. All statistics are calculated based on data collected since the cflowd statistics were last cleared using the clear keyword.

If the clear optional keyword is configured, the top flows are displayed and then this cache is cleared.

Parameters

protocol

Displays top protocol information for the specified protocol.

Values

ipv4, ipv6, mcast-ipv4, mcast-ipv6

clear

Keyword to clear statistics.

Output

The following output is an example of cflowd top protocol traffic information, and Table: Output fields: tools dump cflowd top-protocols describes the output fields.

Sample output
A:Dut-A# 
INFO: |18:57:05 +00:00.095| tools dump cflowd top-protocols ipv4 
The top 20 IPv4 unicast protocols seen by cflowd are:
     Current Time: 08/26/2021 13:27:05
Last Cleared Time: 08/26/2021 13:26:32
Protocol (ID)      Total     Flows     Pkts   Bytes     Pkts    Secs   % Total 
-------------      Flows      /Sec    /Flow    /Pkt     /Sec   /Flow   Bandwidth
--------------------------------------------------------------------------------
TCP                    2         0       13    1041        0       9         99%
IGMP                   1         0        1      28        0       0          0%
--------------------------------------------------------------------------------
TOTALS                 3         0        9    1005        0       6        100%
Table: Output fields: tools dump cflowd top-protocols
Label Description

Protocol ID

Displays the IPv4 or IPv6 protocol type

Prints either the well-known protocol name or the decimal protocol number

Total Flows

Displays the total number of flows recorded since the cflowd statistics were last cleared with this protocol type

Flows/Sec

Displays the average number of flows detected for the associated protocol type

(Total flows / number of seconds since last clear)

Packets/Flow

Displays the average number of packets per flow

(Total number of packets / total flows)

Bytes/Pkts

Displays the average number of bytes per packet for the associated protocol type

(Total number of bytes for the associated protocol / total number of packets seen for the associated protocol)

Packets/Sec

Displays the average number of packets seen for the associated protocol type

(Number of packets / time since last clear)

Duration/Flow

Displays the average lifetime of a flow for the associated protocol type

(Number of seconds since last clear / total flows)

Bandwidth Total (%)

Displays the percentage of bandwidth consumed by the associated protocol type

(Total protocol bytes / total bytes of all flows)