はじめに
ASAのdebugコマンドは、TelnetやSSHセッションなど、基本 実行時の セッションが終了すると そのデバッグも停止いたます。debug収集の注意事項として、デバッグ実行時のセッションを終了しても debugを取り続けたい場合は、以下の「 logging debug-trace persistent 」コマンド有効化が必要です。本コマンドは、ASAバージョン 9.5(2) より 追加されましてた。
ASAv(config)# logging debug-trace persistent
設定前
例え 以下の様に debug実行後、その SSHセッションを終了すると debugも停止します。再度接続後、show debug結果より デバッグが停止されていることが確認できます。
ASAv# debug icmp trace << debug実行
debug icmp trace enabled at level 1
ASAv# show debug << debug確認
debug icmp trace enabled at level 1
ASAv# exit << セッション終了、デバッグ停止
** 再接続
ASAv# show debug
ASAv#
設定後
本コマンドの有効化後、デバッグを実施したします。すると、以下の様に show debug結果 ‘(persistent)’と表示され、実行時のセッションを終了しても debugが停止されず、動作し続けることが確認できます。
ASAv# configure terminal
ASAv(config)# logging debug-trace persistent << コマンド有効化
INFO: 'logging debug-trace' is enabled. All debug messages are currently being redirected to syslog:711001 and will not appear in any monitor session
ASAv# debug icmp trace << debug実行
INFO: 'logging debug-trace' is enabled. All debug messages are currently being redirected to syslog:711001 and will not appear in any monitor session
debug icmp trace enabled at level 1
ASAv# show debug << debug確認
debug icmp trace enabled at level 1
debug icmp trace enabled at level 1 (persistent)
ASAv# exit << セッション終了
** 再接続
ASAv# show debug
debug icmp trace enabled at level 1 (persistent)
ASAv#
参考資料
ASA: logging debug-traceを活用したトラブルシューティング
https://community.cisco.com/t5/-/-/ta-p/3146529
Cisco ASA Series Command Reference, I - R Commands
https://www.cisco.com/c/ja_jp/td/docs/security/asa/asa-command-reference/I-R/cmdref2/l2.html