エクスポート前のMおよびT Seriesルーターでのcflowdフローのロギング
cflowdフローをエクスポートする前にログファイルに収集するには、[edit forwarding-options sampling output flow-server hostname]階層レベルでlocal-dumpステートメントを含めます。
[edit forwarding-options sampling output flow-server hostname] local-dump;
デフォルトでは、フローは /var/log/sampled に収集されます。ファイル名を変更するには、[edit forwarding-options sampling traceoptions]階層レベルでfilenameステートメントを含めます。ファイル名の変更の詳細については、トラフィック サンプリング出力の設定を参照してください。
手記:
local-dump ステートメントは余分なオーバーヘッドを追加するため、通常の操作中ではなく、cflowd の問題をデバッグしているときにのみ使用してください。
以下は、フロー情報の例です。エクスポートされたAS番号は送信元AS番号です。cflowdヘッダーに属するすべてのフローがダンプされ、その後にヘッダー自体がダンプされます。
Jun 27 18:35:43 v5 flow entry Jun 27 18:35:43 Src addr: 192.0.2.1 Jun 27 18:35:43 Dst addr: 198.51.100.15 Jun 27 18:35:43 Nhop addr: 198.51.100.240 Jun 27 18:35:43 Input interface: 5 Jun 27 18:35:43 Output interface: 3 Jun 27 18:35:43 Pkts in flow: 15 Jun 27 18:35:43 Bytes in flow: 600 Jun 27 18:35:43 Start time of flow: 7230 Jun 27 18:35:43 End time of flow: 7271 Jun 27 18:35:43 Src port: 26629 Jun 27 18:35:43 Dst port: 179 Jun 27 18:35:43 TCP flags: 0x10 Jun 27 18:35:43 IP proto num: 6 Jun 27 18:35:43 TOS: 0xc0 Jun 27 18:35:43 Src AS: 7018 Jun 27 18:35:43 Dst AS: 11111 Jun 27 18:35:43 Src netmask len: 16 Jun 27 18:35:43 Dst netmask len: 0
[...バージョン 5 フロー エントリー 41 個。次に、次のヘッダー:]
Jun 27 18:35:43 cflowd header: Jun 27 18:35:43 Num-records: 42 Jun 27 18:35:43 Version: 5 Jun 27 18:35:43 low seq num: 118 Jun 27 18:35:43 Engine id: 0 Jun 27 18:35:43 Engine type: 3