Configuring NetFlow
Configuring NetFlow on Cisco ASR 9000 Series
Aggregation Services Router
This module describes the configuration of NetFlow on the Cisco ASR 9000 Series Aggregation Services
Router.
A NetFlow flow is a unidirectional sequence of packets that arrive on a single interface (or subinterface),
and have the same values for key fields.
NetFlow is useful for the following:
•
Accounting/Billing—NetFlow data provides fine grained metering for highly flexible and detailed
resource utilization accounting.
•
Network Planning and Analysis—NetFlow data provides key information for strategic network
planning.
•
Network Monitoring—NetFlow data enables near real-time network monitoring capabilities.
Feature History for Configuring NetFlow on Cisco IOS XR Software
Release
Modification
Release 3.9.1
This feature was introduced.
Release 4.0
•
IPv6 Multicast Netflow support was added on Cisco ASR 9000's
A9K-SIP-700.
Contents
This module includes the following sections:
•
Prerequisites for Configuring NetFlow, page RC-2
•
Restrictions for Configuring NetFlow, page RC-2
•
Information About Configuring NetFlow, page RC-2
•
How to Configure NetFlow on Cisco IOS XR Software, page RC-8
•
Trident Netflow, page RC-23
•
Additional References, page RC-26
•
RFCs, page RC-27
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-1
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Prerequisites for Configuring NetFlow
Prerequisites for Configuring NetFlow
To perform these configuration tasks, your Cisco IOS XR software system administrator must assign
you to a user group associated with a task group that includes the corresponding command task IDs. If
you need assistance with your task group assignment, contact your system administrator.
Restrictions for Configuring NetFlow
Consider the following restrictions when configuring NetFlow in Cisco IOS XR software:
•
When the Netflow router is configured at the tail-end of the PW tunnel, the Netflow ingress is unable
to record the PW traffic in the cache. This behavior is because of the egress microcode limitation
for L2VPN which cannot handle the Netflow start offset packets. The egress microcode disables the
ingress Netflow processing for the SNF ingress start offset packets and hence these packets are not
included in the Netflow statistics.
In IOS XR, Netflow implementation happens using fast path.
Note
Tip
•
You must configure a source interface. If you do not configure a source interface, the exporter will
remain in a disabled state.
•
Cisco IOS XR software supports export format Version 9 only.
•
You must configure a valid record map name for every flow monitor map.
We recommend that you do not use the management interface to export NetFlow packets. Exporting the
management interface does not work efficiently.
Information About Configuring NetFlow
To implement NetFlow, you must understand the following concepts:
•
NetFlow Overview, page RC-2
•
Monitor Map Overview, page RC-3
•
Sampler Map Overview, page RC-3
•
Exporter Map Overview, page RC-4
•
NetFlow Configuration Submodes, page RC-4
•
MPLS Flow Monitor with IPv4 and IPv6 Support, page RC-7
NetFlow Overview
A flow is exported as part of a NetFlow export User Datagram Protocol (UDP) datagram under the
following circumstances:
•
The flow has been inactive or active for too long.
•
The flow cache is getting full.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-2
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Information About Configuring NetFlow
•
One of the counters (packets and or bytes) has wrapped.
•
The user forces the flow to export.
NetFlow export UDP datagrams are sent to an external flow collector device that provides NetFlow
export data filtering and aggregation. The export of data consists of expired flows and control
information.
The NetFlow infrastructure is based on the configuration and use of the following maps:
•
Monitor map
•
Sampler map
•
Exporter map
These maps are described in the sections that follow.
Monitor Map Overview
A monitor map contains name references to the flow record map and flow exporter map. Monitor maps
are applied to an interface. You can configure the following monitor map attributes:
•
Number of entries in the flow cache
•
Type of cache (permanent or normal). Permanent caches do not have their entries removed from the
cache unless they are explicitly cleared by the user
•
Active flow timeout
•
Inactive flow timeout
•
Update timeout
•
Default timeouts
•
Record type of packets sampled and collected
Note
Note
The record name specifies the type of packets that NetFlow samples as they pass through the
router. Currently, MPLS, IPv4, and IPv6 packet sampling is supported.
The active flow and inactive flow timeouts are associated with a normal cache type. The update timeout
is associated with the permanent cache type.
Sampler Map Overview
The sampler map specifies the rate at which packets (one out of n packets) are sampled. On high
bandwidth interfaces, applying NetFlow processing to every single packet can result in significant CPU
utilization. Sampler map configuration is typically geared towards such high speed interfaces.
The Policer rate is based on the network processor (NP). If netflow is applied on 1 NP, the aggregated
maximum flow packet processing rate per line card (LC) is 100k flow packets per second (irrespective
of the direction and the number of interface netflow that is applied in that NP). However, depending on
the Netflow monitor configuration distribution among NPs in an LC, policing of flow packet can take
effect with an aggregated rate that is less than 100k. For example, if Netflow is applied to 1 interface per
NP in a 4 NP LC, then the Policer rate per NP is 25K packets per second.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-3
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Information About Configuring NetFlow
Exporter Map Overview
An exporter map contains user network specification and transport layer details for the NetFlow export
packet. The flow exporter-map command allows you to configure collector and version attributes. You
can configure the following collector information:
•
Export destination IP address
•
DSCP value for export packet
•
Source interface
•
UDP port number (This is where the collector is listening for NetFlow packets.)
•
Transport protocol for export packets
Note
In Cisco IOS XR software, UDP is the only supported transport protocol for export packets.
Note
NetFlow export packets use the IP address that is assigned to the source interface. If the source interface
does not have an IP address assigned to it, the exporter will be inactive.
You can also configure the following export version attributes:
Note
•
Template timeout
•
Template data timeout
•
Template options timeout
•
Interface table timeout
•
Sampler table timeout
A single flow monitor map can support up to eight exporters.
NetFlow Configuration Submodes
In Cisco IOS XR, NetFlow map configuration takes place in map-specific submodes. Cisco IOS XR
supports the following NetFlow map configuration submodes:
Tip
•
Flow Exporter Map Configuration Submode, page RC-5
•
Flow Exporter Map Version Configuration Submode, page RC-5
•
Flow Monitor Map Configuration Submode, page RC-6
•
Sampler Map Configuration Submode, page RC-6
The Cisco IOS XR software allows you to issue most commands available under submodes as one single
command string from global configuration mode. For example, you can issue the record ipv4 command from
the flow monitor map configuration submode as follows:
RP/0/RSP0/CPU0router(config)# flow monitor-map fmm
RP/0/RSP0/CPU0:router(config-fmm)# record ipv4
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-4
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Information About Configuring NetFlow
Alternatively, you can issue the same command from global configuration mode, as shown in the
following example:
RP/0/RSP0/CPU0:router(config)# flow monitor-map fmm record ipv4
Flow Exporter Map Configuration Submode
When you issue the flow exporter-map fem-name command in global configuration mode, the
command-line interface (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 the flow exporter map configuration submode:
RP/0/RSP0/CPU0:router(config)# flow exporter-map fem
RP/0/RP0/CPU0:router(config-fem)# ?
clear
clear
commit
describe
destination
do
dscp
exit
no
pwd
root
show
source
transport
version
Clear the uncommitted configuration
Clear the configuration
Commit the configuration changes to running
Describe a command without taking real actions
Export destination configuration
Run an exec command
Specify DSCP value for export packets
Exit from this submode
Negate a command or set its defaults
Commands used to reach current submode
Exit to the global configuration mode
Show contents of configuration
Source interface
Specify the transport protocol for export packets
Specify export version parameters
Note
If you enter the version command, you enter the flow exporter map version configuration submode.
Note
A single flow monitor map can support up to eight exporters.
Flow Exporter Map Version Configuration Submode
When you issue the version v9 command in the flow exporter map configuration submode, the CLI
prompt changes to “config-fem-ver,” indicating that you have entered the flow exporter map version
configuration submode.
In the following sample output, the question mark (?) online help function displays all the commands
available under the flow exporter map version configuration submode:
RP/0/RSP0/CPU0:router(config-fem)# version v9
RP/0/RP0/CPU0:router(config-fem-ver)# ?
commit
describe
do
exit
Commit the configuration changes to running
Describe a command without taking real actions
Run an exec command
Exit from this submode
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-5
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Information About Configuring NetFlow
no
options
show
template
Negate a command or set its defaults
Specify export of options template
Show contents of configuration
Specify template export parameters
Flow Monitor Map Configuration Submode
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 the flow monitor map configuration submode:
RP/0/RSP0/CPU0:router(config)# flow monitor-map fmm
RP/0/RSP0/CPU0:router(config-fmm)# ?
cache
commit
describe
do
exit
exporter
no
record
show
Specify flow cache attributes
Commit the configuration changes to running
Describe a command without taking real actions
Run an exec command
Exit from this submode
Specify flow exporter map name
Negate a command or set its defaults
Specify a flow record map name
Show contents of configuration
RP/0/RSP0/CPU0:router(config-fmm)#
Sampler Map Configuration Submode
When you issue the sampler-map map_name command in global configuration mode, the CLI prompt
changes to “config-sm,” indicating that you have entered the sampler map configuration submode.
In the following sample output, the question mark (?) online help function displays all the commands
available under the sampler map configuration submode:
RP/0/RSP0/CPU0(config)# sampler-map fmm
RP/0/RSP0/CPU0:router(config-sm)# ?
clear
Clear the uncommitted configuration
clear
Clear the configuration
commit
Commit the configuration changes to running
describe Describe a command without taking real actions
do
Run an exec command
exit
Exit from this submode
no
Negate a command or set its defaults
pwd
Commands used to reach current submode
random
Use random mode for sampling packets
root
Exit to the global configuration mode
show
Show contents of configuration
RP/0/RSP0/CPU0(config-sm)#RP/0/RP0/CP0:router(config-sm)#
Enabling the NetFlow BGP Data Export Function
Use the bgp attribute-download command to enable NetFlow BGP routing attribute collection. The
routing attributes are then exported. When no routing attributes are collected, zeroes (0) are exported.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-6
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Information About Configuring NetFlow
When BGP attribute download is enabled, BGP downloads the attribute information for prefixes
(community, extended community, and as-path) to the Routing Information Base (RIB) and Forwarding
Information Base (FIB). This enables FIB to associate the prefixes with attributes and send the NetFlow
statistics along with the associated attributes.
MPLS Flow Monitor with IPv4 and IPv6 Support
Cisco IOS XR Software Release supports the NetFlow collection of MPLS packets. It also supports the
NetFlow collection of MPLS packets carrying IPv4, IPv6, or both IPv4 and IPv6 payloads.
MPLS Cache Reorganization to Support Both IPv4 and IPv6
In Cisco IOS XR Software Release , at a time, you can have only one MPLS flow monitor running on an
interface. If you apply an additional MPLS flow monitor to the interface, the new flow monitor
overwrites the existing one.
At a time, you can apply only one flow monitor on an interface per direction. You can apply either the
same flow monitor to an interface in both directions, or each direction can have its own flow monitor.
You can configure the MPLS flow monitor to collect IPv4 fields, IPv6 fields, or IPv4-IPv6 fields.
IPv4-IPv6 configuration collects both IPv4 and IPv6 addresses using one MPLS flow monitor. IPv4
configuration collects only IPv4 addresses. IPv6 configuration collects only IPv6 addresses.
The MPLS flow monitor supports up to 1,000,000 cache entries. NetFlow entries include the following
types of fields:
•
IPv4 fields
•
IPv6 fields
•
MPLS with IPv4 fields
•
MPLS with IPv6 fields
The maximum number of bytes per NetFlow cache entry is as follows:
Note
•
IPv4–88 bytes per entry
•
MPLS–88 bytes per entry
•
IPv6–108 bytes per entry
•
MPLS with IPv4 fields–108 bytes per entry
•
MPLS with IPv6 fields–128 bytes per entry
The different types of NetFlow entries are stored in separate caches. Consequently, the number of
NetFlow entries on a line card can significantly impact the amount of available memory on the line card.
Also, even though the sampling rate for IPv6 is the same as the sampling rate for IPv4, the CPU
utilization for IPv6 is higher due to the longer keys used by the IPv6 fields.
MPLS Packets with IPv6 Flows
The collection of IPv6 flows in MPLS packets is an option. The CPU uses 128 bytes for each IPv6 field.
IPv6 flows may contain the following types of information:
•
Source IP address
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-7
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
•
Destination IP address
•
Traffic class value
•
Layer 4 protocol number
•
Layer 4 source port number
•
Layer 4 destination port number
•
Flow ID
•
Header option mask
To collect the IPv6 fields in MPLS packets, you must activate the MPLS record type, ipv6-fields by
running the record mpls ipv6-fields command. You can also specify the number of labels to be used for
aggregation with this command.
How to Configure NetFlow on Cisco IOS XR Software
The steps that follow provide a general overview of NetFlow configuration:
Step 1
Create and configure an exporter map.
Step 2
Create and configure a monitor map and a sampler map.
Note
Step 3
The monitor map must reference the exporter map you created in Step 1. If you do not apply an
exporter-map to the monitor-map, the flow records are not exported, and aging is done according
to the cache parameters specified in the monitor-map.
Apply the monitor map and sampler map to an interface.
These steps are described in detail in the following sections:
•
Configuring an Exporter Map, page RC-8
•
Configuring a Sampler Map, page RC-11
•
Configuring a Monitor Map, page RC-12
•
Applying a Monitor Map and a Sampler Map to an Interface, page RC-16
•
Clearing NetFlow Data, page RC-17
•
Configuring NetFlow Collection of MPLS Packets with IPv6 Fields, page RC-18
Configuring an Exporter Map
Configure an exporter map and apply it to the monitor map with the flow monitor-map map_name
exporter map_name command. You can configure the exporter map prior to configuring the monitor
map, or you can configure the monitor map first and then configure and apply an exporter map later on.
Note
Cisco IOS XR software supports the configuration of a single collector only in the exporter map.
The steps that follow describe how to create and configure an exporter map.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-8
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
SUMMARY STEPS
1.
configure
2.
flow exporter-map map_name
3.
destination hostname_or_IP_address
4.
dscp dscp_value
5.
source type interface-path-id
6.
transport udp port
7.
version v9
8.
options {interface-table | sampler-table} [timeout seconds]
9.
template [data | options] timeout seconds
10. end
or
commit
11. exit
12. exit
13. show flow exporter-map map_name
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RSP0/CPU0:router# configure
Step 2
flow exporter-map map_name
Creates an exporter map, configures the exporter map name,
and enters flow exporter map configuration mode.
Example:
RP/0/RSP0/CPU0:router(config)# flow
exporter-map fem
Step 3
destination hostname_or_IP_address
Configures the export destination for the flow exporter map.
The destination can be a hostname or an IP address.
Example:
RP/0/RSP0/CPU0:router(config-fem)# destination
nnn.nnn.nnn.nnn
Step 4
(Optional) Specifies the differentiated services codepoint
(DSCP) value for export packets. Replace the dscp_value
argument with a value in the range from 0 through 63.
dscp dscp_value
Example:
RP/0/RSP0/CPU0:router(config-fem)# dscp 55
Step 5
source type interface-path-id
Specifies a source interface, in the format type
interface-path-id.
Example:
RP/0/RSP0/CPU0:router(config-fem)# source
gigabitEthernet 0/0/0/0
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-9
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 6
Command or Action
Purpose
transport udp port
(Optional) Specifies the destination port for UDP packets.
Replace port with the destination UDP port value, in the
range from 1024 through 65535.
Example:
RP/0/RSP0/CPU0:router(config-fem)# transport
udp 9991
Step 7
version v9
(Optional) Enters flow exporter map version configuration
submode.
Example:
RP/0/RSP0/CPU0:router(config-fem-ver)# version
v9
Step 8
options {interface-table | sampler-table}
[timeout seconds]
(Optional) Configures the export timeout value for the
sampler table. Replace seconds with the export timeout
value, in the range from 1 through 604800 seconds.
Example:
Default is 1800 seconds.
RP/0/RSP0/CPU0:router(config-fem-ver)# options
sampler-table timeout 2000
Step 9
template [data | options] timeout seconds
Example:
(Optional) Configures the export period for data packets.
Replace seconds with the export timeout value, in the range
from 1 through 604800 seconds.
RP/0/RSP0/CPU0:router(config-fem-ver)# template
data timeout 10000
Step 10
Saves configuration changes.
end
or
commit
When you issue the end command, the system prompts
you to commit changes:
Example:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
•
RP/0/RSP0/CPU0:router (config-fem-ver)# end
or
– Entering yes saves configuration changes to the
RP/0/RSP0/CPU0:router(config-fem-ver)# commit
running configuration file, exits the configuration
session, and returns the router to EXEC mode.
– Entering no exits the configuration session and
returns the router to EXEC mode without
committing the configuration changes.
– Entering cancel leaves the router in the current
configuration session without exiting or
committing the configuration changes.
•
Step 11
Use the commit command to save the configuration
changes to the running configuration file and remain
within the configuration session.
Exits flow exporter map version configuration submode.
exit
Example:
RP/0/RSP0/CPU0:router(config-fem-ver)# exit
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-10
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 12
Command or Action
Purpose
exit
Enters EXEC mode.
Example:
RP/0/RSP0/CPU0:router(config)# exit
Step 13
show flow exporter-map map_name
Displays exporter map data.
Example:
RP/0/RSP0/CPU0:router# show flow exporter-map
fem
Configuring a Sampler Map
The steps that follow describe how to create and configure a sampler map.
SUMMARY STEPS
1.
configure
2.
sampler-map map_name
3.
random 1 out-of sampling_interval
4.
end
or
commit
5.
exit
6.
exit
7.
show sampler-map map_name
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RSP0/CPU0:router# configure
Step 2
sampler-map map_name
Creates a sampler map and enters sampler map
configuration mode.
Example:
Keep the following in mind when configuring a sampler
map:
RP/0/RSP0/CPU0:router(config)# sampler-map fsm
RP/0/RSP0/CPU0:router(config-sm)#f
•
Step 3
random 1 out-of sampling_interval
Example:
Configures the sampling interval to use random mode for
sampling packets. Replace the sampling_interval argument
with a number, in the range from1 through 65535 units.
RP/0/RSP0/CPU0:router(config-sm)# random 1
out-of 65535
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-11
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 4
Command or Action
Purpose
end
Saves configuration changes.
or
commit
When you issue the end command, the system prompts
you to commit changes:
Example:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
•
RP/0/RSP0/CPU0:router (config-sm)# end
or
– Entering yes saves configuration changes to the
RP/0/RSP0/CPU0:router (config-sm)# commit
running configuration file, exits the configuration
session, and returns the router to EXEC mode.
– Entering no exits the configuration session and
returns the router to EXEC mode without
committing the configuration changes.
– Entering cancel leaves the router in the current
configuration session without exiting or
committing the configuration changes.
•
Step 5
Use the commit command to save the configuration
changes to the running configuration file and remain
within the configuration session.
Exits sampler map configuration mode and enters global
configuration mode.
exit
Example:
RP/0/RSP0/CPU0:router(config-sm)# exit
Step 6
Exits global configuration mode and enters EXEC mode.
exit
Example:
RP/0/RSP0/CPU0:router(config)# exit
Step 7
show sampler-map map_name
Displays sampler map data.
Example:
RP/0/RSP0/CPU0:router# show sampler-map fsm
Configuring a Monitor Map
The steps that follow describe how to create and configure a monitor map.
SUMMARY STEPS
1.
configure
2.
flow monitor-map map_name
3.
record ipv4
or
record ipv4 [peer as]
or
record ipv6
or
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-12
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
record mpls
or
record mpls [ipv4-fields] [labels number]
or
record mpls [ipv6-fields] [labels number]
or
record mpls [ipv4-ipv6-fields] [labels number]
4.
cache entries number
5.
cache permanent
6.
cache timeout {active | inactive | upate} timeout_value
7.
exporter map_name
8.
end
or
commit
9.
exit
10. exit
11. show flow monitor-map map_name
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RSP0/CPU0:router# configure
Step 2
Creates a monitor map and configures a monitor map name
and enters flow monitor map configuration submode.
flow monitor-map map_name
Example:
RP/0/RSP0/CPU0:router(config)# flow monitor-map
fmm
RP/0/RSP0/CPU0:router(config-fmm)#
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-13
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 3
Command or Action
Purpose
record
or
record
or
record
or
record
or
record
or
record
or
record
Configures the flow record map name for IPv4, IPv6, or
MPLS.
ipv4
ipv4 [peer as]
mpls [ipv4-fields] [labels number]
•
Use the record ipv4 [peer as] command to record peer
AS. Here, you collect and export the peer AS numbers.
mpls [ipv6-fields] [labels number]
Note
mpls [ipv4-ipv6-fields] [labels number]
RP/0/RSP0/CPU0:router(config-fmm)# record ipv4
cache entries number
Example:
RP/0/RSP0/CPU0:router(config-fmm)# cache
entries 10000
Step 5
Use the record ipv4 command to configure the flow
record map name for IPv4. By default, you collect and
export the originating autonomous system (AS)
numbers.
mpls [labels number]
Example:
Step 4
•
ipv6
cache permanent
Ensure that the bgp attribute-download command
is configured. Else, no AS is collected when the
record ipv4 [peer-as] command is configured.
•
Use the record ipv6 command to configure the flow
record map name for IPv6.
•
Use the record mpls labels command with the number
argument to specify the number of labels that you want
to aggregate. By default, MPLS-aware NetFlow
aggregates the top six labels of the MPLS label stack.
The maximum value is 6.
•
Use the record mpls ipv4-fields command to collect
IPv4 fields in the MPLS-aware NetFlow.
•
Use the record mpls ipv6-fields command to collect
IPV6 fields in the MPLS-aware NetFlow.
•
Use the record mpls ipv4-ipv6-fields command to
collect IPv4 and IPv6 fields in the MPLS-aware
NetFlow.
(Optional) Configures the number of entries in the flow
cache. Replace the number argument with the number of
flow entries allowed in the flow cache, in the range from
4096 through 1000000.
The default number of cache entries is 65535.
(Optional) Disables removal of entries from flow cache.
Example:
RP/0/RSP0/CPU0:router(config-fmm)# flow
monitor-map fmm cache permanent
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-14
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 6
Command or Action
Purpose
cache timeout {active timeout_value | inactive
timeout_value | upate timeout_value}
(Optional) Configures the active, inactive, or update flow
cache timeout value.
Example:
RP/0/RSP0/CPU0:router(config-fmm)# cache
timeout inactive 1000
Step 7
•
The default timeout value for the inactive flow cache is
15 seconds.
•
The default timeout value for the active flow cache is
1800 seconds.
•
The default timeout value for the update flow cache is
1800 seconds.
Note
The update timeout_value keyword argument 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.
Associates an exporter map with a monitor map.
exporter map_name
Note
Example:
A single flow monitor map can support up to eight
exporters.
RP/0/RSP0/CPU0:router(config-fmm)# exporter fem
Step 8
Saves configuration changes.
end
or
commit
When you issue the end command, the system prompts
you to commit changes:
Example:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
•
RP/0/RSP0/CPU0:router(config-fmm)# end
or
– Entering yes saves configuration changes to the
RP/0/RSP0/CPU0:router(config-fmm)# commit
running configuration file, exits the configuration
session, and returns the router to EXEC mode.
– Entering no exits the configuration session and
returns the router to EXEC mode without
committing the configuration changes.
– Entering cancel leaves the router in the current
configuration session without exiting or
committing the configuration changes.
•
Step 9
Use the commit command to save the configuration
changes to the running configuration file and remain
within the configuration session.
Exits flow monitor map configuration submode.
exit
Example:
RP/0/RSP0/CPU0:router(config-fmm)# exit
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-15
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 10
Command or Action
Purpose
exit
Exits global configuration mode.
Example:
RP/0/RSP0/CPU0:router(config)# exit
Step 11
show flow monitor-map map_name
Displays flow monitor map data.
Example:
RP/0/RSP0/CPU0:router# show flow monitor-map
fmm
Applying a Monitor Map and a Sampler Map to an Interface
SUMMARY STEPS
The steps that follow describe how to apply a monitor map and a sampler map to an interface.
1.
configure
2.
interface type number
3.
flow [ipv4 | ipv6 | mpls] monitor monitor_map sampler sampler_map {egress | ingress}
4.
end
or
commit
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RSP0/CPU0:router# configure
Step 2
interface type number
Enters interface configuration mode.
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)#
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-16
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 3
Command or Action
Purpose
flow [ipv4 | ipv6 | mpls] monitor monitor_map
sampler sampler_map {egress | ingress}
Associates a monitor map and a sampler map with an
interface.
Example:
RP/0/RSP0/CPU0:router(config-if)# flow ipv4
monitor fmm sampler fsm egress
Step 4
Enter ipv4 to enable IPV4 NetFlow on the specified
interface. Enter ipv6 to enable IPV6 NetFlow on the
specified interface. Enter mpls to enable MPLS-aware
NetFlow on the specified interface.
Saves configuration changes.
end
or
commit
When you issue the end command, the system prompts
you to commit changes:
Example:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
•
RP/0/RSP0/CPU0:router(config-if)# end
or
– Entering yes saves configuration changes to the
RP/0/RSP0/CPU0:router(config-if)# commit
running configuration file, exits the configuration
session, and returns the router to EXEC mode.
– Entering no exits the configuration session and
returns the router to EXEC mode without
committing the configuration changes.
– Entering cancel leaves the router in the current
configuration session without exiting or
committing the configuration changes.
•
Use the commit command to save the configuration
changes to the running configuration file and remain
within the configuration session.
Clearing NetFlow Data
The steps that follow describe how to clear flow exporter map and flow monitor map data.
SUMMARY STEPS
1.
clear flow exporter [exporter_name] {restart | statistics} location node-id
2.
clear flow monitor [monitor_name] cache [force-export | statistics] location node-id}
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-17
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
DETAILED STEPS
Step 1
Command or Action
Purpose
clear flow exporter [exporter_name] {restart |
statistics} location node-id
Clears the flow exporter data.
Specify the statistics option to clear exporter statistics.
Specify the restart option to export all of the templates that
are currently configured on the specified node.
Example:
RP/0/RSP0/CPU0:router# clear flow exporter
statistics location 0/0/CPU0
Step 2
clear flow monitor [monitor_name] cache
[force-export | statistics] location node-id}
Clears the flow monitor data.
Specify the statistics option to clear cache statistics.
Specify the force-export option to export the data from
cache to server first and then clear the entries from cache.
Example:
RP/0/RSP0/CPU0:router# clear flow monitor cache
force-export location 0/0/CPU0
Configuring NetFlow Collection of MPLS Packets with IPv6 Fields
The following steps show how to configure NetFlow collection of MPLS packets with IPv6 fields.
SUMMARY STEPS
1.
configure
2.
flow exporter-map map_name
3.
version v9
4.
options {interface-table | sampler-table} [timeout seconds]
5.
template [data | options] timeout seconds
6.
exit
7.
transport udp port
8.
source type interface-path-id
9.
destination hostname_or_IP_address
10. exit
11. flow monitor-map map_name
12. record mpls [ipv4-ipv6-fields] [labels number]
13. exporter map_name
14. cache entries number
15. cache timeout {active timeout_value | inactive timeout_value | upate timeout_value}
16. cache permanent
17. sampler-map map_name
18. random 1 out-of sampling_interval
19. interface type number
20. flow [ipv4 | ipv6 | mpls] monitor monitor_map sampler sampler_map {egress | ingress}
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-18
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
21. end
or
commit
22. exit
23. exit
24. show flow monitor-map map_name
25. show flow exporter-map map_name
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RSP0/CPU0:router# config
Step 2
flow exporter-map map_name
Example:
Creates an exporter map, configures the exporter
map name, and enters flow exporter map
configuration mode.
RP/0/RSP0/CPU0:router(config)# flow exporter-map
exp1
Step 3
(Optional) Enters flow exporter map version
configuration submode.
version v9
Example:
RP/0/RSP0/CPU0:router(config-fem)# version v9
Step 4
options {interface-table | sampler-table} [timeout
seconds]
Example:
RP/0/RSP0/CPU0:router(config-fem-ver)# options
interface-table timeout 300
(Optional) Configures the export timeout value for
the interface table or the sampler table. Replace
seconds with the export timeout value, in the range
from 1 through 604800 seconds. The default is 1800
seconds for both the interface table and the sample
table.
You must perform this step twice to configure the
export timeout value for both an interface table and
a sample table.
Step 5
template [data | options] timeout seconds
Example:
RP/0/RSP0/CPU0:router(config-fem-ver)# template data
timeout 300
Step 6
(Optional) Configures the export period for data
packets or options packets. Replace seconds with the
export timeout value, in the range from 1 through
604800 seconds.
You must perform this step twice to configure the
export period for both data packets and options
packets.
Exits flow exporter map version configuration
mode, and enters flow exporter map configuration
mode.
exit
Example:
RP/0/RSP0/CPU0:router(config-fem-ver)# exit
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-19
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 7
Command or Action
Purpose
transport udp port
(Optional) Specifies the destination port for UDP
packets. Replace port with the destination UDP port
value, in the range from 1024 through 65535.
Example:
RP/0/RSP0/CPU0:router(config-fem)# transport udp
12515
Step 8
source type interface-path-id
Specifies a source interface, in the format type
interface-path-id. For example:
POS 0/1/0/1
or
Loopback0
Example:
RP/0/RSP0/CPU0:router(config-fem)# source Loopback0
Step 9
destination hostname_or_IP_address
Example:
Configures the export destination for the flow
exporter map. The destination can be a hostname or
an IP address.
RP/0/RSP0/CPU0:router(config-fem)# destination
170.1.1.11
Step 10
Exits flow exporter map configuration mode, and
enters flow exporter map configuration mode.
exit
Example:
RP/0/RSP0/CPU0:router(config-fem)# exit
Step 11
flow monitor-map map_name
Example:
Creates a monitor map and configures a monitor
map name and enters flow monitor map configuration
submode.
RP/0/RSP0/CPU0:router(config)# flow monitor-map
MPLS-IPv6-fmm
Step 12
record mpls [ipv4-ipv6-fields] [labels number]
Example:
RP/0/RSP0/CPU0:router(config-fmm)# record mpls
ipv6-fields labels 3
Step 13
exporter map_name
Configures the flow record map name for IPv4,
IPv6, or MPLS. Use the ipv4-ipv6-fields keyword to
collect IPv4 and IPv6 fields in an MPLS-aware
NetFlow.
Associates an exporter map with a monitor map.
Note
Example:
A single flow monitor map can support up to
eight exporters.
RP/0/RSP0/CPU0:router(config-fmm)# exporter exp1
Step 14
cache entries number
Example:
RP/0/RSP0/CPU0:router(config-fmm)# cache entries
10000
(Optional) Configures the number of entries in the
flow cache. Replace the number argument with the
number of flow entries allowed in the flow cache, in
the range from 4096 through 1000000.
The default number of cache entries is 65535.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-20
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 15
Command or Action
Purpose
cache timeout {active timeout_value | inactive
timeout_value | upate timeout_value}
(Optional) Configures the active, inactive, or update
flow cache timeout value.
Example:
RP/0/RSP0/CPU0:router(config-fmm)# cache timeout
inactive 1800
Step 16
•
The default timeout value for the inactive flow
cache is 15 seconds.
•
The default timeout value for the active flow
cache is 1800 seconds.
•
The default timeout value for the update flow
cache is 1800 seconds.
Note
The inactive and active keywords are not
applicable to permanent caches.
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.
(Optional) Disables the removal of entries from flow
cache.
cache permanent
Example:
RP/0/RSP0/CPU0:router(config-fmm)# flow monitor-map
fmm cache permanent
Step 17
Exits flow monitor map configuration submode.
exit
Example:
RP/0/RP0/CPU0:router(config-fmm)# exit
Step 18
sampler-map map_name
Creates a sampler map and enters sampler map
configuration mode.
Example:
Keep the following in mind when configuring a
sampler map:
RP/0/RSP0/CPU0:router(config)# sampler-map fsm
RP/0/RSP0/CPU0:router(config-sm)#
•
Step 19
random 1 out-of sampling_interval
Example:
RP/0/RSP0/CPU0:router(config-sm)# random 1 out-of
65535
Step 20
Configures the sampling interval to use random
mode for sampling packets. Replace the
sampling_interval argument with a number, in the
range from1 through 65535 units.
Exits sampler map configuration mode and enters
global configuration mode.
exit
Example:
RP/0/RSP0/CPU0:router(config-sm)# exit
Step 21
Enters interface configuration mode.
interface type number
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)#
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-21
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Step 22
Command or Action
Purpose
flow [ipv4 | ipv6 | mpls] monitor monitor_map
sampler sampler_map {egress | ingress}
Associates a monitor map and a sampler map with
an interface.
Example:
RP/0/RSP0/CPU0:router(config-if)# flow ipv4 monitor
MPLS-IPv6-fmm sampler fsm egress
Step 23
Enter ipv4 to enable IPV4 NetFlow on the specified
interface. Enter ipv6 to enable IPV6 NetFlow on the
specified interface. Enter mpls to enable
MPLS-aware NetFlow on the specified interface.
Saves configuration changes.
end
or
commit
When you issue the end command, the system
prompts you to commit changes:
Example:
Uncommitted changes found, commit them
before
exiting(yes/no/cancel)?
[cancel]:
•
RP/0/RSP0/CPU0:router (config-fem-ver)# end
or
– Entering yes saves configuration changes to
RP/0/RSP0/CPU0:router(config-fem-ver)# commit
the running configuration file, exits the
configuration session, and returns the
router to EXEC mode.
– Entering no exits the configuration session
and returns the router to EXEC mode
without committing the configuration
changes.
– Entering cancel leaves the router in the
current configuration session without
exiting or committing the configuration
changes.
•
Step 24
Use the commit command to save the
configuration changes to the running
configuration file and remain within the
configuration session.
Exits interface configuration submode for the
Ethernet interface.
exit
Example:
RP/0/RSP0/CPU0:router(config-if)# exit
Step 25
Exits global configuration mode.
exit
Example:
RP/0/RSP0/CPU0:router(config)# exit
Step 26
show flow monitor-map map_name
Displays flow monitor map data.
Example:
RP/0/RSP0/CPU0:router# show flow monitor-map fmm
Step 27
show flow exporter-map map_name
Displays exporter map data.
Example:
RP/0/RSP0/CPU0:router# show flow exporter-map fem
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-22
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
How to Configure NetFlow on Cisco IOS XR Software
Trident Netflow
Trident Netflow exports using only the V9 (Version 9) format. V9 is the most flexible NetFlow export.
This format is flexible and extensible. It provides the flexibility to support new fields and record types.
Supported features
•
Flow monitor type of IPv4, IPv6, and MPLS can all be configured to an interface per direction.
•
Sampled Netflow. There is no support for full mode sampling.
•
Non-deterministic Random Sampling Algorithm.
•
Different traffic types, including unicast and multicast traffic.
Punt path policer rate
In order to achieve the maximum flow processing without overloading the LC CPU, all flow packets that
are punted from each Network Processor are policed. This is done to avoid overloading the CPU. The
aggregate punt policer rate is 100 Kpps. To avoid having flow packets arrive at the CPU at a huge rate,
the punt path policer needs to be applied on all NPs that have the netflow feature applied on them.
The Punt path policer rate can be calculated in following way:
Calculating Punt path policer rate
The policer rate of each NP_NetflowMonitor is 100k, where NP_NetflowMonitor is NP that has Netflow
monitor configured to its associated interfaces; or any of its associated interfaces are member of a bundle
interfaces or bundle sub-interfaces that has Netflow monitor applied.
Determining NP for NP_NetflowMonitor or non - NP_NetflowMonitor:
1.
If any of its associated interface or sub-interface has any flow monitor applied, then it is
NP_NetflowMonitor.
2.
If any of its interfaces is a member of a bundle interface or bundle sub-interface that has Netflow
monitor configured, the NP is considered as non- NP_NetflowMonitor.
Trident base line cards supported features
•
Supports ingress and egress Netflow (IPv4, IPv6, MPLS) on L3 physical interface, L3-sub-interface,
L3-Bundle interface, and L3 bundle sub-interface.
•
Supports configurable Sampling Rate 1:1 ~ 1: 65535
•
Supports only up to 4 Sampling Rates (or Intervals) per LC.
•
Supports up to 8k (Large memory LC) or 4k (Small Memory LC) interfaces/subinterfaces
•
Supports configuration with flow monitor per NP.
•
Supports maximum aggregate Netflow processing rate of 50k flow packets per seconds per LC,
enforced by Netflow Punt Policer on each NPs.
•
Supports netflow processing of 100Kpps, with CPU utilization not exceeding 50%.
•
Supports up to 4 flow exporters per flow monitor.
•
Supports exporting packet rates of up to 100k flows per second.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-23
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Configuration Examples for NetFlow
Configuration Examples for NetFlow
The following examples show NetFlow configurations:
•
Sampler Map: Example, page RC-24
•
Exporter Map: Example, page RC-24
•
Flow Monitor Map: Examples, page RC-24
•
MPLS Flow Monitor with IPv4 and IPv6 Support, page RC-7
Sampler Map: Example
The following example shows how to create a new sampler map called “fsm1,” which samples 1 out of
65535 packets:
RP/0/RSP0/CPU0:router(config)# sampler-map fsm1
RP/0/RSP0/CPU0:router(config-sm)# random 1 out-of 65535
RP/0/RSP0/CPU0:router(config)# exit
Exporter Map: Example
The following example shows how to create a new flow exporter map called “fem1,” which uses the
version 9 (V9) export format for NetFlow export packets. The data template flow-set is inserted into the
V9 export packets once every 10 minutes, and the options interface table flow-set is inserted into the V9
export packet. The export packets are sent to the flow collector destination 10.1.1.1, where the source
address is identical to the interface IP address of Loopback 0. The UDP destination port is 1024, and the
DSCP value is 10:
RP/0/RSP0/CPU0router(config)# flow exporter-map fem1
RP/0/RSP0/CPU0:router(config-fem)# destination 10.1.1.1
RP/0/RSP0/CPU0:router(config-fem)# source Loopback 0
RP/0/RSP0/CPU0:router(config-fem)# transport udp 1024
RP/0/RSP0/CPU0:router(config-fem)# dscp 10
RP/0/RSP0/CPU0:router(config-fem)# exit
RP/0/RSP0/CPU0:router(config-fem)# version v9
RP/0/RSP0/CPU0router(config-fem-ver)# template data timeout 600
RP/0/RSP0/CPU0:router(config-fem-ver)# options interface-table
RP/0/RSP0/CPU0:router(config-fem-ver)# exit
Flow Monitor Map: Examples
The following example shows how to create a new flow monitor map with name “fmm1”. This flow
monitor map references the flow exporter map “fem1,” and sets the flow cache attributes to 10000 cache
entries. The active entries from the cache are aged every 30 seconds, while the inactive entries from the
cache are aged every 15 seconds. The record map for this monitor map is IPv4:
RP/0/RSP0/CPU0:router(config)# flow monitor-map fmm1
RP/0/RSP0/CPU0:router(config-fmm)# record ipv4
RP/0/RSP0/CPU0:router(config-fmm)# exporter fem1
RP/0/RSP0/CPU0:router(config-fmm)# cache entries 10000
RP/0/RSP0/CPU0:router(config-fmm)# cache timeout active 30
RP/0/RSP0/CPU0:router(config-fmm)# cache timeout inactive 15
RP/0/RSP0/CPU0:router(config-fmm)# exit
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-24
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Configuration Examples for NetFlow
The following example shows how to apply the flow monitor “fmm1”and the sampler “fsm1” to the
TenGigE 0/0/0/0 interface in the ingress direction:
RP/0/RSP0/CPU0:router(config)# interface TenGigE 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow ipv4 monitor fmm1 sampler fsm1 ingress
RP/0/RSP0/CPU0:router(config-if)# exit
The following example shows how to configure the NetFlow monitor to collect MPLS packets with IPv6
fields:
RP/0/RSP0/CPU0:router# config
RP/0/RSP0/CPU0:routerconfig)# flow exporter-map exp1
RP/0/RSP0/CPU0:router(config-fem)# version v9
RP/0/RSP0/CPU0:router(config-fem-ver)# options interface-table timeout 300
RP/0/RSP0/CPU0:router(config-fem-ver)# options sampler-table timeout 300
RP/0/RSP0/CPU0:router(config-fem-ver)# template data timeout 300
RP/0/RSP0/CPU0:router(config-fem-ver)# template options timeout 300
RP/0/RSP0/CPU0:router(config-fem-ver)# exit
RP/0/RSP0/CPU0:router(config-fem)# transport udp 12515
RP/0/RSP0/CPU0:router(config-fem)# source Loopback0
RP/0/RSP0/CPU0:router(config-fem)# destination 170.1.1.11
RP/0/RSP0/CPU0:router(config-fmm)# exit
RP/0/RSP0/CPU0:router(config)# flow monitor-map MPLS-IPv6-fmm
RP/0/RSP0/CPU0:router(config-fmm)# record mpls ipv6-fields labels 3
RP/0/RSP0/CPU0:router(config-fmm)# exporter exp1
RP/0/RSP0/CPU0:router(config-fmm)# cache entries 10000
RP/0/RSP0/CPU0:router(config-fmm)# cache permanent
RP/0/RSP0/CPU0:router(config-fmm)# exit
RP/0/RSP0/CPU0:router(config)# sampler-map FSM
RP/0/RSP0/CPU0:router(config-sm)# random 1 out-of 65535
RP/0/RSP0/CPU0:router(config-sm)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow mpls monitor MPLS-IPv6-fmm sampler FSM ingress
MPLS Flow Monitor with IPv4 and IPv6 Support: Examples
The following configuration collects MPLS traffic, but no payload information is collected.
RP/0/RSP0/CPU0:router(config)# flow monitor-map MPLS-fmm
RP/0/RSP0/CPU0:router(config-fmm)# record mpls labels 3
RP/0/RSP0/CPU0:router(config-fmm)# cache permanent
RP/0/RSP0/CPU0:router(config)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow mpls monitor MPLS-fmm sampler fsm ingress
The following configuration collects MPLS traffic with IPv4 payloads. It also collects MPLS traffic
without IPv4 payloads, but it populates the IPv4 fields with zeros (0).
RP/0/RSP0/CPU0:router(config)# flow monitor-map MPLS-IPv4-fmm
RP/0/RSP0/CPU0:router(config-fmm)# record mpls IPv4-fields labels 3
RP/0/RSP0/CPU0:router(config-fmm)# cache permanent
RP/0/RSP0/CPU0:router(config-fmm)# exit
RP/0/RSP0/CPU0:routerrouter(config)# interface gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow mpls monitor MPLS-IPv4-fmm sampler fsm ingress
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-25
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Additional References
The following configuration collects MPLS traffic with IPv6 payloads. It also collects MPLS traffic
without IPv6 payloads, but it populates the IPv6 fields with zeros (0).
RP/0/RSP0/CPU0:router(config)# flow monitor-map MPLS-IPv6-fmm
RP/0/RSP0/CPU0:router(config-fmm)# record mpls IPv6-fields labels 3
RP/0/RSP0/CPU0:router(config-fmm)# cache permanent
RP/0/RSP0/CPU0:router(config-fmm)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow mpls monitor MPLS-IPv6-fmm sampler fsm ingress
The following configuration collects MPLS traffic with both IPv6 and IPv4 fields. It also collects MPLS
traffic without IPv4 or IPv6 payloads, but it populates the IPv6 and IPv4 fields with zeros (0).
RP/0/RSP0/CPU0:router(config)# flow monitor-map MPLS-IPv4-IPv6-fmm
RP/0/RSP0/CPU0:router(config-fmm)# record mpls IPv4-IPv6-fields labels 3
RP/0/RSP0/CPU0:router(config-fmm)# cache permanent
RP/0/RSP0/CPU0:router(config-fmm)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitEthernet 0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# flow mpls monitor MPLS-IPv4-IPv6-fmm sampler fsm ingress
Note
Flow records are exported using the Version 9 format.
Additional References
The following sections provide references related to interface configuration.
Related Documents
Related Topic
Document Title
Cisco IOS XR master command reference
Cisco IOS XR Master Commands List
Cisco IOS XR interface configuration commands
Cisco IOS XR Interface and Hardware Component Command
Reference
Initial system bootup and configuration information for Cisco IOS XR Getting Started Guide
a router using the Cisco IOS XR software.
Information about user groups and task IDs
Cisco IOS XR Interface and Hardware Component Command
Reference
Cisco Craft Works Interface User Guide
Information about configuring interfaces and other
components on the Cisco CRS-1 Router from a remote
Craft Works Interface (CWI) client management
application.
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-26
OL-xxxxx-xx
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Additional References
Standards
Standards
Title
No new or modified standards are supported by this
—
feature, and support for existing standards has not been
modified by this feature.
MIBs
MIBs
MIBs Link
—
To locate and download MIBs using Cisco IOS XR software, use the
Cisco MIB Locator found at the following URL and choose a
platform under the Cisco Access Products menu:
http://cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
RFCs
RFCs
Title
3954
NetFlow services export protocol Version 9.
Technical Assistance
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
OL-xxxxx-xx
NFC-27
Configuring NetFlow on Cisco ASR 9000 Series Aggregation Services Router
Additional References
Cisco ASR 9000 Series Aggregation Services Router Netflow Configuration Guide, Release 4.0
NFC-28
OL-xxxxx-xx
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement