Define Flow Records In and Out
flow record Netflow-In
match flow direction
match interface input
match ipv4 destination address
match ipv4 protocol
match ipv4 source address
match ipv4 tos
match transport destination-port
match transport source-port
collect counter bytes long
collect counter packets long
collect interface output
!
!
flow record Netflow-Out
match flow direction
match interface output
match ipv4 destination address
match ipv4 protocol
match ipv4 source address
match ipv4 tos
match transport destination-port
match transport source-port
collect counter bytes long
collect counter packets long
collect interface input
!
match flow direction
match interface input
match ipv4 destination address
match ipv4 protocol
match ipv4 source address
match ipv4 tos
match transport destination-port
match transport source-port
collect counter bytes long
collect counter packets long
collect interface output
!
!
flow record Netflow-Out
match flow direction
match interface output
match ipv4 destination address
match ipv4 protocol
match ipv4 source address
match ipv4 tos
match transport destination-port
match transport source-port
collect counter bytes long
collect counter packets long
collect interface input
!
Define Flow Exporter
!
flow exporter Netflow-to-TotalView
destination <TotalView Server IP>
source <VLAN or Interface that TotalView is talking to the device on>
transport udp 2055
!
flow exporter Netflow-to-TotalView
destination <TotalView Server IP>
source <VLAN or Interface that TotalView is talking to the device on>
transport udp 2055
!
Define Flow Monitor In and Out (Referencing the Flow Exporter)
!
flow monitor Netflow-Monitor-In
exporter Netflow-to-TotalView
cache timeout inactive 10
cache timeout active 60
record Netflow-In
!
!
flow monitor Netflow-Monitor-Out
exporter Netflow-to-TotalView
cache timeout inactive 10
cache timeout active 60
record Netflow-Out
flow monitor Netflow-Monitor-In
exporter Netflow-to-TotalView
cache timeout inactive 10
cache timeout active 60
record Netflow-In
!
!
flow monitor Netflow-Monitor-Out
exporter Netflow-to-TotalView
cache timeout inactive 10
cache timeout active 60
record Netflow-Out
Configure NetFlow Monitor on the Interface (In and Out)
interface <Physical Port or Port Channel to Collect NetFlow Data>
ip flow monitor Netflow-Monitor-In input
ip flow monitor Netflow-Monitor-Out output
ip flow monitor Netflow-Monitor-In input
ip flow monitor Netflow-Monitor-Out output