2016-04-26 12:58 AM 2017-08-29 06:14 PM 更新
本ドキュメントでは、CUCM (Cisco Unified Communications Manager) の utils network capture-rotate コマンドでパケットキャプチャを収集する方法を紹介します。
バージョン 10 以前は連続で 100000 パケットまでしかキャプチャできませんでしたが、バージョン 11.0(1) 以降はログローテーション機能が実装され、長期間のキャプチャが可能になりました。取得したパケットキャプチャは Wireshark ツールで確認することができます。
CUCM 上で取得されるパケットキャプチャは Common (Logging) パーティションに保存されます。事前に十分な空き容量があることを確認してください。
admin:show status Host Name : cucm110p Date : Mon Apr 25, 2016 22:54:09 Time Zone : Japan Standard Time (Asia/Tokyo) Locale : en_US.UTF-8 Product Ver : 11.0.1.10000-10 Unified OS Version : 6.0.0.0-2 Uptime: 22:54:11 up 109 days, 11:44, 1 user, load average: 1.63, 1.73, 1.70 CPU Idle: 44.44% System: 24.24% User: 30.81% IOWAIT: 00.51% IRQ: 00.00% Soft: 00.00% Memory Total: 3925660K Free: 112196K Used: 3813464K Cached: 703684K Shared: 237188K Buffers: 60656K Total Free Used Disk/active 14154228K 1291616K 12717484K (91%) Disk/inactive 14154228K 13393148K 35424K (1%) Disk/logging 49573612K 27147136K 19901548K (43%) |
SSH で CUCM にログインし、utils network capture-rotate コマンドによってパケットキャプチャを取得します。
引数の説明
<必須>
<オプション>
admin:utils network capture-rotate ? Syntax: utils network capture-rotate [options] options mandatory file fname options optional size bytes,sizePerFile megabytes, maxFiles num,src addr,dest addr,port num,host protocol addr options are file fname - output the information to a file Note: The file will be saved in platform/cli/fname fname should not contain the "." character size bytes - the number of bytes of the packet to capture Note: Valid values include any number up to 65535 or ALL. The default will be ALL. sizePerFile megabytes - the sizePerFile sets the value for the size of the log files. ( Unit is millions of bytes ) Note: The default value of sizePerFile is 25 MB. maxFiles num - the maxFiles indicates the maximum number of log files to be created. Note: The default value of maxFiles is 10. src addr - the source address of the packet as a host name or IPV4 address dest addr - the destination address of the packet as a host name or IPV4 address port num - the port number of the packet (either src or dest) host protocol addr - the protocol should be one of the following: ip/arp/rarp/all. The host address of the packet as a host name or IPV4 address. This option will display all packets to and fro that address. Note: If 'host' is provided, do not provide 'src' or 'dest' |
file 名に capture を指定した場合のコマンドの実行例は以下のとおりです。Ctrl-C でキャプチャを終了します。
admin:utils network capture-rotate file capture Available common partition disk space 26506M Projected disk usage from capture 250M Total common partition size 48412M Projected common partition utilization after capture is 40%. The configured common partition low water mark is 90%. For any given set of parameters, utilization must remain below 85%. Note: Current disk utilization from packet captures is 248K. Packet captures will remain on disk until deleted. It is recommended to delete these captures periodically. To list all captures, please run 'file list activelog platform/cli/*.cap*' To download captures, please run 'file get activelog platform/cli/*.cap*' To delete captures, please run 'file delete activelog platform/cli/*.cap*' Executing command with options: size=65535 interface=eth0 sizePerFile=25 maxFiles=10 src= dest= port= ip= Control-C pressed <<< Ctrl-C で終了します。 |
(特定のホストを除外する場合は IP アドレスの前に ! を入力します)
admin:utils network capture-rotate file capture port 5060 host ip !192.168.99.1 Available common partition disk space 26496M Projected disk usage from capture 250M Total common partition size 48412M <省略> Executing command with options: size=65535 interface=eth0 sizePerFile=25 maxFiles=10 src= dest= port=5060 ip=!192.168.99.1 |
admin:utils network capture-rotate file capture sizePerFile 200 maxFiles 50 Available common partition disk space 26762M Projected disk usage from capture 10000M Total common partition size 48412M <省略> Executing command with options: size=65535 interface=eth0 sizePerFile=200 maxFiles=50 src= dest= port= ip= |
下記のコマンドでキャプチャファイルの一覧を表示できます。date detail オプションによって日付やサイズの情報を表示できます。
admin:file list activelog platform/cli/*.cap* date detail 25 Apr,2016 23:44:19 24 capture.cap0 dir count = 0, file count = 1 admin: |
下記のコマンドで CUCM から SFTP サーバにキャプチャファイルをダウンロードできます。
admin:file get activelog platform/cli/*.cap* Please wait while the system is gathering files info ...done. Sub-directories were not traversed. Number of files affected: 1 Total size in Bytes: 406642 Total size in Kbytes: 397.11133 Would you like to proceed [y/n]? y SFTP server IP: 192.168.99.1 SFTP server port [22]: User ID: cisco Password: ***** Download directory: / The authenticity of host '192.168.99.1 (192.168.99.1)' can't be established. RSA key fingerprint is fc:a8:a0:0f:85:c5:74:00:b8:4b:9d:33:02:e4:ce:ae. Are you sure you want to continue connecting (yes/no)? yes . Transfer completed. admin: |
RTMT (Real-Time Monitoring Tool) を起動します。System > Trace & Log Central で Collect Files 画面を開き、Packet Capture Logs にチェックをつけ、ログの期間を選択することによって、キャプチャファイルを取得することができます。
下記のコマンドでキャプチャファイルを削除できます。ファイルをダウンロードした後は削除しておくことを推奨します。
admin:file delete activelog platform/cli/*.cap* Delete the File platform/cli/capture.cap0? Enter "y" followed by return to continue: y files: found = 1, deleted = 1 admin: |
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます