Vyattaルーターのフロー出力設定

NetFlow分析を行うには、NetFlowコレクタであるオンプレミスポーラーにフローを出力するように機器を設定する必要があります。オンプレミスポーラーは特定のポートに通信を行い、フローを受信します。オンプレミスポーラーのポート番号についてはこちら

VyattaルーターのNetFlow出力設定には次の手順を行ってください。

  1. NetFlowバージョンの設定
    set system flow-accounting netflow version 9
  2. Site24x7にフローを出力するために、フローの宛先とその通信ポートとして(オンプレミスポーラーがインストールされているマシンの)IPアドレスを入力します。
    set system flow-accounting netflow server <NFA server IP> port <Port #>
    例:set system flow-accounting netflow server 192.168.0.1 port 9996
  3. 監視したい各インターフェースで次のコマンドを実行してください。
    set system flow-accounting interface <interface name>
    例:set system flow-accounting interface eth0
  4. アクティブフローのタイムアウトを1分に設定します。これはデフォルトですでに1分や60秒に設定されています。
    set system flow-accounting netflow timeout expiry-interval 60
  5. Vyattaフローアカウンティングは受信したすべてのパケットで統計が収集されている場合、リソースを大量に消費する可能性があります。別の方法としてサンプリングをオンにすることが挙げられます。ここでは、Nパケットごとに1パケットが考慮され、Nがサンプリングレートです。
    set system flow-accounting netflow sampling-rate N
    例:set system flow-accounting netflow sampling-rate 500
  6. 次のコマンドを用いて、その他の重要なVyattaフローアカウンティングパラメーターを設定します。
    set system flow-accounting netflow engine-id id (id values range between 0 – 255)
    set system flow-accounting netflow timeout max-active-life 604800
    set system flow-accounting netflow timeout flow-generic 3600
    set system flow-accounting netflow timeout tcp-fin 300
    set system flow-accounting netflow timeout tcp-generic 3600
    set system flow-accounting netflow timeout tcp-rst 120
    set system flow-accounting netflow timeout icmp 300
    set system flow-accounting netflow timeout udp 300

NetFlow設定

system {

flow-accounting {

interface <ifname> { // Please apply this on all active interface

netflow {
version 9 # Can use 5 or 9
engine-id <u32> # 0-255
server <Collector IP> {
port 9996 # user configurable

}

timeout {

expiry-interval 60
flow-generic 3600
icmp 300
max-active-life 604800
tcp-fin 300
tcp-generic 3600
tcp-rst 120
udp 300
}
}

}

}

sFlow設定

system {

flow-accounting {

sflow {
agentid <u32>
server 192.168.1.1 {
port 9996
}
}