The NetFlow infrastructure is based on the configuration and use of the following maps:
- Exporter Map
- Sampler Map
- Flow Monitor Map
Exporter Map. To configure the Exporter map, you need to define the destination (flow collector), the source interface, the port used for exporting, the version of NetFlow, and the timeout rates:
router(config)# flow exporter-map EM router(config-fem)# destination 10.1.1.5 router(config-fem)# source gi0/0 router(config-fem)# transport udp 2055 router(config-fem)# version v9 router(config-fem)# template data timeout 60 router(config-fem)# options interface-table timeout 60 router(config-fem)# exitSampler Map (defines the sample rate):
router(config)# sampler-map SM router(config-sm)# random 1 out-of 1000 router(config)# exitFlow Monitor Map. The Flow Monitor map defines the cache timeout values and associates the exporter map with this map:
router(config)# flow monitor-map FMM router(config-fmm)# record ipv4 router(config-fmm)# exporter EM router(config-fmm)# cache timeout active 60 router(config-fmm)# cache timeout inactive 60 router(config-fmm)# exitApply the flow monitor and sampler maps to the relevant interfaces:
router(config)# interface Gi0/0 router(config-if)# flow ipv4 monitor FMM sampler SM egress router(config-if)# exit

