Cisco - Netflow_Cache

Situation

# 更改Netflow回報時間
Modify NetFlow cache timeout settings.

# Active : 連線中定時回報
Periodic reporting for active flows.

# Inactive : 斷線後結案回報
Reporting after flow termination.

Configuration - Netflow

# 設定record
[1]
en
conf t
  flow record CUSTOM1
    match ipv4 destination address
    collect counter bytes
    collect counter packets

# 設定exporter
[2]
en
conf t
  flow exporter CUSTOM1
    destination 10.3.3.100
    source Loopback0
    transport udp 2055

# 設定monitor
[3]
en
conf t
  flow monitor CUSTOM1
    record CUSTOM1
    exporter CUSTOM1

    cache timeout inactive 300
    cache timeout active 60

    end
 
# 設定sampler
[4]
en
conf t
  sampler "SAMPLER_TEST"
    mode 1 out-of 1024


# 套用monitor, sampler在介面上
[5]
en
conf t
  inter ether 0/1
    ip flow monitor "CUSTOM1" sampler "SAMPLER_TEST" input/output

Check

# 確認flow record參數
show flow record "NAME"

# 確認flow exporter參數
show flow exporter "NAME"

# 確認flow monitor參數
show flow minitor "NAME" 

# 確認flow monitor流量狀態
show flow monitor "NAME" statistic

# 確認flow套用介面
show flow interface

# 確認sampler
show sampler "NAME"