8.9. Configuring IPFIX

Overview

Function Introduction

Traffic on a data network can be seen as consisting of flows passing through network elements. For administrative or other purposes, it is often interesting, useful, or even necessary to have access to information about these flows that pass through the network elements.

This requires uniformity in the method of representing the flow information and the means of communicating the flows from the network elements to the collection point. This is what IPFIX can do.

Before IPFIX was introduced, there is a Cisco private method NetFlow. IPFIX is similar to NetFlow and is based on NetFlow version 9.

Principle Description

N/A

Configuration

step 1 Enter the configure mode

Switch# configure terminal

step 2 Set the aging time(optional)

Set the aging time as 300 seconds. The aging time is 1800 seconds by default.

Switch(config)# ipfix global
Switch(Config-ipfix-global)# flow aging 300

step 3 Configuring recorder

Switch(config)# ipfix recorder recorder1
Switch(Config-ipfix-reocrder)# match mac source address
Switch(Config-ipfix-reocrder)# match ipv4 source address mask 32
Switch(Config-ipfix-reocrder)# match ipv4 destination address mask 32
Switch(Config-ipfix-reocrder)# match vxlan-vni
Switch(Config-ipfix-reocrder)# collect counter bytes
Switch(Config-ipfix-reocrder)# collect counter packets
Switch(Config-ipfix-reocrder)# exit

step 4 Configuring sampler

Switch(config)# ipfix sampler sampler1
Switch(Config-ipfix-sampler)# 1 out-of 100
Switch(Config-ipfix-sampler)# exit

step 5 Configuring exporter

Switch(config)# ipfix exporter exporter1
Switch(Config-ipfix-exporter)# destination 10.10.10.1
Switch(Config-ipfix-exporter)# source interface eth-0-2
Switch(Config-ipfix-exporter)# flow data timeout 200
Switch(Config-ipfix-exporter)# event flow end timeout
Switch(Config-ipfix-exporter)# exit

step 6 Configuring monitor

Switch(config)# ipfix monitor monitor1
Switch(Config-ipfix-monitor)# recorder recorder1
Switch(Config-ipfix-monitor)# exporter exporter1
Switch(Config-ipfix-monitor)# exit

step 7 Enter the interface configure mode and apply ipfix

Switch(config)# interface eth-0-1
Switch(config-if)# ipfix monitor input monitor1 sampler sampler1
Switch(config-if)# exit

step 8 Exit the configure mode

Switch(config)# end

step 9 Validation

Use the following commands to validate the configuration:

Switch# show ipfix global
IPFIX global informaition:
Current flow cache number : 0(ingress: 0, egress: 0)
Flow cache aging interval : 300 seconds
Flow cache export interval : 5 seconds
Flow cache memory usage threshold : 90%
Flow cache sampler mode : all flow
Flow cache packet wraparound threshold : 67108863
Flow cache byte wraparound threshold : 4294967295
Flow cache dropped packet wraparound threshold : 1023
Flow cache jitter threshold : 65535
Flow cache latency threshold : 16777215
Switch# show ipfix recorder recorder1
IPFIX recorder information:
Name : recorder1
Description :
Match info :
match Source Mac Address
match IPv4 Source Address
match IPv4 Destination Address
match Vxlanvni
Collect info :
collect Flow Byte Number
collect Flow Packet Number
Switch# show ipfix exporter exporter1
IPFIX exporter information:
Name : exporter1
Description :
Exporter Interface : eth-0-2
Domain ID : 0
Collector Name : 10.10.10.1
IPFIX message protocol : UDP
IPFIX message destination Port : 2055
IPFIX message TTL value : 255
IPFIX message DSCP value : 63
IPFIX data interval : 200
IPFIX template interval : 1800
IPFIX exporter events :
Flow aging event
Switch# show ipfix sampler sampler1
IPFIX sampler information:
Name : sampler1
Description :
Rate : 100
Switch# show ipfix monitor monitor1
IPFIX monitor information:
Name : monitor1
Description :
Recorder : recorder1
exporter : exporter1
flow mirror packet : 0
flow mirror destination : NA

Application cases

N/A