EPCを使用したパケットキャプチャ
IOS12.4(20)T以降からEPC(Embedded Packet Capture)機能を使うことで、
Ciscoルータ単体で 102400Kbytesまでのパケットキャプチャを実行し、Wiresharkで
取得したパケットを確認できます。
本機能はキャプチャ用のPCを別途用意できないような場合に有効ですが、
ルータの負荷を低減するためにACLによって必要最低限のパケットのみ取得することを
推奨致します。
【EPCの設定】
RT# monitor capture buffer <buffer name> size <size>
キャプチャ名とバッファサイズを定義します。
RT# monitor capture buffer <buffer name> filter access-list <acl name>
ACLによりキャプチャ対象を絞ります。
RT# monitor capture point ip cef <capture name> <interface-name> both
対象インターフェースを定義します。
RT# monitor capture point associate <capture name> <buffer name>
キャプチャ名とバッファを紐付けます。
RT# monitor capture point start <capture name>
キャプチャを開始します。
RT# monitor capture point stop <capture name>
キャプチャを終了します。
RT# monitor capture buffer <buffer name> export <file path>
取得したファイルをエクスポートします。
【EPCの設定例】
RT(config)# access-list 101 permit tcp host 172.16.0.1 host 192.168.0.1
RT(config)# exit
RT# monitor capture buffer capbuffer size 512
RT# monitor capture buffer capbuffer filter access-list 101
RT# monitor capture point ip cef pobuffer fastether1/0/1 both
RT# monitor capture point associate pobuffer capbuffer
RT# monitor capture point start <capture name>