38-13

Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter38 Configuring NetFlow
NetFlow Statistics Collection Configuration Example
NetFlow Statistics Collection Configuration Example

The following example shows how to modify the configuration to enable NetFlow switching. It also

shows how to export the flow statistics for further processing to UDP port 9991 on a workstation with

the IP address of 40.0.0.2. In this example, existing NetFlow Statistics are cleared, thereby ensuring that

the show ip cache flow command displays an accurate summary of the NetFlow switching statistics:

Switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip route-cache flow
Switch(config)# ip flow-export destination 40.0.0.2 9991
Switch(config)# ip flow-export version 5
Switch(config)# end
Switch# show ip flow export
Flow export is enabled
Exporting flows to 40.0.0.2 (9991)
Exporting using source IP address 40.0.0.1
Version 5 flow records
2 flows exported in 1 udp datagrams
0 flows failed due to lack of export packet
0 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped due to fragmentation failures
0 export packets were dropped due to encapsulation fixup failures
Switch#
Switch# show ip cache flow
IP Flow Switching Cache, 17826816 bytes
69 active, 262075 inactive, 15087 added
4293455 ager polls, 0 flow alloc failures
Active flows timeout in 30 minutes
Inactive flows timeout in 15 seconds
IP Sub Flow Cache, 1081480 bytes
0 active, 65536 inactive, 0 added, 0 added to flow
0 alloc failures, 0 force free
1 chunk, 1 chunk added
last clearing of statistics never
Protocol Total Flows Packets Bytes Packets Active(Sec) Idle(Sec)
-------- Flows /Sec /Flow /Pkt /Sec /Flow /Flow
TCP-Telnet 28 0.0 167 40 0.0 20.9 11.9
TCP-other 185 0.0 2 48 0.0 6.2 15.4
UDP-DNS 4 0.0 1 61 0.0 0.0 15.5
UDP-other 13466 0.0 3396586 46 91831.3 139.3 15.9
ICMP 97 0.0 2 95 0.0 2.3 15.4
IGMP 1 0.0 2 40 0.0 0.9 15.1
IP-other 1120 0.0 38890838 46 87453.0 1354.5 24.0
Total: 14901 0.0 5992629 46 179284.3 227.8 16.5
SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts
SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts
Gi6/2 30.20.1.18 Gi6/1 30.10.1.18 11 4001 4001 537K
Gi6/2 30.20.1.19 Gi6/1 30.10.1.19 11 4001 4001 537K
Gi6/2 30.20.1.16 Gi6/1 30.10.1.16 11 4001 4001 537K
Gi6/2 30.20.1.17 Gi6/1 30.10.1.17 11 4001 4001 537K
Gi6/2 30.20.1.20 Gi6/1 30.10.1.20 11 4001 4001 537K