This chapter provides information about filter policies and management.
Topics in this chapter include:
Cflowd is a tool used to sample IPv4, IPv6, MPLS, and Ethernet traffic data flows through a router. Cflowd enables traffic sampling and analysis by ISPs and network engineers to support capacity planning, trends analysis, and characterization of workloads in a network service provider environment.
Cflowd is also useful for traffic engineering, network planning and analysis, network monitoring, developing user profiles, data warehousing and mining, as well as security-related investigations. Collected information can be viewed in port, AS, or network matrices and pure flow structures. The amount of data stored depends on the Cflowd configurations.
Cflowd maintains a list of data flows through a router. A flow is a unidirectional traffic stream defined by several characteristics such as source and destination IP addresses, source and destination ports, inbound interface, IP protocol, and type of service (ToS) bits.
When a router receives a packet that is sampled by Cflowd, and for which it currently does not have a flow entry, a flow structure is initialized to maintain state information regarding that flow, such as the number of bytes exchanged, IP addresses, port numbers, and AS numbers. Each subsequent packet that is sampled and that matches the parameters of the flow contributes to the byte and packet count of the flow until the flow is terminated and exported to a collector for storage.
The 7705 SAR supports Cflowd version 9 and 10 on Ethernet ports on all cards except the 8-port Ethernet Adapter card. On the 2-port 10GigE (Ethernet) Adapter card and 2-port 10GigE (Ethernet) module, only the virtual port supports sampling. If Cflowd is configured on an IP interface or Layer 2 SAP that is associated with a LAG group with one or more member ports on an 8-port Ethernet Adapter card, no packets are sampled from those ports.
Figure 15 shows the basic operation of the Cflowd feature. This flow example is only used to describe the basic steps that are performed. It is not intended to specify how Cflowd is implemented.
The basic Cflowd steps are as follows.
The sample rate and cache size are configurable values. The sample rate default is 1000 with a range of one to 1 000 000. The cache size default is 65 536 flow entries with a range of 1000 to 250 000.
A flow terminates when one of the following conditions is met:
When a flow is terminated, the collected data is formatted and exported from the cache to an external collector that maintains an accumulation of historical data flows that network operators can use to analyze traffic patterns. Flow data is exported in one of the following formats:
To avoid stressing router processors with excessive sampling, Cflowd is not required to examine every packet received by the router. The sampling rate can be configured to be every packet or up to every 1 000 000 packets, with a default rate of 1000 packets. A larger rate value provides more flexibility to avoid congestion on smaller platforms. Sampling at too high a rate over an extended period of time can burden router processing resources. Sampling is supported in ingress and egress directions for Layer 3 services. For Layer 2 services, only ingress sampling is supported.
The following data is maintained for each individual flow in the raw flow cache:
Within the raw flow cache, the following characteristics are used to identify an individual flow:
A collector defines how data flows should be exported from the flow cache. A maximum of five collectors can be configured and at least one must be configured for Cflowd to be active. Each collector is identified by a unique IP address and UDP port value. Each collector can only export traffic in one version type: version 9 or version 10.
The parameters within a collector configuration can be modified.
Flow data is sent to the designated collector using a predefined template. The template used is based on the type of flow for which the data was collected (IPv4, IPv6, MPLS, or Ethernet Layer 2) and the configuration of the template-set parameter. Table 109 lists these values and the corresponding template used to export the flow data.
Traffic Flow | Template Set | ||
basic | mpls-ip | l2-ip | |
IPv4 | Basic IPv4 | MPLS-IPv4 | — |
IPv6 | Basic IPv6 | MPLS-IPv6 | — |
MPLS | Basic MPLS | MPLS-IP | — |
Ethernet 1 | — | — | L2-IP |
Note:
Each flow exported to a collector configured for either the version 9 or version 10 format is sent using one of the templates listed in Table 109.
Table 110 to Table 114 list the fields in each template listed in Table 109.
Field Name | Field ID |
IPv4 Src Addr | 8 |
IPv4 Dest Addr | 12 |
IPv4 Nexthop | 15 |
BGP Nexthop | 18 |
Ingress Interface | 10 |
Egress Interface | 14 |
Packet Count | 2 |
Byte Count | 1 |
Start Time | 22 |
End Time | 21 |
Flow Start Milliseconds 1 | 152 |
Flow End Milliseconds 1 | 153 |
Src Port | 7 |
Dest Port | 11 |
Forwarding Status | 89 |
TCP control Bits (Flags) | 6 |
IPv4 Protocol | 4 |
IPv4 TOS | 5 |
IP version | 60 |
ICMP Type & Code | 32 |
Direction | 61 |
BGP Source ASN | 16 |
BGP Dest ASN | 17 |
Source IPv4 Prefix Length | 9 |
Dest IPv4 Prefix Length | 13 |
Minimum IP Total Length | 25 |
Maximum IP Total Length | 26 |
Minimum TTL | 52 |
Maximum TTL | 53 |
Multicast Replication Factor | 99 |
IsMulticast 1 | 206 |
Ingress VRFID 1 | 234 |
Egress VRFID 1 | 235 |
Note:
Field Name | Field ID |
IPv6 Src Addr | 27 |
IPv6 Dest Addr | 18 |
IPv6 Nexthop | 62 |
IPv6 BGP Nexthop | 63 |
IPv4 Nexthop | 15 |
IPv4 BGP Nexthop | 18 |
Ingress Interface | 10 |
Egress Interface | 14 |
Packet Count | 2 |
Byte Count | 1 |
Start Time | 22 |
End Time | 21 |
Flow Start Milliseconds 1 | 152 |
Flow End Milliseconds 1 | 153 |
Src Port | 7 |
Dest Port | 11 |
Forwarding Status | 89 |
TCP control Bits (Flags) | 6 |
Protocol | 4 |
IPv6 Extension Hdr | 64 |
IPv6 Next Header 1 | 193 |
IPv6 Flow Label | 31 |
TOS | 5 |
IP version | 60 |
IPv6 ICMP Type & Code 1 | 139 |
Direction | 61 |
BGP Source ASN | 16 |
BGP Dest ASN | 17 |
IPv6 Src Mask | 29 |
IPv6 Dest Mask | 30 |
Minimum IP Total Length | 25 |
Maximum IP Total Length | 26 |
Minimum TTL | 52 |
Maximum TTL | 53 |
Multicast Replication Factor | 99 |
IsMulticast 1 | 206 |
Ingress VRFID 1 | 234 |
Egress VRFID 1 | 235 |
Note:
Field Name | Field ID |
IPv4 Src Addr | 8 |
IPv4 Dest Addr | 12 |
IPv4 Nexthop | 15 |
BGP Nexthop | 18 |
Ingress Interface | 10 |
Egress Interface | 14 |
Packet Count | 2 |
Byte Count | 1 |
Start Time | 22 |
End Time | 21 |
Flow Start Milliseconds 1 | 152 |
Flow End Milliseconds 1 | 153 |
Src Port | 7 |
Dest Port | 11 |
Forwarding Status | 89 |
TCP control Bits (Flags) | 6 |
IPv4 Protocol | 4 |
IPv4 TOS | 5 |
IP version | 60 |
ICMP Type & Code | 32 |
Direction | 61 |
BGP Source ASN | 16 |
BGP Dest ASN | 17 |
Source IPv4 Prefix Length | 9 |
Dest IPv4 Prefix Length | 13 |
MPLS Label 1 | 70 |
MPLS Label 2 | 71 |
MPLS Label 3 | 72 |
MPLS Label 4 | 73 |
MPLS Label 5 | 74 |
MPLS Label 6 | 75 |
Minimum IP Total Length | 25 |
Maximum IP Total Length | 26 |
Minimum TTL | 52 |
Maximum TTL | 53 |
Multicast Replication Factor | 99 |
IsMulticast 1 | 206 |
Ingress VRFID 1 | 234 |
Egress VRFID 1 | 235 |
Note:
Field Name | Field ID |
IPv6 Src Addr | 27 |
IPv6 Dest Addr | 28 |
IPv6 Nexthop | 62 |
IPv6 BGP Nexthop | 63 |
IPv4 Nexthop | 15 |
IPv4 BGP Nexthop | 18 |
Ingress Interface | 10 |
Egress Interface | 14 |
Packet Count | 2 |
Byte Count | 1 |
Start Time | 22 |
End Time | 21 |
Flow Start Milliseconds 1 | 152 |
Flow End Milliseconds 1 | 153 |
Src Port | 7 |
Dest Port | 11 |
Forwarding Status | 89 |
TCP control Bits (Flags) | 6 |
Protocol | 4 |
IPv6 Extension Hdr | 64 |
IPv6 Next Header | 193 |
IPv6 Flow Label | 31 |
TOS | 5 |
IP version | 60 |
IPv4 ICMP Type & Code 2 | 32 |
IPv6 ICMP Type & Code 1 | 139 |
Direction | 61 |
BGP Source ASN | 16 |
BGP Dest ASN | 17 |
IPv6 Src Mask | 29 |
IPv6 Dest Mask | 30 |
MPLS Label 1 | 70 |
MPLS Label 2 | 71 |
MPLS Label 3 | 72 |
MPLS Label 4 | 73 |
MPLS Label 5 | 74 |
MPLS Label 6 | 75 |
Minimum IP Total Length | 25 |
Maximum IP Total Length | 26 |
Minimum TTL | 52 |
Maximum TTL | 53 |
Multicast Replication Factor | 99 |
IsMulticast 1 | 206 |
Ingress VRFID 1 | 234 |
Egress VRFID 1 | 235 |
Notes:
Field Name 1 | Field ID |
MAC Src Addr | 56 |
MAC Dest Addr | 80 |
Ingress Physical Interface | 252 |
Egress Physical Interface 2 | 253 |
Dot1q VLAN ID | 243 |
Dot1q Customer VLAN ID | 245 |
Post Dot1q VLAN ID | 254 |
Post Dot1q Customer VLAN Id 3 | 255 |
IPv4 Src Addr | 8 |
IPv4 Dest Addr | 12 |
IPv6 Src Addr | 27 |
IPv6 Dest Addr | 28 |
Packet Count | 2 |
Byte Count | 1 |
Flow Start Milliseconds | 152 |
Flow End Milliseconds | 153 |
Src Port | 7 |
Dest Port | 11 |
TCP control Bits (Flags) | 6 |
Protocol | 4 |
IPv6 Option Header | 64 |
IPv6 Next Header | 196 |
IPv6 Flow Label | 31 |
TOS | 5 |
IP Version | 60 |
ICMP Type Code | 32 |
Notes:
The following components must be configured for Cflowd to be operational: