Monday, October 10, 2011

Cisco IOS XR Netflow Configuration Example

Cisco IOS XR Netflow Configuration Example

Here is the sample configuration for netflow on Cisco IOS XR ASR9000 router:

sampler-map netflowtest
 random 1 out-of 100
!
flow monitor-map netflowtest
 record ipv4
 exporter netflowtest
!

flow exporter-map netflowtest
 version v9
 transport udp 9999
destination 2.2.2.20

Attahing netflow configuration to an interface:

interface GigabitEthernet0/1/0/1.10
  ipv4 address 10.10.10.2 255.255.255.252
 flow ipv4 monitor netflowtest sampler netflowtest ingress
 flow ipv4 monitor netflowtest sampler netflowtest egress
 encapsulation dot1q 10

Show output:

RP/0/RSP0/CPU0:netflowtestrouter#show flow monitor netflowtest cache include counters packets ipv4 source-address destination-address  source-port-overloaded destination-port-overloaded

Cache summary for Flow Monitor netflowtest:
Cache size:                          65535
Current entries:                         9
High Watermark:                      62258
Flows added:                         34846
Flows not added:                         0
Ager Polls:                         234548
  - Active timeout                     645
  - Inactive timeout                 31225
  - TCP FIN flag                      2967
  - Watermark aged                       0
  - Emergency aged                       0
  - Counter wrap aged                    0
  - Total                            34837
Periodic export:
  - Counter wrap                         0
  - TCP FIN flag                         0
Flows exported                           0
IPV4SrcAddr      IPV4DstAddr      L4SrcPort  L4DestPort PacketCount
10.10.10.1                    2.2.2.2             30820      23                   664
2.2.2.2                          2.2.2.1             53895      646                     1
10.10.10.2                    2.2.2.1             0              771                  199
10.10.10.1                    224.0.0.5         0               0                      96
10.10.10.1                    224.0.0.2         646           646                  204
2.2.2.2                          10.10.10.1       23             30820              574
2.2.2.1                           2.2.2.2            646           53895                1
2.2.2.1                           2.2.2.2            646            646                 199
10.10.12.4                     224.0.0.5        0                 0                    110

Matching entries:                        9

No comments:

Post a Comment