Cisco Cisco IOS Software Release 12.2(27)SBC

Page de 39
MPLS-Aware NetFlow
  How to Configure MPLS-Aware NetFlow
13
Cisco IOS Release: Multiple releases (see Feature Information table)
Configuring Sampling for MPLS-Aware NetFlow 
Perform this task to configure sampling for MPLS-Aware NetFlow. This sets up the random selection of 
one out of a given number of each sequential packets for NetFlow processing. You can use sampling for 
traffic engineering, capacity planning, and applications where full NetFlow is not needed for an accurate 
view of network traffic.
For example, if you set the sampling rate to 1 out of 100 packets, then NetFlow might sample the 5th 
packet and then the 120th, 199th, 302nd, and so on. This sample configuration provides NetFlow data 
on 1 percent of total traffic.
SUMMARY STEPS
1.
enable
2.
configure terminal
Step 9
ip flow-cache mpls label-positions
 
[label-position-1 [label-position-2 
[label-position-3]]] [no-ip-fields
[mpls-length]
Example:
Router(config)# ip flow-cache mpls 
label-positions 1 2 3
Enables MPLS-Aware NetFlow.
The label-position argument identifies the position of 
an MPLS label of interest in the incoming label stack. 
Label positions are counted from the top of the stack, 
starting with 1.
The no-ip-fields keyword controls the capture and 
reporting of MPLS flow fields. If the no-ip-fields 
keyword is specified, the following IP-related flow 
fields are not included:
Source IP address
Destination IP address
Transport layer protocol
Source application port number
Destination application port number
IP ToS
TCP flag (the result of a bitwise OR of TCP)
If the no-ip-fields keyword is not specified, the 
IP-related fields are captured and reported.
The mpls-length keyword controls the reporting of 
packet length. If the mpls-length keyword is specified, 
the reported length represents the sum of the MPLS 
packet payload length and the MPLS label stack length. 
If the mpls-length keyword is not specified, only the 
length of the MPLS packet payload is reported. 
Step 10
exit
Example:
Router(config)# exit
(Optional) Exits to privileged EXEC mode.
Command or Action
Purpose