Table Of Contents
NetFlow Commands on Cisco IOS XR Software
cache entries
cache permanent
cache timeout
clear flow exporter
clear flow monitor
clear flow platform producer statistics location
destination
dscp
exporter
flow
flow exporter-map
flow monitor-map
options
random 1 out-of
record ipv4
record ipv6
record mpls
sampler-map
show flow exporter
show flow exporter-map
show flow monitor
show flow monitor-map
show flow platform producer statistics location
show sampler-map
source (NetFlow)
template
transport udp
version v9
NetFlow Commands on Cisco IOS XR Software
This module describes the NetFlow commands on Cisco IOS XR software.
cache entries
To configure the number of entries in the monitor map flow cache, enter the cache entries command in flow monitor map configuration mode. To remove a configured number of entries and return the cache to the default configuration, use the no form of this command.
cache entries number
no command number
Syntax Description
number
|
Number of entries in the flow cache. Replace the number argument with the number of flow entries allowed in the flow cache. Range is from 4096 through 1000000.
|
Defaults
number = 65535
Command Modes
Flow monitor map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to configure the number of entries in the monitor map flow cache to be 10000:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# cache entries 10000
Related Commands
cache permanent
To disable the removal of entries from the monitor map flow cache, enter the cache permanent command in flow monitor map configuration mode. To re-enable the removal of entries from the flow cache, use the no form of this command.
cache permanent
no cache permanent
Syntax Description
This command has no arguments or keywords.
Defaults
The removal of entries from the monitor map flow cache is enabled.
Command Modes
Flow monitor map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to disable the removal of entries from the monitor map flow cache:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# cache permanent
The following example shows how to re-enable the removal of entries from the monitor map flow cache:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# no cache permanent
Related Commands
cache timeout
To configure the active, inactive, and update flow cache timeout, enter the cache timeout command in flow monitor map configuration mode. To remove the configured timeout value and return the cache to its default timeout value, use the no form of this command.
cache timeout {active | inactive | update} timeout_value
no cache timeout {active | inactive | update} timeout_value
Syntax Description
active
|
Specifies the active flow timeout.
|
inactive
|
Specifies the inactive flow timeout.
|
update
|
Specifies the update timeout.
|
timeout_value
|
Timeout value for the specified keyword (active, inactive, or update), in seconds. Range is from 1 through 604800.
|
Defaults
For active timeout, the default value is 1800 seconds.
For inactive timeout, the default value is 15 seconds.
For update timeout, the default value is 1800 seconds.
Command Modes
Flow monitor map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Note
The inactive timeout value should be smaller than the active timeout value.
Note
The update keyword is used for permanent caches only. It specifies the timeout value that is used to export entries from permanent caches. In this case, the entries are exported but remain the cache.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to set the active timeout for the monitor map cache to 200,000 seconds:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# cache timeout active 200000
Related Commands
clear flow exporter
To export flow exporter templates to the collector or restart the flow exporter statistics collector, enter the clear flow exporter command in EXEC mode.
clear flow exporter [fem-name] {restart | statistics} location node-id
Syntax Description
fem-name
|
(Optional) Flow exporter name.
|
restart
|
Exports all of the current templates to the collector.
|
statistics
|
Clears the exporter statistics.
|
location node-id
|
Identifies the node whose flow exporter statistics you want to clear, or whose flow exporter statistics collector you want to restart. The node-id argument is expressed in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
basic-services
|
read, write
|
netflow
|
read, write
|
Examples
The following example exports all templates to the collector:
RP/0/RP0/CPU0:router# clear flow exporter restart location 0/0/SP
Restart exporter all locations. Continue? [confirm]
The following example shows how to clear flow exporter statistics on a specific node.
RP/0/RP0/CPU0:router# clear flow exporter statistics location 0/0/CPU0
Clear statistics for all exporters on the location. Continue? [confirm]
Related Commands
clear flow monitor
To clear the flow monitor data, enter the clear flow monitor command in EXEC mode.
clear flow monitor [name] cache [force-export | statistics] location node-id
Syntax Description
name
|
(Optional) Identifies a specific cache you want to clear.
|
cache
|
Clears all cache related information.
|
force-export
|
(Optional) Forces the export of flow records on flushing the cache on the specified node.
|
statistics
|
(Optional) Clears cache statistics on a specific node.
|
location node-id
|
Node whose flow monitor you want to clear. The node-id argument is expressed in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to clear the cache-related flow records on a specific node:
RP/0/RP0/CPU0:router# clear flow monitor cache force-export location 0/0/CPU0
Clear cache entries for this monitor on this location. Continue? [confirm]
Related Commands
clear flow platform producer statistics location
To clear statistics collected by the NetFlow producer, use the clear flow platform producer statistics location command in EXEC mode.
clear flow platform producer statistics location node-id
Syntax Description
node-id
|
Node on which to clear statistics collected by the NetFlow producer. The node-id is expressed in the rack/slot/module notation.
Note Enter the show platform command to see the location of all nodes installed in the router.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to clear statistics collected by the NetFlow producer:
RP/0/RP0/CPU0:router # clear flow platform producer statistics location 0/0/CPU0
destination
To configure the collector export destination, enter the destination command in flow exporter map configuration mode. To remove a configured export destination, use the no form of this command.
destination hostname_or_IP_address
no destination hostname_or_IP_address
Syntax Description
hostname_or_IP_address
|
Export destination for the current flow exporter map. Enter the hostname or destination IP address in the A.B.C.D format.
|
Defaults
No default behavior or values
Command Modes
Flow exporter map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
This command was moved to the flow exporter map configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to configure the flow exporter map export destination to be a specific IP address:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# flow exporter-map map1
RP/0/RP0/CPU0:router(config-fem)# destination 172.18.189.38
Related Commands
dscp
To configure the differentiated services codepoint (DSCP) value for export packets, enter the dscp command in flow exporter map configuration mode. To remove a configured DSCP value, use the no form of this command.
dscp dscp_value
no dscp dscp_value
Syntax Description
dscp_value
|
Specifies the DSCP value for export packets. Replace dscp_value with a number. Range is from 0 through 63.
|
Defaults
No default behavior or values
Command Modes
Flow exporter map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
This command was moved to the flow exporter map configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to configure the DSCP value for export packets to be 30:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# flow exporter-map map1
RP/0/RP0/CPU0:router(config-fem)# dscp 30
Related Commands
exporter
To associate a flow exporter map with the current flow monitor map, enter the exporter command in flow monitor map configuration mode. To remove an associated flow exporter map from a flow monitor map, use the no form of this command.
exporter map_name
no exporter map_name
Syntax Description
map_name
|
Name of the flow exporter map you want to associate with the current flow monitor map. The exporter map name can be a maximum of 32 characters.
|
Defaults
No default behavior or values
Command Modes
Flow monitor map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
NetFlow was updated so that a single flow monitor map supports up to 8 exporters.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Note
A single flow monitor map can support up to eight flow exporter maps.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to associate a flow exporter map called "fem_1" with the current flow monitor map:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# exporter fem_1
Related Commands
flow
To specify a flow monitor map and a sampler map for the packets on an interface, enter the flow command in interface configuration mode.
flow [ipv4 | ipv6 | mpls] monitor name sampler name {egress | ingress}
Syntax Description
ipv4
|
Enables IPV4 NetFlow on the specified interface.
|
ipv6
|
Enables IPV6 NetFlow on the specified interface.
|
mpls
|
Enables Multiprotocol Label Switching (MPLS) aware NetFlow on the specified interface.
|
monitor name
|
Specifies the name of the flow monitor map you want to specify for IPv4, IPv6, or MPLS packets.
|
sampler name
|
Name of the sampler map you want to apply to the flow monitor map.
|
egress
|
Applies the flow monitor map on outgoing packets.
|
ingress
|
Applies the flow monitor map on incoming packets.
|
Defaults
No default behavior or values
Command Modes
Interface configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.1
|
On the Cisco CRS-1, the mpls keyword was added to the flow command to support MPLS aware NetFlow.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
On the Cisco CRS-1, the ipv6 keyword was added to the flow command to support IPv6 NetFlow.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to enable IPV4 NetFlow on a Packet-over-SONET/SDH (POS) interface, and then apply the flow monitor map, named "map1," on outgoing IPv4 packets:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# interface POS 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# flow ipv4 monitor map1 sampler map1 egress
The following example shows how to enable MPLS NetFlow on a Packet-over-SONET/SDH (POS) interface, and apply the flow monitor map, named "map_mpls1," on outgoing MPLS packets:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# interface POS 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# flow mpls monitor map_mpls1 sampler map1 egress
Related Commands
Command
|
Description
|
flow monitor-map
|
Creates and configures a flow monitor map, and enters flow monitor map configuration submode.
|
show flow monitor-map
|
Displays flow monitor map information.
|
flow exporter-map
To create a flow exporter map and enter flow exporter map configuration mode, use the flow exporter-map command in global configuration mode. To remove a configured flow exporter map, use the no form of this command.
flow exporter-map fem-name
no flow exporter-map fem-name
Syntax Description
fem-name
|
Creates a new exporter map name, or specifies the name of an existing exporter map.
|
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When you issue the flow exporter-map fem-name command in global configuration mode, the CLI prompt changes to "config-fem," indicating that you have entered the flow exporter map configuration submode. In the following sample output, the question mark (?) online help function displays all the commands available under flow exporter map configuration submode:
RP/0/RP0/CPU0:router(config)# flow exporter-map map1
RP/0/RP0/CPU0:router(config-fem)# ?
commit Commit the configuration changes to running
describe Describe a command without taking real actions
destination Export destination configuration
dscp Specify DSCP value for export packets
exit Exit from this submode
no Negate a command or set its defaults
root Exit to the global configuration mode
show Show contents of configuration
transport Specify the transport protocol for export packets
version Specify export version parameters
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to create a flow exporter map called "map1," and then enter the flow exporter map configuration submode for that map:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# flow exporter-map map1
RP/0/RP0/CPU0:router(config-fem)#
Related Commands
flow monitor-map
To create and configure a flow monitor map and enter flow monitor map configuration submode, use the flow monitor-map command in global configuration mode. To remove a configured flow monitor map, use the no form of this command:
flow monitor-map map_name
no flow monitor-map map_name
Syntax Description
map_name
|
New monitor map name, or specifies the name of an existing monitor map. The monitor map name can be a maximum 32 characters.
|
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
NetFlow was updated so that a single flow monitor map supports up to 8 exporters.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When you issue the flow monitor-map map_name command in global configuration mode, the CLI prompt changes to "config-fmm," indicating that you have entered the flow monitor map configuration submode. In the following sample output, the question mark (?) online help function displays all the commands available under flow monitor map configuration submode:
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# ?
cache Specify flow cache attributes
commit Commit the configuration changes to running
describe Describe a command without taking real actions
exit Exit from this submode
exporter Specify flow exporter map name
no Negate a command or set its defaults
record Specify a flow record map name
show Show contents of configuration
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to enter flow monitor map configuration mode for a monitor map called "map1:"
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0router(config)# flow monitor-map map1
RP/0/RP0/CPU0router(config-fmm)#
Related Commands
options
To export the tables in the options template and specify export timeout values, enter the options command in flow exporter map version configuration mode. To return the options template to its default configuration values, use the no form of this command.
options {interface-table | sampler-table} [timeout seconds]
no options {interface-table | sampler-table} [timeout seconds]
Syntax Description
interface-table
|
Export the interface table.
|
sampler-table
|
Exports the sampler table.
|
timeout seconds
|
Specifies the export timeout value. Replace seconds with the export timeout value. Range is from 1 through 604800 seconds.
|
Defaults
The default value for timeout is 0 seconds, which means that the template options are not exported by default.
Command Modes
Flow exporter map version configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to export the interface table and configure the export timeout value to be 300 seconds:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# flow exporter-map fem1
RP/0/RP0/CPU0:router(config-fem)# version v9
RP/0/RP0/CPU0:router(config-fem-ver)# options interface-table timeout 300
Related Commands
random 1 out-of
To configure the packet sampling interval for a monitor map, use the random 1 out-of command in sampler map configuration submode. To remove a configured sampling interval and return to the default sampling interval, use the no form of this command.
random 1 out-of number_of_packets
no random 1 out-of number_of_packets
Syntax Description
number_of_packets
|
Sampling interval in units of packets. Replace the number_of_packets argument with a number. Range is from 1 through 65535 units.
|
Defaults
number_of_packets = 10000
Command Modes
Sampler map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to configure the sampler map to randomly sample 1 out of every 10 packets:
RP/0/RP0/CPU0:router # configure
RP/0/RP0/CPU0:router(config)# sampler map1
RP/0/RP0/CPU0:router(config-sm)# random 1 out-of 10
Related Commands
Command
|
Description
|
sampler-map
|
Enters sampler map configuration submode for a specific monitor map.
|
show sampler-map
|
Displays sampler map information.
|
record ipv4
To configure the flow record map name for IPv4, use the record ipv4 command in flow monitor map configuration mode. To remove the configured name from a flow record, use the no form of this command.
record ipv4
no record ipv4
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
Flow monitor map configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
This feature was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
netflow
|
read, write
|
Examples
The following example shows how to configure the flow record map name for IPv4:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# flow monitor-map map1
RP/0/RP0/CPU0:router(config-fmm)# record ipv4
Related Commands
record ipv6