Netflow example for the Cisco IOS

flow record NETFLOW_REC_IN
 match ipv4 tos
 match ipv4 protocol
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 match flow direction
 match interface input
 match ipv6 protocol
 collect counter bytes long
 collect counter packets long
!
!
flow record NETFLOW_REC_OUT
 match ipv4 tos
 match ipv4 protocol
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 match flow direction
 match interface output
 match ipv6 protocol
 collect counter bytes long
 collect counter packets long
!
!
flow exporter NETFLOW_EXP
 destination 10.10.8.61
 source Vlan8
 transport udp 2055
!
!
flow monitor NETFLOW_MON_IN
 exporter NETFLOW_EXP
 record NETFLOW_REC_IN
!
!
flow monitor NETFLOW_MON_OUT
 exporter NETFLOW_EXP
 record NETFLOW_REC_OUT
!
sampler NETFLOW_SAM
 mode random 1 out-of 2
!
interface GigabitEthernet1/0/24
 ip flow monitor NETFLOW_MON_IN sampler NETFLOW_SAM input
 ip flow monitor NETFLOW_MON_OUT sampler NETFLOW_SAM output