Flexible netflow config with BGP AS information:
flow record IPV4-FLOW-RECORD
match ipv4 protocol
match ipv4 source address
match ipv4 destination address
match transport source-port
match transport destination-port
match interface input
collect routing source as
collect routing destination as
collect routing source as peer
collect routing destination as peer
collect routing next-hop address ipv4 bgp
collect interface output
collect flow direction
collect counter bytes long
collect counter packets long
!
!
flow exporter IPV4-FLOW-EXPORT
destination X.X.X.X
source <interface>
transport udp 2055
!
!
flow monitor IPV4-FLOW-MONITOR
description Used for Monitoring IPv4 Traffic w/BGP AS
exporter IPV4-FLOW-MONITOR
record IPV4-FLOW-RECORD
!
Then apply to the interface:
Example:
interface Gig0/0
ip flow monitor IPV4-FLOW-MONITOR input