Step 1 |
enable
|
Enables
privileged EXEC mode.
|
Step 2 |
configure
terminal
Device# configure terminal
|
Enters global
configuration mode.
|
Step 3 |
flow
record
record-name
Device(config)# flow record ip-acct
|
Creates or
modifies an existing Flexible NetFlow flow record, and enters Flexible NetFlow
flow record configuration mode.
|
Step 4 |
match
ipv4
source
address
Device(config-flow-record)# match ipv4 source address
|
Configures the
IPv4 source address as a key field for a flow record.
|
Step 5 |
match
ipv4
destination
address
Device(config-flow-record)# match ipv4 destination address
|
Configures the
IPv4 destination address as a key field for a flow record.
|
Step 6 |
collect
counter
packets long
Device(config-flow-record)# collect counter packets long
|
Configures a
64-bit counter that is incremented for each packet seen in the flow.
|
Step 7 |
exit
Device(config-flow-record)# exit
|
Exits
Flexible NetFlow flow record configuration mode and returns to global
configuration mode.
|
Step 8 |
flow
record
record-name
Device(config)# flow record prec-acct
|
Creates or
modifies an existing Flexible NetFlow flow record, and enters Flexible NetFlow
flow record configuration mode.
|
Step 9 |
match
ipv4 precedence
Device(config-flow-record) match ipv4 precedence
|
Configures
the IPv4 precedence (part of type of service) as a key field.
|
Step 10 |
collect
counter
packets long
Device(config-flow-record)# collect counter packets long
|
Configures a
64-bit counter that is incremented for each packet seen in the flow.
|
Step 11 |
exit
Device(config-flow-record)# exit
|
Exits
Flexible NetFlow flow record configuration mode and returns to global
configuration mode.
|
Step 12 |
flow
monitor
flow-monitor-name
Device(config)# flow monitor ip-acct
|
Creates or
modifies an existing Flexible NetFlow flow monitor and enters Flexible NetFlow
flow monitor configuration mode.
|
Step 13 |
record
record-name
Device(config-flow-monitor)# record ip-acct
|
Configures a
user-defined flow record that was previously configured for a Flexible NetFlow
flow monitor.
|
Step 14 |
cache
timeout
active
seconds
Device(config-flow-monitor)# cache timeout active 604800
|
Specifies
the active flow timeout, in seconds for the flow monitor.
Note
|
Cisco IOS
XE Releases do not support permanent cache, but allow cache timeout up to 7
days by configuring this command.
|
|
Step 15 |
cache
entries
number
Device(config-flow-monitor)# cache entries 200000
|
Specifies
the maximum number of entries in the flow monitor cache.
|
Step 16 |
exit
Device(config-flow-monitor)# exit
|
Exits
Flexible NetFlow flow monitor configuration mode and returns to global
configuration mode.
|
Step 17 |
flow
monitor
flow-monitor-name
Device(config)# flow monitor prec-acct
|
Create or
modifies an existing Flexible NetFlow flow monitor, and enters Flexible NetFlow
flow monitor configuration mode.
|
Step 18 |
record
record-name
Device(config-flow-monitor)# record prec-acct
|
Configures a
user-defined flow record that was previously configured for a Flexible NetFlow
flow monitor.
|
Step 19 |
cache
timeout
active
seconds
Device(config-flow-monitor)# cache timeout active 604800
|
Specifies
the active flow timeout, in seconds for the flow monitor.
Note
|
Cisco IOS
XE Releases do not support permanent cache, but allow cache timeout up to 7
days by configuring this command.
|
|
Step 20 |
cache
entries
number
Device(config-flow-monitor)# cache entries 200000
|
Specifies
the maximum number of entries in the flow monitor cache.
|
Step 21 |
exit
Device(config-flow-monitor)# exit
|
Exits
Flexible NetFlow flow monitor configuration mode and returns to global
configuration mode.
|
Step 22 |
interface
type
number
Device(config)# interface GigabitEthernet 0/0/4
|
Configures
an interface and enters interface configuration mode.
|
Step 23 |
ip
flow
monitor
monitor-name
input
Device(config-if)# ip flow monitor ip-acct input
|
Enables a
Flexible NetFlow flow monitor for IPv4 traffic that the router is transmitting.
|
Step 24 |
ip
flow
monitor
monitor-name
input
Device(config-if)# ip flow monitor prec-acct input
|
Enables a
Flexible NetFlow flow monitor for IPv4 traffic that the router is transmitting.
|
Step 25 |
exit
|
Exits
interface configuration mode and returns to privileged EXEC mode.
|
Step 26 |
show
flow
monitor
monitor-name
cache
Device# show flow monitor prec-acct cache
|
Displays the
contents of the cache for the flow monitor record that was previously
configured.
|
Step 27 |
show
flow
monitor
monitor-name
cache
Device# show flow monitor ip-acct cache
|
Displays the
contents of the cache for the flow monitor record that was previously
configured.
|
Step 28 |
clear
flow
monitor
monitor-name
cache
Device# clear flow monitor ip-acct cache
|
Clears the
flow monitor cache information.
|
Step 29 |
clear
flow
monitor
monitor-name
statistics
Device# clear flow monitor ip-acct statistics
|
Clears the
flow monitor statistics.
|
Step 30 |
show
flow
monitor
monitor-name
cache
format
csv
Device# show flow monitor ip-acct cache format csv | append bootflash:ip-acct
|
Exports the
flow monitor cache contents to an external source in comma separated variables
(CSV) format.
|