STUDY · NETWORK GUIDE

8-1 show と debug の使い分け — 行き先・条件・packet trace・負荷

csr1000v 17.03.08a で debug の行の行き先(コンソール・バッファ・vty)と logging の既定、show との対比、conditional debug、debug に出ない通信の packet trace、片付けと負荷を撮ります。

1. 前節の振り返りと本節の内容

前節 7-6 Day 0 ZTP は、設定の無い Day 0 の csr1000v 17.03.08a に、DHCP の option が指す Python のスクリプトを HTTP・TFTP で取らせ、Guest Shell で走らせて初期設定を入れるところを撮りました。7-6 は第 7 章 Programmability 編の最後の節です。

7-6 の末尾(§17)は、第 8 章について次の予告を置いています。本節はこの予告を同じ順で受けます。

7-6 §17 の予告(逐語)本節での受け方場所
「第 7 章では、機器をプログラムから扱う方法と、設定が入る前の機器に初期設定を入れる仕組みを扱いました。次章の主題は、機器の運用とトラブルシューティングです。」第 8 章 運用/トラブル編は全 6 節で、8-1 show と debug の使い分け・8-2 SPAN / RSPAN / ERSPAN・8-3 NetFlow と Flexible NetFlow・8-4 IPSLA・8-5 Syslog と SNMP・8-6 主要トラブルパターン集の順に進みます本節が第 8 章の最初の節
「第 8 章 運用/トラブル編の最初の節 8-1 は、show と debug の使い分けを扱います。conditional debug と、安全な debug の運用が主題です。」conditional debug は IOS の debug condition で撮り(§7)、絞り方の別の形として、ACL で絞った debug ip packet(§8)と IOS XE の platform の条件で絞る packet trace(§9)を並べます。安全な運用は、行の行き先と水準(§4・§5)・片付け(§10)・負荷(§11)の 3 つで撮ります§4〜§11
「第 7 章にも、その入口がありました。本節は、Day 0 の機器の状態を show auto install trace と show pnp trace で読み、SRV1 の DHCP サーバと TFTP サーバの動きを debug ip dhcp server packet・debug ip dhcp server events・debug tftp events の行で読みました。本節では、これらを状態を読む道具として使っただけで、debug の運用の作法には触れていません。次章では、show と debug を使い分けて機器の状態を読む方法を見ていきましょう。」本節は、show と debug を同じ出来事に並べて読み(§6)、debug の行がどの記録に残るか・残らないかを記録ごとに数えます(§4・§5・§7〜§9)§4〜§9

7-6 では、SRV1 に DHCP サーバの debug(debug ip dhcp server packet と debug ip dhcp server events)を入れ、その行を SRV1 の show logging で読みました(7-6 §4.2)。debug tftp events の行も、SRV1 の show logging の抜粋で読んでいます(7-6 §9.4)。本節は、debug の行が show logging のバッファのほかにコンソールと vty(terminal monitor)へも届くかを、記録を分けて撮ります(§4)。

その前の 7-5 Embedded Event Manager(EEM) の §15.1 は、logging buffered 512000 informational(大きさは同じで水準だけを変えた形)を投入し直した後の表示に、投入の前の時刻つきの行と同じ行が 0 行だったことを撮りました。本節の §5 は、水準は debugging のまま大きさだけを 131072 → 1000000 に変えた投入を撮ります。7-5 は水準だけを、本節は大きさだけを変えた投入で、どちらも投入の後のバッファに投入の前の行は残っていませんでした。同じ値での入れ直しは、7-5 でも本節でも撮っていません。

logging trap が送る syslog のサーバ・facility・SNMP は 8-5、SPAN は 8-2、NetFlow は 8-3 の範囲で、本節は名前を出すだけにします。

本節は資料に基づく部分と、本ラボの実測に基づく部分を分けて書きます。§2 は資料だけで、本ラボの値を入れません。§3〜§12 は、各節の中で資料の段落(引用を含む)と本ラボの段落を分けます。

§13 は確かめていないこと、§14 は資料と実機が割れた所と補足です。割れた所は両方を並べ、どちらが正しいとも、何が原因とも書きません。

層どこ何を根拠にしているか
出典層§2 と、§3〜§12・§14 の資料の段落と引用Cisco の IOS の本(Basic System Management Configuration Guide, Cisco IOS Release 15M&T の Troubleshooting 章と、Debug・Configuration Fundamentals・Embedded Syslog Manager のコマンドリファレンス)・Cisco CSR 1000v and Cisco ISRv Software Configuration Guide の 3 章・Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 の 4 章・System Management Configuration Guide, Cisco IOS XE 17.x の 6 章(§17)
本ラボの run§3〜§12・§14CML 上の csr1000v 17.03.08a 2 台(R1・R2)の 1 回の run。R1・R2 とも CML の設定の RAM を 4096 MB に上書きしました。第 7 章の各節と同じ機種と版
ツール側の観測〔ツール側〕を付けた記述と出力CML の API の読み返しとコンソールの記録・取得スクリプトの判定メモ・取得スクリプトの経過秒。機器の出力そのものではない
確かめていないこと§13—

資料の版と機種は、本ラボの機器(csr1000v 17.03.08a)と合わないものがあります。IOS の本(15M&T の Troubleshooting 章と 3 種のコマンドリファレンス)は IOS の本で、IOS XE 17.3 の版の本ではありません。ISR 4000 の本は IOS XE 17 の本ですが、機種は Cisco 4000 Series ISR です。

こうした資料の文は、資料の版と機種の文として引き、引用の後にも版と機種を書きます。機器の振る舞いの根拠は、本ラボの出力だけです。

以下に貼る実機出力は改変していません。1 つのコードブロックは 1 つの取得の記録から取り、長い出力から一部を抜き出した箇所には …(省略) を置きました。取得の記録の中の、取得スクリプトが書いた〔ツール側〕の行も外しています。

プロンプトとコマンドを 1 行にまとめた表記(R1# …・R2# …)は本節の組み立てで、取得の記録ではコマンドが見出しの行として別に残っています。設定の投入は、エコーからそのまま載せます。

R1 には SSH のセッションを 3 本張りました。show・debug・ping を打つ R1 main、terminal monitor を入れて受けた文字を読む R1 mon、負荷の段で CPU を採り undebug all を打つ R1 aux の 3 本で、名前は取得スクリプトのセッションの名前〔ツール側〕です。どのセッションの出力も、プロンプトは R1# … の形で載せます。

R1 のコンソールの記録は、取得スクリプトが CML の API で読んだ記録の、窓の前と後の差分〔ツール側〕です。取得スクリプトは R1 のコンソールに何も入力していません(読むだけ)。

コンソールの記録の行頭には CML の前置き |<10 桁>|〔ツール側〕が付いており、本節はこれを外して載せます。前置きの数字の意味は決めず、時刻としても使いません。? のヘルプの出力の最後の行(R1#debug condition の形)は、? の後に機器が描き直した入力行で、取得スクリプトはこの行に改行を送っていません(Ctrl-U で消しました〔ツール側〕)。

コードブロックの直前の文には、機器と版と RAM を書きます。R1・R2 とも csr1000v 17.03.08a・RAM 4096 MB で、RAM の値は CML の設定値(〔ツール側〕CML の API の読み返し)です。機器の側の値は show version の物理メモリの行です(§3.1)。

時刻は機器の時計(UTC)で、show clock・ログの行頭・packet trace の Timestamp の値をそのまま書きます。機器の時計の日付は Sun Nov 8 2026 です。R1 と R2 の時計は別々の記録で、2 つの時計の時刻の差から秒数を出さず、2 つの時計をまたぐ前後も書きません。機器の時刻と取得スクリプトの経過秒〔ツール側〕も混ぜません。

本ラボの実測は 1 回の run の観測で、本文では「本ラボのこの run で」と書きます。本ラボの run の前に、同じ 4 ノードの構成で試しの撮影を 2 回行いました。

本節で「この機器では」と書くのは、試しの撮影(2 回のうち 1 回以上)と本ラボの run で同じ向きだった観測だけです。試しの撮影の出力は本節に載せておらず、値も引きません。負荷の値(§11)は、本ラボの run の中で 3 回くり返した round の値だけで書きます。

「出ない」「無い」は、撮った記録(コンソールの記録・show logging のバッファ・vty で受けた文字)ごとに数え、どの記録で何行かを書きます。show logging の見出しの dropped・rate-limited・overruns が窓の前後で増えた窓と、messages logged が減った窓では、「窓の中に〜の行は無い」の形では書きません(7-5 §3.2 と同じ決め)。パスワードと利用者名は本文に載せていません。


2. show と debug の位置づけ(資料が書く役割と注意)

2.1 資料と短い名前

資料は、以下の短い名前で呼びます。版と機種は資料自身の表記で、出典表(§17)にも同じ版を書いています。

短い名前資料と章版・機種(資料の表記)
15M&T の Troubleshooting 章Basic System Management Configuration Guide, Cisco IOS Release 15M&T — Troubleshooting and Fault ManagementCisco IOS Release 15M&T(IOS の本)
Debug リファレンス(A〜D)Cisco IOS Debug Command Reference - Commands A through D — debug clns esis events through debug dbconn tcp本の名前に版の表記なし(IOS の本)
Debug リファレンス(I〜L)Cisco IOS Debug Command Reference - Commands I through L — debug ip http all through debug ip rsvp本の名前に版の表記なし(IOS の本)
CF リファレンス(L〜mode)Cisco IOS Configuration Fundamentals Command Reference — L through mode本の名前に版の表記なし(IOS の本)
CF リファレンス(R〜setup)同 — R through setup同上
CF リファレンス(show gsr〜)同 — show gsr through show monitor event trace同上
CF リファレンス(show monitor permit〜)同 — show monitor permit list through show process memory同上
CF リファレンス(slave〜terminal-type)同 — slave auto-sync config through terminal-type同上
ESM リファレンスCisco IOS Embedded Syslog Manager Command Reference — A through Z Commands本の名前に版の表記なし(IOS の本)
CSR の Packet Trace 章Cisco CSR 1000v and Cisco ISRv Software Configuration Guide — Packet Trace本の名前に版の表記なし・置き場は Cisco Cloud Services Router 1000V Series
CSR の IOS XE の章同 — Using Cisco IOS XE Software同上
CSR の VM の章同 — Troubleshooting Cisco CSR 1000v VM Issues同上
ISR 4000 の Packet Trace 章Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 — Packet TraceIOS XE 17・機種は Cisco 4000 Series ISR
ISR 4000 の Trace Management 章同 — Trace Management同上
ISR 4000 の Process Health 章同 — Process Health Monitoring同上
ISR 4000 の System Messages 章同 — System Messages同上
17.x の CLI の章System Management Configuration Guide, Cisco IOS XE 17.x — Using the Cisco IOS Command-Line InterfaceIOS XE 17.x
17.x の Searching and Filtering 章同 — Searching and Filtering CLI Output同上
17.x の show Redirection 章同 — show Command Output Redirection同上
17.x の ESM 章同 — Embedded Syslog Manager (ESM)同上
17.x の Reliable Delivery 章同 — Reliable Delivery and Filtering for Syslog同上
17.x の Basic System Management 章同 — Performing Basic System Management同上

取得した 17.x の System Management の 6 章に、debug condition の文字列は 0 件です(数えた)。IOS XE 3S の Basic System Management の本の URL は、取得の時に Cisco の support の入口のページへ移りました(§17 のリダイレクトの記録)。条件付きの debug と debug の注意は、15M&T の Troubleshooting 章とコマンドリファレンス(どちらも IOS の本)から引きます。CSR の本の 3 章は csr1000v の本で、本の名前に版の表記はありません(Packet Trace 章の機能情報の表には Amsterdam 17.3.1 の行があります・§9.1)。

2.2 show

17.x の CLI の章は、EXEC モードのコマンドの多くを一回きりのコマンドと書き、例に現在の状態を見せる show と more を挙げます。EXEC モードのコマンドは、再起動の後に残りません。

Most EXEC mode commands are one-time commands, such as show or more commands, which show the current configuration status, and clear commands, which clear counters or interfaces. EXEC mode commands are not saved across reboots of the router.

(17.x の CLI の章「Cisco IOS XE CLI Command Modes Overview」・IOS XE 17.x)

CSR の IOS XE の章も、show のコマンドを、重要な状態の情報を見せる一回きりのコマンドと書きます。15M&T の Troubleshooting 章は、システムのプロセスの情報を見せる手段として show の EXEC コマンドを挙げます。

Most EXEC commands are one-time commands. For example, show commands show important status information, and clear commands clear counters or interfaces.

(CSR の IOS XE の章「Table 2. History Substitution Commands」の後の段落・csr1000v の本)

To provide information about system processes, the Cisco IOS software includes an extensive list of show EXEC commands.

(15M&T の Troubleshooting 章「Displaying System Information Using show Commands」・IOS Release 15M&T)

2.3 debug

15M&T の Troubleshooting 章は、debug を、ネットワークの出来事をコンソールに出し始める特権 EXEC のコマンドと書きます。同じ章は、問題の発見・切り分け・修正の段のうち、修正の段のコマンドに debug を含めます。

The debug privileged EXEC mode commands start the console display of several classes of network events.

(15M&T の Troubleshooting 章「Enabling Debug Operations」・IOS Release 15M&T)

To manage network faults, you need to discover, isolate, and correct problems. You can discover problems with the system monitoring commands, isolate problems with the system test commands, and resolve problems with other commands, including debug commands.

(15M&T の Troubleshooting 章「Troubleshooting and Fault Management Task List」・IOS Release 15M&T)

show が一回きりのコマンドとして書かれるのに対し、debug は出来事の表示を始めるコマンドとして書かれています(上の引用)。15M&T の Troubleshooting 章と Debug リファレンス(A〜D)は、debug の出力は高い優先度で扱われ、出し過ぎると機器が動かなくなりうるので、特定の問題の切り分けに限って使うと書きます。

The system gives high priority to debugging output. For this reason, debugging commands should be turned on only for troubleshooting specific problems or during troubleshooting sessions with technical support personnel. Excessive debugging output can render the system inoperable.

(15M&T の Troubleshooting 章「Enabling Debug Operations」の Caution・IOS Release 15M&T)

Because debugging output is assigned high priority in the CPU process, it can render the system unusable. For this reason, use debug commands only to troubleshoot specific problems or during troubleshooting sessions with Cisco technical support staff.

(Debug リファレンス(A〜D)「debug data-store」の Caution・IOS の本)

同じ Caution は、通信と利用者の少ない時間に debug を使うことも勧めます。

Moreover, it is best to use debug commands during periods of lower network flows and fewer users. Debugging during these periods reduces the effect these commands have on other users on the system.

(Debug リファレンス(A〜D)「debug data-store」の Caution・IOS の本)

2.4 show の出力の絞り込み

17.x の Searching and Filtering 章は、大量の出力を探し、要らない情報を除く手段を CLI が持つと書きます。正規表現は大小文字を区別します。

The Cisco IOS CLI provides ways of searching through large amounts of command output and filtering output to exclude information you do not need.

(17.x の Searching and Filtering 章「Chapter Contents」・IOS XE 17.x)

Regular expressions are case-sensitive and allow for complex matching requirements.

(17.x の Searching and Filtering 章「Understanding Regular Expressions」・IOS XE 17.x)

| include は正規表現を含む行だけを出します。17.x の show Redirection 章の表は、count を正規表現に当たる行の数を数えるキーワードと書きます。

Displays output lines that contain the regular expression.

(17.x の Searching and Filtering 章「Searching and Filtering show Commands」・IOS XE 17.x)

Count number of lines which match regexp

(17.x の show Redirection 章「Information About show Command Output Redirection」の表・IOS XE 17.x)

17.x の CLI の章は、画面の長さを 0 にすると出力が止まらないと書きます。

If output is pausing on your screen, but you do not see the –More– prompt, try entering a lower value for the screen length using the length line configuration command or the terminal length privileged EXEC mode command. Command output will not be paused if the length value is set to zero.

(17.x の CLI の章「Continuing Output at the –More– Prompt」・IOS XE 17.x)

17.x の show Redirection 章は、show の出力をファイルへ送る機能も書きます。

The show Command Output Redirection feature provides the capability to redirect output from Cisco IOS command-line interface (CLI) show commands and more commands to a file.

(17.x の show Redirection 章「Chapter Contents」・IOS XE 17.x)


3. 本ラボの構成

この図を大きく開く ↗

本ラボの構成です。R1 と R2 は Gi2 と Gi3 で繋がり、R2 の Gi3 と Lo1 は VRF B に入れました。管理の SSH の送り元は 172.16.1.4 です。

本ラボは、CML 上の csr1000v 2 台(R1・R2)と、管理の L2 の mgmt-sw(unmanaged_switch)と、外への接続の ext(external_connector)の 4 ノード・リンク 5 本です〔ツール側〕。debug を掛ける機器は R1 で、R2 は R1 の相手です。R2 は Gi3 と Lo1 を VRF B に入れ、R1 から見た 2 つ目の OSPF の隣接と、R1 を通過する通信を作ります。

3.1 版と RAM

R1・R2 とも、CML の node definition の RAM(3072 MB)を 4096 MB に上書きしてから起動し、読み返しで 4096 を確かめました〔ツール側〕。R1(csr1000v 17.03.08a・RAM 4096 MB)の show version の抜粋は以下のとおりです。

snippet
R1# show version
Cisco IOS XE Software, Version 17.03.08a
Cisco IOS Software [Amsterdam], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.3.8a, RELEASE SOFTWARE (fc3)
…(省略)
cisco CSR1000V (VXE) processor (revision VXE) with 2071576K/3075K bytes of memory.
…(省略)
3978424K bytes of physical memory.
…(省略)

R2(csr1000v 17.03.08a・RAM 4096 MB)は、版と物理メモリの行だけを絞って撮りました。表示は以下のとおりです。

snippet
R2# show version | include Version|physical memory
Cisco IOS XE Software, Version 17.03.08a
Cisco IOS Software [Amsterdam], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.3.8a, RELEASE SOFTWARE (fc3)
licensed under the GNU General Public License ("GPL") Version 2.0.  The
software code licensed under GPL Version 2.0 is free software that comes
GPL code under the terms of GPL Version 2.0.  For more details, see the
3978408K bytes of physical memory.

物理メモリの行の値は R1 が 3978424K・R2 が 3978408K で、2 台で同じではありません。この値は機種や版の性質としては扱わず、CML の設定の 4096 MB との関係も確かめていません(§13)。

3.2 アドレスと OSPF

アドレスは以下のとおりです。VRF の欄の Mgmt-vrf は day0 の設定の値〔ツール側〕で、R2 の VRF B は下の show ip route vrf B の表で確かめた値です。

機器IFVRFアドレス
R1Gi1Mgmt-vrf172.16.1.241
R1Gi2global10.81.12.1(10.81.12.0/24)
R1Gi3global10.81.13.1(10.81.13.0/24)
R1Lo0global10.81.0.1/32
R2Gi1Mgmt-vrf172.16.1.242
R2Gi2global10.81.12.2
R2Gi3B10.81.13.2
R2Lo0global10.81.0.2/32
R2Lo1B10.81.0.3/32

R1(csr1000v 17.03.08a・RAM 4096 MB)の show ip interface brief は以下のとおりです。

snippet
R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       172.16.1.241    YES TFTP   up                    up
GigabitEthernet2       10.81.12.1      YES TFTP   up                    up
GigabitEthernet3       10.81.13.1      YES TFTP   up                    up
Loopback0              10.81.0.1       YES TFTP   up                    up

R2(csr1000v 17.03.08a・RAM 4096 MB)の show ip interface brief は以下のとおりです。

snippet
R2# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet1       172.16.1.242    YES TFTP   up                    up
GigabitEthernet2       10.81.12.2      YES TFTP   up                    up
GigabitEthernet3       10.81.13.2      YES TFTP   up                    up
Loopback0              10.81.0.2       YES TFTP   up                    up
Loopback1              10.81.0.3       YES TFTP   up                    up

R1 の OSPF は process 1 です(%OSPF-5-ADJCHG: Process 1 の行・§6.3)。R1 の OSPF の隣接は 2 つで、10.81.0.2(R2 の global)が Gi2 の先、10.81.0.3(R2 の VRF B)が Gi3 の先です。R1(csr1000v 17.03.08a・RAM 4096 MB)の show ip ospf neighbor は以下のとおりです。

snippet
R1# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   FULL/DR         00:00:36    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:36    10.81.12.2      GigabitEthernet2

R2 からは、どちらの隣接も Neighbor ID 10.81.0.1(R1)です。R2(csr1000v 17.03.08a・RAM 4096 MB)の show ip ospf neighbor は以下のとおりです。

snippet
R2# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.1         1   FULL/BDR        00:00:32    10.81.12.1      GigabitEthernet2
10.81.0.1         1   FULL/BDR        00:00:32    10.81.13.1      GigabitEthernet3

R2 の VRF B の表では、global の側の 10.81.0.2/32 と 10.81.12.0/24 が R1(10.81.13.1)の先です。R2(csr1000v 17.03.08a・RAM 4096 MB)の show ip route vrf B の抜粋は以下のとおりです。

snippet
R2# show ip route vrf B

Routing Table: B
…(省略)
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O        10.81.0.1/32 [110/2] via 10.81.13.1, 00:00:52, GigabitEthernet3
O        10.81.0.2/32 [110/3] via 10.81.13.1, 00:00:52, GigabitEthernet3
C        10.81.0.3/32 is directly connected, Loopback1
O        10.81.12.0/24 [110/2] via 10.81.13.1, 00:00:52, GigabitEthernet3
C        10.81.13.0/24 is directly connected, GigabitEthernet3
L        10.81.13.2/32 is directly connected, GigabitEthernet3

R2 の Lo0(global)から Lo1(VRF B)への通信は、R1 を通ります。R2(csr1000v 17.03.08a・RAM 4096 MB)の traceroute は以下のとおりです。

snippet
R2# traceroute 10.81.0.3 source Loopback0 numeric timeout 1 probe 1
Type escape sequence to abort.
Tracing the route to 10.81.0.3
VRF info: (vrf in name/id, vrf out name/id)
  1 10.81.12.1 1 msec
  2 10.81.13.2 3 msec

1 hop 目が R1 の Gi2(10.81.12.1)、2 hop 目が R2 の Gi3(10.81.13.2)です。§9 の「R1 を通過する通信」は、この R2 の Lo0 から Lo1 への ping です。

3.3 day0 とログの設定

CML の day0 の設定には、ログの設定(logging の行)を入れていません〔ツール側〕。起動した直後の素の running-config で、行頭が logging か no logging の行は 0 行でした(数えた)。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show running-config | include ^logging|^service timestamps|^no logging|^service
service timestamps debug datetime msec
service timestamps log datetime msec
service call-home

service timestamps debug datetime msec と service timestamps log datetime msec は、day0 に入れていない行(起動した直後の running-config に在った行)です。以降に載せるログの行頭の時刻(*Nov で始まりミリ秒までの形)は、この 2 行が running-config に在る状態で撮ったものです。

3.4 撮影の段階と管理の SSH

撮影は段階に分け、1 本の取得スクリプトで続けて撮りました。段の名前は取得スクリプトの名前〔ツール側〕で、図の文言(P2・P3・P4 など)も同じ名前です。

段内容本文
P0版・RAM・既定のログの設定・show debugging・OSPF・ping・traceroute・CPU§3・§4.2
P1? のヘルプ 45 本§4.2・§7.2・§8.2・§9.3・§11.6・§12
P2debug ip icmp の行の行き先(コンソール・バッファ・vty)と R2 → R1 の ping§4.3
P3logging buffered と logging console の投入と、console が informational の間の窓§5
P4R2 の Gi3 の shutdown と no shutdown の間の show と debug§6
P5条件付き debug・ACL で絞った debug ip packet・ACL なしの debug ip packet§7・§8
P6通過の通信と R2 → R1 の ping の packet trace・platform の条件の片付け§9・§10
P9負荷(4 つの run を 3 round)§11
PZ片付けの確認§10

取得スクリプトは、R1 main・R1 mon・R1 aux のどの SSH も、張った直後に terminal length 0 と terminal width 250 を送っています〔ツール側〕。R1 main の show terminal の Length の行は以下のとおりです(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show terminal
Line 1, Location: "", Type: "vt100"
Length: 0 lines, Width: 250 columns
…(省略)

SSH の送り元は 172.16.1.4(取得スクリプトを走らせたノード)で、R1 の Gi1(172.16.1.241)の port 22 へ張りました〔ツール側〕。172.16.1.4 を含む行は、R1 の ACL なしの debug ip packet の行にも出ました(§8.3・§11.3)。その行が SSH の通信だと port(TCP 22)で読めるのは、§11.3 の detail の行だけです。


4. debug の行の行き先

4.1 資料の行き先と水準

15M&T の Troubleshooting 章は、ログのプロセスが、ログのバッファ・端末の line・syslog のサーバなどへ行を配り、コンソールにも送ると書きます。同じ章の debug の節は、debug の行は普通はコンソールの端末だけに出ると書きます。

The logging process controls the distribution of logging messages to various destinations, such as the logging buffer, terminal lines, or a UNIX syslog server, depending on your configuration. The process also sends messages to the console. When the logging process is on, the messages are displayed on the console after the process that generated them has finished.

(15M&T の Troubleshooting 章「Logging System Messages」・IOS Release 15M&T)

Normally, the messages are displayed only on the console terminal. Refer to the section “Setting the Syslog Destination” earlier in this chapter to change the output device.

(15M&T の Troubleshooting 章「Enabling Debug Operations」・IOS Release 15M&T)

同じ章は、既定の水準を、コンソールが debugging 以下の全部・monitor も debugging・trap が informational と書きます。

The default is to log messages to the console at the debugging level and those level numbers that are lower, which means all levels. The logging monitor command defaults to debugging also. The logging trap command defaults to the informational level.

(15M&T の Troubleshooting 章「Limiting the Error Message Severity Level and Facilities」・IOS Release 15M&T)

CF リファレンス(slave〜terminal-type)は、terminal monitor を、今の端末とセッションに debug とエラーの行を出す EXEC のコマンドと書きます。端末の設定はそのセッションの間だけで、終われば残りません。

To display debug command output and system error messages for the current terminal and session, use the terminal monitor command in EXEC mode.

(CF リファレンス(slave〜terminal-type)「terminal monitor」・IOS の本)

Remember that all terminal parameter-setting commands are set locally and do not remain in effect after a session is ended.

(CF リファレンス(slave〜terminal-type)「terminal monitor」・IOS の本)

CF リファレンス(show gsr〜)の show logging の頁は、バッファが 7(debugging)を含めば debug の行がバッファに入り、その行は % で始まらないと書きます。

If debugging is enabled (using any debug command), and the logging buffer is configured to include level 7 (debugging) messages, debug output will be included in the system log. Debugging output is not formatted like system error messages and will not be preceded by the percent symbol (%).

(CF リファレンス(show gsr〜)「show logging」・IOS の本)

ESM リファレンスの logging console の頁は、logging console がコンソールの TTY だけでなく機器の全部の TTY の line を含むと書きます。

The logging console command includes all the TTY lines in the device, not only the console TTY. For example, if you are running the debug ip rip command from a Telnet session to a VTY TTY on a router and you configure no logging console, the debugging messages will not appear in your Telnet command-line interface (CLI) session.

(ESM リファレンス「logging console」の Usage Guidelines・IOS の本)

4.2 既定のログの設定

本ラボの R1 は、day0 にログの設定を入れずに起動しました(§3.3)。この機器では、起動した直後の show running-config all の logging と service timestamps の行は以下の 33 行でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show running-config all | include ^logging|^service timestamps|^no logging
service timestamps debug datetime msec
service timestamps log datetime msec
no logging discriminator
logging exception 4096
no logging count
no logging message-counter log
no logging message-counter debug
logging message-counter syslog
no logging snmp-authfail
no logging userinfo
logging buginf
logging queue-limit 1024
logging queue-limit esm 0
logging queue-limit trap 1024
logging buffered 131072 debugging
logging reload message-limit 1000 notifications
no logging persistent
logging rate-limit console 40 except errors
no logging console guaranteed
logging console debugging
logging monitor debugging
logging cns-events informational
logging on
logging esm config
logging history size 1
logging history warnings
no logging alarm
logging trap informational
logging delimiter tcp
no logging origin-id
logging facility local7
no logging source-interface
logging server-arp

行き先ごとの水準は、コンソールが logging console debugging、vty(monitor)が logging monitor debugging、バッファが logging buffered 131072 debugging です。syslog のサーバへの水準は logging trap informational で、送り先の設定は 8-5 の範囲です。

上の表示は、show running-config all の出力を | include で絞ったものです。R1 の show running-config | の ? のヘルプには、include・count・section などの 9 個が並びました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show running-config | ?
  append    Append redirected output to URL (URLs supporting append operation only)
  begin     Begin with the line that matches
  count     Count number of lines which match regexp
  exclude   Exclude lines that match
  format    Format the output using the specified spec file
  include   Include lines that match
  redirect  Redirect output to URL
  section   Filter a section of output
  tee       Copy output to URL

R1#show running-config |

資料と割れる所は以下の 5 つです。資料の側の文は表の後に引きます。どちらが正しいとは書きません(一覧は §14.6)。

項目資料(版)本ラボの R1 の running-config all
バッファ多くの platform で既定は無効(CF リファレンス(L〜mode)・IOS の本)logging buffered 131072 debugging
コンソールの保証既定で有効(ESM リファレンス・IOS の本)no logging console guaranteed
rate-limit の数既定は 1 秒に 10(ESM リファレンス・IOS の本)logging rate-limit console 40 except errors
logger の queue既定は 100(ESM リファレンス・IOS の本。同じ頁は、既定の queue の大きさは機器の platform によって変わると書く)logging queue-limit 1024
行き先debug の行は普通はコンソールだけ(15M&T の Troubleshooting 章)バッファにも出た(§4.3)

Varies by platform. For most platforms, logging to the buffer is disabled by default.

(CF リファレンス(L〜mode)「logging buffered」の Command Default・IOS の本)

Guaranteed logging to the console is enabled by default.

(ESM リファレンス「logging console guaranteed」の Command Default・IOS の本)

Number of messages to be logged per second. Valid values are 1 to 10000. The default is 10.

(ESM リファレンス「logging rate-limit」の構文の説明・IOS の本)

(Optional) The number of messages in the logger queue. The valid range is 100 to 2147483647. The default is 100.

(ESM リファレンス「logging queue-limit」の構文の説明・IOS の本)

起動した直後の show logging の見出しは、コンソール・vty(Monitor)・バッファの 3 つが level debugging で、バッファの大きさは 131072 バイトでした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging の見出しの部分は以下のとおりです。

snippet
R1# show logging
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.



No Inactive Message Discriminator.


    Console logging: level debugging, 68 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 68 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled
    Persistent logging: disabled

No active filter modules.

    Trap logging: level informational, 69 message lines logged
        Logging Source-Interface:       VRF Name:
    TLS Profiles:

Log Buffer (131072 bytes):
…(省略)

見出しの messages logged の数は、記録の行の数としては使いません(§14.1)。何も debug を入れていない時の show debugging は以下のとおりで、IOSXE の条件付き debug の段(Global State)と packet trace の段の見出しだけが在ります(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

4.3 debug ip icmp の行が届いた記録

P2 は、R1 main で clear logging の後に debug ip icmp を入れ、R1 が送る ping の返事の行が、コンソールの記録・バッファ・vty のどれに届くかを撮りました。vty は R1 mon で、R1 mon に terminal monitor を入れる前と後で 2 回撮っています。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug ip icmp の返事は以下のとおりです。

snippet
R1# debug ip icmp
ICMP packet debugging is on

その後の show debugging には、Generic IP: の段に ICMP packet debugging is on の行が足されました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

Generic IP:
  ICMP packet debugging is on

R1 main から R2 の Gi2(10.81.12.2)と Gi3(10.81.13.2)へ ping を 5 本ずつ送り、どちらも 5/5 でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目の ping は以下のとおりです。

snippet
R1# ping 10.81.12.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の 2 本目の ping(VRF B の側の Gi3)は以下のとおりです。

snippet
R1# ping 10.81.13.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.13.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

この 2 本の ping の後、terminal monitor を入れる前の R1 mon の窓(10 秒)の受信は 0 文字でした〔ツール側〕。続いて R1 mon で terminal monitor を入れました。R1(csr1000v 17.03.08a・RAM 4096 MB)の R1 mon の返事は以下のとおりです。

snippet
R1# terminal monitor
R1#

R1 main から同じ 2 本の ping をもう一度送った後、R1 mon の窓(10 秒)は 10 行を受けました。R1(csr1000v 17.03.08a・RAM 4096 MB)の R1 mon が受けた文字(取得スクリプトが 10 秒溜めて読んだもの〔ツール側〕)は以下のとおりです。

snippet
*Nov  8 12:09:00.072: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.073: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.074: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.075: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.077: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.346: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.347: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.349: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.350: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.352: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

R1 のコンソールの記録には、P2 の窓の間に 21 行が足されました。20 行が ICMP: echo reply rcvd の行、1 行がログインの %SEC_LOGIN-5-LOGIN_SUCCESS の行(利用者名を含むので省略)です。R1(csr1000v 17.03.08a・RAM 4096 MB)のコンソールの記録(窓の前と後の差分〔ツール側〕)は以下のとおりです。

snippet
…(省略)
*Nov  8 12:08:40.103: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.105: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.106: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.107: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.109: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.376: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.378: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.379: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.380: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.381: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.072: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.073: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.074: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.075: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.077: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.346: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.347: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.349: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.350: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.352: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

undebug all の後の show logging のバッファにも、同じ 21 行が同じ順に在りました(行頭の前置きを外したコンソールの記録と突き合わせた)。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging は以下のとおりです。

snippet
R1# show logging
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.



No Inactive Message Discriminator.


    Console logging: level debugging, 110 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 20 messages logged, xml disabled,
                     filtering disabled
        Logging to: vty2(20)
    Buffer logging:  level debugging, 110 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled
    Persistent logging: disabled

No active filter modules.

    Trap logging: level informational, 71 message lines logged
        Logging Source-Interface:       VRF Name:
    TLS Profiles:

Log Buffer (131072 bytes):

…(省略)
*Nov  8 12:08:40.103: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.105: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.106: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.107: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.109: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.376: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.378: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.379: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.380: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:42.381: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.072: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.073: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.074: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.075: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:00.077: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.346: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.347: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.349: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.350: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:09:02.352: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

ICMP: の行を記録ごとに数えると、以下のとおりでした。

時刻(R1 の時計)の組コンソールの記録バッファvty(R1 mon の受信)
12:08:40 と 12:08:42 の 10 行(terminal monitor の前の ping)10 行10 行0 行
12:09:00 と 12:09:02 の 10 行(terminal monitor の後の ping)10 行10 行10 行

この機器では、vty には terminal monitor を入れた後にだけ debug の行が届きました。terminal monitor の前の ping の行(12:08:40 と 12:08:42 の組)は、P2 で撮った R1 mon の受信のどれにも在りません。P2 の窓の前後の show logging の見出しで、dropped・rate-limited・overruns は増えていません〔ツール側〕。

show logging の見出しには Logging to: vty2(20) の行が出ました。この 20 と、R1 mon の受信の 10 行の関係は確かめていません(§13)。R1 mon は、P2 の終わりに terminal no monitor を入れました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# terminal no monitor
R1#

4.4 R2 → R1 の ping(対照)

debug ip icmp を入れたままの間に、R2 から R1 へ ping を 5 本ずつ 2 か所に送りました。R2(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目は以下のとおりです。

snippet
R2# ping 10.81.12.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

R2(csr1000v 17.03.08a・RAM 4096 MB)の 2 本目(VRF B から R1 の Gi3)は以下のとおりです。

snippet
R2# ping vrf B 10.81.13.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

この機器では、R2 → R1 の ping の行は、R1 の debug ip icmp の撮った 3 つの記録のどれにもありませんでした。本ラボのこの run での数は以下のとおりです。

  • vty: R2 の ping の後の R1 mon の窓(terminal monitor は入ったまま)の受信は 0 文字〔ツール側〕
  • バッファ: undebug all の後の show logging のバッファの最後の行は、R2 の ping より前に R1 mon が受けた最後の行と同じ 12:09:02.352 の行
  • コンソールの記録: 窓の差分の最後の行も、同じ 12:09:02.352 の行
  • 行の形でも数えた: 3 つの記録の ICMP: の行は全部 echo reply rcvd の行で、echo reply sent の行と、src が 10.81.12.1・10.81.13.1 の行は 0 行

R2 の ping は、R1 mon の窓(12:09:02 の組を受けた窓)の後・undebug all の前に送りました(取得の順〔ツール側〕)。R2 の時計と R1 の時計は並べていません。行が無かった理由は、この段では撮っていません。§9 の packet trace で、同じ向き(R2 → R1)の ping の packet の State と Reason の列を見ます。

R2 → R1 の ping の行が無かった記録は、コンソール・バッファ・vty の 3 つで、P2 の窓の前後の見出しに dropped などの増えはありません〔ツール側〕。

この図を大きく開く ↗

debug ip icmp の行が、コンソールの記録・バッファ・vty のどれに届いたかを、P2 と P3 の窓ごとに並べた図です。件数は描いていません。

5. ログの水準とバッファの大きさの変更

5.1 資料のバッファ

15M&T の Troubleshooting 章は、logging buffered を内部の循環のバッファへ行を写すコマンドと書きます。バッファが満ちると、新しい行が古い行を上書きします。

The logging buffered command copies logging messages to an internal buffer. The buffer is circular, so newer messages overwrite older messages after the buffer is full. To display the messages that are logged in the buffer, use the show logging EXEC command. The first message displayed is the oldest message in the buffer. To clear the current contents of the buffer, use the clear logging privileged EXEC command.

(15M&T の Troubleshooting 章「Setting the Syslog Destination」・IOS Release 15M&T)

CF リファレンス(L〜mode)は、バッファの大きさを変えると今のバッファは解放され、新しいバッファが割り当てられると書きます。show logging の Log Buffer の行の括弧の数は、logging buffered の大きさに当たります。

When you resize the logging buffer, the existing buffer is freed and a new buffer is allocated. To prevent the router from running out of memory, do not make the buffer size too large.

(CF リファレンス(L〜mode)「logging buffered」の Usage Guidelines・IOS の本)

The value in parentheses corresponds to the configuration of the logging buffered buffer-size command. If no messages are currently in the buffer, the output ends with this line. If messages are stored in the syslog buffer, they appear after this line.

(CF リファレンス(show gsr〜)「Table 7. show logging Field Descriptions」・IOS の本)

Debug リファレンス(A〜D)の debug crm の頁は、debug の前にコンソールへのログを止め、バッファへのログを使うよう書きます。この文は debug crm の頁の文です。

Disable console logging and use buffered logging before using the debugcrm command. Using the debugcrm command generates a large volume of debugs, which can affect router performance.

(Debug リファレンス(A〜D)「debug crm」の Usage Guidelines・IOS の本)

5.2 大きさだけを変えた投入

P3 は、R1 で水準は debugging のまま、バッファの大きさだけを 131072 → 1000000 に変え、同時にコンソールの水準を informational にしました。投入の前のバッファには、P2 の 21 行が在りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の投入の前の show logging の抜粋は以下のとおりです。

snippet
R1# show logging
…(省略)
    Console logging: level debugging, 110 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 20 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 110 messages logged, xml disabled,
                    filtering disabled
…(省略)
Log Buffer (131072 bytes):

…(省略)
*Nov  8 12:08:40.103: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:08:40.105: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
…(省略)
*Nov  8 12:09:02.352: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

R1(csr1000v 17.03.08a・RAM 4096 MB)の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#logging buffered 1000000 debugging
R1(config)#logging console informational
R1(config)#service timestamps debug datetime msec
R1(config)#end
R1#

投入の 3 行のうち service timestamps debug datetime msec は、day0 に入れていない行(起動した直後の running-config に在った行)を入れ直したものです。投入の後の素の running-config は以下の 4 行で、バッファの行は logging buffered 1000000 の形(debugging の語が無い形)でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show running-config | include ^logging|^service timestamps|^no logging
service timestamps debug datetime msec
service timestamps log datetime msec
logging buffered 1000000
logging console informational

この機器では、logging buffered 1000000 debugging の投入の後のバッファに、投入の前のバッファの行は 1 行も残っていませんでした。本ラボのこの run では、投入の前の 21 行のうち、投入の後のバッファに在る行は 0 行です(行を突き合わせた)。投入の後のバッファの行は、投入の syslog の 2 行と設定の syslog の 1 行(%SYS-5-CONFIG_I・利用者名を含むので省略)だけでした。R1(csr1000v 17.03.08a・RAM 4096 MB)の投入の後の show logging は以下のとおりです。

snippet
R1# show logging
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.



No Inactive Message Discriminator.


    Console logging: level informational, 113 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 20 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 3 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled
    Persistent logging: disabled

No active filter modules.

    Trap logging: level informational, 74 message lines logged
        Logging Source-Interface:       VRF Name:
    TLS Profiles:

Log Buffer (1000000 bytes):

*Nov  8 12:09:59.007: %SYS-5-LOG_CONFIG_CHANGE: Buffer logging: level debugging, xml disabled, filtering disabled, size (1000000)
*Nov  8 12:10:02.318: %SYS-5-LOG_CONFIG_CHANGE: Console logging: level informational, xml disabled, filtering disabled
…(省略)

投入の前と後で、見出しの Buffer の messages logged は 110 → 3 に変わりました。この区間は、バッファの中身の突き合わせとして書いています。3 行の投入は 1 回の設定モードで入れたので、どの行の投入の後にバッファの行が入れ替わったかは分けていません(§13)。

7-5 §15.1 の投入は大きさは同じで水準だけを変えた形(logging buffered 512000 informational)で、投入の後の表示に投入の前の行は 0 行でした。7-5 は水準だけを、本ラボは大きさだけを変えた投入です。同じ値(同じ大きさと同じ水準)での入れ直しは、7-5 でも本ラボでも撮っていません。

5.3 コンソールが informational の間の窓

投入の後、clear logging → debug ip icmp → R1 の ping 2 本 → R1 mon の terminal monitor → R1 の ping 2 本 → R1 mon の窓(10 秒)→ terminal no monitor → undebug all → show logging の順に撮りました。窓の間の水準は、コンソールが informational・vty(Monitor)とバッファが debugging です。

R1 mon は、terminal monitor の後の ping の 10 行を受けました。R1(csr1000v 17.03.08a・RAM 4096 MB)の R1 mon が受けた文字(取得スクリプトが 10 秒溜めて読んだもの〔ツール側〕)は以下のとおりです。

snippet
*Nov  8 12:10:25.294: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.295: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.297: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.298: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.299: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.554: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.556: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.557: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.558: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.559: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

バッファには、4 本の ping の 20 行が在りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の undebug all の後の show logging は以下のとおりです。

snippet
R1# show logging
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.



No Inactive Message Discriminator.


    Console logging: level informational, 113 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 40 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 43 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled
    Persistent logging: disabled

No active filter modules.

    Trap logging: level informational, 74 message lines logged
        Logging Source-Interface:       VRF Name:
    TLS Profiles:

Log Buffer (1000000 bytes):

*Nov  8 12:10:18.499: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:18.501: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:18.502: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:18.503: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:18.504: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:20.742: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:20.744: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:20.745: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:20.747: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:20.748: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.294: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.295: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.297: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.298: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:25.299: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.554: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.556: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.557: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.558: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:10:27.559: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0

同じ窓の R1 のコンソールの記録の差分は 0 文字でした〔ツール側〕。P3 の窓の前後の見出しで、dropped・rate-limited・overruns は増えていません〔ツール側〕。この機器では、コンソールの水準が informational の間、debug の行はコンソールの記録に無く(試しの撮影の 2 回と本ラボ)、バッファと、terminal monitor を入れた vty には在りました(本ラボのこの run で)。

§4.1 の ESM リファレンスの文(logging console はコンソールの TTY だけでなく機器の全部の TTY の line を含む)と、この窓の vty の観測は、§14.6 に並べます。

本ラボのこの run での数は以下のとおりです。

記録ICMP: の行
コンソールの記録(窓 p3)0 行
バッファ(undebug all の後の show logging)20 行
vty(terminal monitor の後の R1 mon の窓)10 行

terminal monitor の前の ping の 10 行(12:10:18 と 12:10:20 の組)は、P3 の R1 mon の受信のどれにも在りません。P3 では、terminal monitor を入れる前の R1 mon の窓は撮っていません(§13)。terminal monitor の前と後の vty の比べは、P2 の 1 回だけです(§4.3)。R1 mon は窓の後に terminal no monitor を入れました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# terminal no monitor
R1#

6. show と debug の対比

6.1 資料の debug ip ospf adj と debug ip routing

Debug リファレンス(I〜L)は、debug ip ospf adj を OSPF の隣接の出来事を出すコマンドと書きます。例に挙がるのは、TTL の検査で落ちたパケットです。

To display information on adjacency events related to Open Shortest Path First (OSPF), such as packets being dropped due to a Time-to-Live (TTL) security check, use the debug ip ospf adj command in privileged EXEC mode. To disable debugging output, use the no form of this command.

(Debug リファレンス(I〜L)「debug ip ospf adj」・IOS の本)

同じリファレンスは、debug ip routing を RIP の経路表と route cache の更新を出すコマンドと書き、RT: の行の括弧の中の数を administrative distance と metric と書きます。

To display information on Routing Information Protocol ( RIP) routing table updates and route cache updates, use the debug ip routing command in privileged EXEC mode. To disable debugging output, use the no form of this command.

(Debug リファレンス(I〜L)「debug ip routing」・IOS の本)

The metric could also be reported via RIP, OSPF, or another IP routing protocol. The numbers inside the brackets report the administrative distance and the actual metric.

(Debug リファレンス(I〜L)「debug ip routing」・IOS の本)

6.2 切断と回復の間の show と debug

P4 は、R1 に debug ip ospf adj と debug ip routing を入れたまま、R2 の Gi3 を shutdown し、後で no shutdown しました。その間、R1 main で show ip ospf neighbor を打ち続けました(poll)。

取得スクリプトは、10.81.0.3 の行が無くなるまで(3 回)と FULL になるまで(2 回)poll を続けました〔ツール側〕。show は打った時点の表で、debug は出来事ごとの行です。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug の返事は以下のとおりです。

snippet
R1# debug ip ospf adj
OSPF adjacency debugging is on

R1(csr1000v 17.03.08a・RAM 4096 MB)のもう 1 本の debug の返事は以下のとおりです。

snippet
R1# debug ip routing
IP routing debugging is on

その後の show debugging には、2 つの debug が在りました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

IP routing:
  IP routing debugging is on
OSPF:
  OSPF adjacency debugging is on

切断の前の 10.81.0.3(R2 の VRF B・Gi3 の先)は FULL/DR でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show ip ospf neighbor は以下のとおりです。

snippet
R1# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   FULL/DR         00:00:39    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:37    10.81.12.2      GigabitEthernet2

R1(csr1000v 17.03.08a・RAM 4096 MB)の切断の前の経路は以下のとおりです。

snippet
R1# show ip route 10.81.0.3
Routing entry for 10.81.0.3/32
  Known via "ospf 1", distance 110, metric 2, type intra area
  Last update from 10.81.13.2 on GigabitEthernet3, 00:06:02 ago
  Routing Descriptor Blocks:
  * 10.81.13.2, from 10.81.0.3, 00:06:02 ago, via GigabitEthernet3
      Route metric is 2, traffic share count is 1

R2 は Gi3 に shutdown を入れました。R2(csr1000v 17.03.08a・RAM 4096 MB)の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface GigabitEthernet3
R2(config-if)#shutdown
R2(config-if)#end
R2#

R1 main では、poll の間だけ terminal exec prompt timestamp を入れ、show の頭に機器の時刻が出るようにしました。返事は空の行だけです(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# terminal exec prompt timestamp

poll の各回は show clock と show ip ospf neighbor の 2 本で、どちらの頭にも Load for five secs の行と No time source, で始まる機器の時刻の行が付きました。R1(csr1000v 17.03.08a・RAM 4096 MB)の 1 回目の poll は以下のとおりです。

snippet
R1# show clock
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:11:27.122 UTC Sun Nov 8 2026

*12:11:27.122 UTC Sun Nov 8 2026
R1# show ip ospf neighbor
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:11:29.384 UTC Sun Nov 8 2026


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   FULL/DR         00:00:18    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:36    10.81.12.2      GigabitEthernet2

2 回目の poll では、10.81.0.3 は FULL/DR のまま Dead Time が 00:00:03 でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の 2 回目の poll の show ip ospf neighbor は以下のとおりです。

snippet
…(省略)
R1# show ip ospf neighbor
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:11:43.947 UTC Sun Nov 8 2026


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   FULL/DR         00:00:03    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:30    10.81.12.2      GigabitEthernet2

3 回目の poll の表には、10.81.0.3 の行がありませんでした。R1(csr1000v 17.03.08a・RAM 4096 MB)の 3 回目の poll の show ip ospf neighbor は以下のとおりです。

snippet
…(省略)
R1# show ip ospf neighbor
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:11:58.514 UTC Sun Nov 8 2026


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.2         1   FULL/DR         00:00:35    10.81.12.2      GigabitEthernet2

poll の後に terminal no exec prompt timestamp を入れ、経路を見ました。10.81.0.3 の経路は表に無い、という返事でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# terminal no exec prompt timestamp

R1(csr1000v 17.03.08a・RAM 4096 MB)の切断の後の show ip route 10.81.0.3 は以下のとおりです。

snippet
R1# show ip route 10.81.0.3
% Subnet not in table

R2 は Gi3 に no shutdown を入れました。R2(csr1000v 17.03.08a・RAM 4096 MB)の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface GigabitEthernet3
R2(config-if)#no shutdown
R2(config-if)#end
R2#

回復の側の poll も、terminal exec prompt timestamp を入れてから打ちました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# terminal exec prompt timestamp

回復の 1 回目の poll では、10.81.0.3 は INIT/DROTHER でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show ip ospf neighbor は以下のとおりです。

snippet
…(省略)
R1# show ip ospf neighbor
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:12:23.305 UTC Sun Nov 8 2026


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   INIT/DROTHER    00:00:36    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:39    10.81.12.2      GigabitEthernet2

回復の 2 回目の poll では、10.81.0.3 は FULL/BDR でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show ip ospf neighbor は以下のとおりです。

snippet
…(省略)
R1# show ip ospf neighbor
Load for five secs: 0%/0%; one minute: 0%; five minutes: 0%
No time source, *12:12:37.858 UTC Sun Nov 8 2026


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.81.0.3         1   FULL/BDR        00:00:38    10.81.13.2      GigabitEthernet3
10.81.0.2         1   FULL/DR         00:00:33    10.81.12.2      GigabitEthernet2

poll の後に terminal no exec prompt timestamp を入れ、経路を見ました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# terminal no exec prompt timestamp

R1(csr1000v 17.03.08a・RAM 4096 MB)の回復の後の show ip route 10.81.0.3 は以下のとおりです。

snippet
R1# show ip route 10.81.0.3
Routing entry for 10.81.0.3/32
  Known via "ospf 1", distance 110, metric 2, type intra area
  Last update from 10.81.13.2 on GigabitEthernet3, 00:00:11 ago
  Routing Descriptor Blocks:
  * 10.81.13.2, from 10.81.0.3, 00:00:11 ago, via GigabitEthernet3
      Route metric is 2, traffic share count is 1

R1 main の 6 回の show ip ospf neighbor の 10.81.0.3 の行は、以下のとおりに移りました。時刻は R1 の時計で、show の頭の No time source, の行の値です。

R1 の時刻(show の頭の行)10.81.0.3 の StateDead Time
(切断の前・時刻の行なし)FULL/DR00:00:39
12:11:29.384FULL/DR00:00:18
12:11:43.947FULL/DR00:00:03
12:11:58.514(10.81.0.3 の行なし)—
12:12:23.305INIT/DROTHER00:00:36
12:12:37.858FULL/BDR00:00:38

10.81.0.3 の State は、切断の前が FULL/DR、回復の後が FULL/BDR です。R2 の show clock は R2 の時計で、この表の時刻とは並べていません。

6.3 同じ間の debug の行

P4 の終わりに undebug all を打ってから、show logging のバッファを撮りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の undebug all の返事は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

バッファには、切断の側と回復の側の debug の行が、R1 の時刻つきで並びました。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging のバッファは以下のとおりです。

snippet
R1# show logging
…(省略)
Log Buffer (1000000 bytes):

*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: 10.81.0.3 address 10.81.13.2 is dead
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: 10.81.0.3 address 10.81.13.2 is dead, state DOWN
*Nov  8 12:11:47.888: %OSPF-5-ADJCHG: Process 1, Nbr 10.81.0.3 on GigabitEthernet3 from FULL to DOWN, Neighbor Down: Dead timer expired
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Neighbor change event
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: DR/BDR election
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Elect BDR 10.81.0.1
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Elect DR 10.81.0.1
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Elect BDR 0.0.0.0
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Elect DR 10.81.0.1
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: DR: 10.81.0.1 (Id)
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3:    BDR: none
*Nov  8 12:11:47.888: OSPF-1 ADJ   Gi3: Remember old DR 10.81.0.3 (id)
*Nov  8 12:11:47.990: RT: del 10.81.0.3 via 10.81.13.2, ospf metric [110/2]
*Nov  8 12:11:47.990: RT: delete subnet route to 10.81.0.3/32
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: 2 Way Communication to 10.81.0.3, state 2WAY
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Neighbor change event
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR/BDR election
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect BDR 10.81.0.3
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect DR 10.81.0.1
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR: 10.81.0.1 (Id)
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3:    BDR: 10.81.0.3 (Id)
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Nbr 10.81.0.3: Prepare dbase exchange
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Send DBD to 10.81.0.3 seq 0x2553 opt 0x52 flag 0x7 len 32
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Neighbor change event
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR/BDR election
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect BDR 10.81.0.3
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect DR 10.81.0.1
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR: 10.81.0.1 (Id)
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3:    BDR: 10.81.0.3 (Id)
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Neighbor change event
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR/BDR election
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect BDR 10.81.0.3
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: Elect DR 10.81.0.1
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3: DR: 10.81.0.1 (Id)
*Nov  8 12:12:29.161: OSPF-1 ADJ   Gi3:    BDR: 10.81.0.3 (Id)
*Nov  8 12:12:31.012: OSPF-1 ADJ   Gi3: Rcv DBD from 10.81.0.3 seq 0xBE9 opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Nov  8 12:12:31.013: OSPF-1 ADJ   Gi3: NBR Negotiation Done. We are the SLAVE
*Nov  8 12:12:31.013: OSPF-1 ADJ   Gi3: Nbr 10.81.0.3: Summary list built, size 5
*Nov  8 12:12:31.013: OSPF-1 ADJ   Gi3: Send DBD to 10.81.0.3 seq 0xBE9 opt 0x52 flag 0x2 len 132
*Nov  8 12:12:31.014: OSPF-1 ADJ   Gi3: Rcv DBD from 10.81.0.3 seq 0xBEA opt 0x52 flag 0x1 len 72  mtu 1500 state EXCHANGE
*Nov  8 12:12:31.014: OSPF-1 ADJ   Gi3: Exchange Done with 10.81.0.3
*Nov  8 12:12:31.014: OSPF-1 ADJ   Gi3: Send LS REQ to 10.81.0.3 length 36
*Nov  8 12:12:31.014: OSPF-1 ADJ   Gi3: Send DBD to 10.81.0.3 seq 0xBEA opt 0x52 flag 0x0 len 32
*Nov  8 12:12:31.016: OSPF-1 ADJ   Gi3: Rcv LS UPD from Nbr ID 10.81.0.3 length 76 LSA count 1
*Nov  8 12:12:31.016: OSPF-1 ADJ   Gi3: Synchronized with 10.81.0.3, state FULL
*Nov  8 12:12:31.016: %OSPF-5-ADJCHG: Process 1, Nbr 10.81.0.3 on GigabitEthernet3 from LOADING to FULL, Loading Done
*Nov  8 12:12:31.016: OSPF-1 ADJ   Gi3: Rcv LS REQ from 10.81.0.3 length 48 LSA count 2
*Nov  8 12:12:31.266: RT: updating ospf 10.81.0.3/32 (0x0) [local lbl/ctx:1048577/0x0] omp-tag:0  :
    via 10.81.13.2 Gi3  0 0 0x0 1048578 0x100001

*Nov  8 12:12:31.266: RT: add 10.81.0.3/32 via 10.81.13.2, ospf metric [110/2]

切断の側では、12:11:47.888 に is dead, state DOWN の行と %OSPF-5-ADJCHG(FULL to DOWN・Dead timer expired)の syslog の行が在り、同じ時刻に DR と BDR の選び直しの行が続きました。12:11:47.990 には debug ip routing の RT: del と RT: delete subnet route の行が在ります。

12:11:47.990 の行の次の行は、12:12:29.161 の 2 Way Communication to 10.81.0.3, state 2WAY の行です。この 2 行の間のバッファに行はありません(P4 の窓の前後の見出しに dropped などの増えは無い〔ツール側〕)。この間の 12:12:23.305 の show は、10.81.0.3 を INIT/DROTHER と表示していました。回復の側は、DBD の交換・Exchange Done・12:12:31.016 の state FULL と %OSPF-5-ADJCHG(LOADING to FULL)・12:12:31.266 の RT: add の順でした。

バッファの本文を数えると、OSPF-1 ADJ の行が 43 行、%OSPF-5-ADJCHG の行が 2 行、RT: の行が 4 行でした。%LINK と %LINEPROTO の行は 0 行です(記録 = バッファ)。

この間の R1 のコンソールは informational でした。コンソールの記録の窓(P4 の窓)に足されたのは %OSPF-5-ADJCHG の 2 行だけで、debug の行(OSPF-1 ADJ と RT:)は 0 行でした。R1(csr1000v 17.03.08a・RAM 4096 MB)のコンソールの記録(窓の前と後の差分〔ツール側〕)は以下のとおりです。

snippet
*Nov  8 12:11:47.888: %OSPF-5-ADJCHG: Process 1, Nbr 10.81.0.3 on GigabitEthernet3 from FULL to DOWN, Neighbor Down: Dead timer expired
*Nov  8 12:12:31.016: %OSPF-5-ADJCHG: Process 1, Nbr 10.81.0.3 on GigabitEthernet3 from LOADING to FULL, Loading Done

この機器では、show の表の移り変わりと debug の行の並びは、以下の順でした。show の表では、10.81.0.3 は FULL/DR のまま Dead Time が移り(本ラボのこの run では 00:00:18 → 00:00:03)、次の回で行が無くなり、回復の側で INIT/DROTHER → FULL/BDR と移りました。debug の行では、dead → DOWN → DR の選び直し → RT: del の後、2WAY → DBD の交換 → FULL → RT: add と並びました。

dead time の表示(12:11:43.947 に 00:00:03)と、dead の行の時刻(12:11:47.888)の関係、つまり dead timer の数え方は確かめていません(§13)。

この図を大きく開く ↗

R2 の Gi3 の shutdown と no shutdown の間を、R1 の show ip ospf neighbor の表とバッファの debug の行で並べた図です(R1 の時計)。

7. 条件付き debug

7.1 資料の Conditionally Triggered Debugging

15M&T の Troubleshooting 章は、Conditionally Triggered Debugging を、指定した interface を出入りするパケットの debug の行だけを出す機能と書きます。条件が無い時は、全部の interface の行が出て資源を使い、探す情報が見つけにくくなると書きます。

When the Conditionally Triggered Debugging feature is enabled, the router generates debugging messages for packets entering or leaving the router on a specified interface; the router will not generate debugging output for packets entering or leaving through a different interface.

(15M&T の Troubleshooting 章「Enabling Conditionally Triggered Debugging」・IOS Release 15M&T)

Normally, the router will generate debugging messages for every interface, resulting in a large number of messages. The large number of messages consumes system resources, and can affect your ability to find the specific information you need. By limiting the number of debugging messages, you can receive messages related to only the ports you wish to troubleshoot.

(15M&T の Troubleshooting 章「Enabling Conditionally Triggered Debugging」・IOS Release 15M&T)

同じ章は、条件が効く debug を挙げる文を置き、続く一覧に debug aaa・debug dialer・debug isdn・debug modem・debug ppp の 5 つを並べます。条件は debug を入れるものではなく、プロトコルの debug を入れて初めて行が出ます。

Conditionally Triggered Debugging controls the output from the following protocol-specific debug commands:

(15M&T の Troubleshooting 章「Enabling Conditionally Triggered Debugging」・IOS Release 15M&T)

Although this feature limits the output of the commands listed, it does not automatically enable the generation of debugging output from these commands. Debugging messages are generated only when the protocol-specific debug command is enabled.

(15M&T の Troubleshooting 章「Enabling Conditionally Triggered Debugging」・IOS Release 15M&T)

最初の debug condition が条件付きの debug を有効にし、条件が複数ならどれか 1 つに当たる interface の行が出ます。条件が無ければ、有効な debug の行は interface を問わず全部出ます。

The first debug condition command you enter enables conditional debugging. The router will display only messages for interfaces that meet one of the specified conditions. If multiple conditions are specified, the interface must meet at least one of the conditions in order for messages to be displayed.

(15M&T の Troubleshooting 章「Enabling Conditional Debugging Commands」・IOS Release 15M&T)

If no debug condition commands are enabled, all debugging output, regardless of the interface, will be displayed for the enabled protocol-specific debug commands.

(15M&T の Troubleshooting 章「Enabling Conditional Debugging Commands」・IOS Release 15M&T)

Debug リファレンス(A〜D)の debug condition の頁は、条件に従わない debug の出力が在ると書き、debug condition interface の頁は、条件が効くコマンドを主にダイヤルアクセスの機能と書きます。同じリファレンスは、EIGRP が debug condition vrf に対応しないとも書きます。

Not all debugging output is affected by the debug condition command. Some commands generate output whenever they are enabled, regardless of whether they meet any conditions.

(Debug リファレンス(A〜D)「debug condition」の Usage Guidelines・IOS の本)

The commands that are affected by the debugcondition commands are generally related to dial access functions, where a large amount of output is expected.

(Debug リファレンス(A〜D)「debug condition interface」の Usage Guidelines・IOS の本。debugcondition の語のつながりは原典のまま)

EIGRP does not support the debugconditionvrf command.

(Debug リファレンス(A〜D)「debug condition vrf」・IOS の本)

Debug リファレンス(A〜D)の debug condition の頁は、Intelligent Service Architecture(ISA)の分散の条件付き debug に対応する部品の一覧も置きます。IOS XE の版の資料で、どの debug が条件に従うかを並べたものは、取得した 22 本の中にありません。

7.2 条件だけを入れた段

R1 の debug condition の ? のヘルプには、interface・ip・vrf など 23 個の条件の種類が並びました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# debug condition ?
  application  Application
  called       called number
  calling      calling
  cpl          Cisco Provisioning Language debugging
  cts          Cisco Trusted Security
  domain       domain name
  glbp         interface group
  interface    interface
  ip           IP address
  mac-address  MAC address
  match-list   apply the match-list
  mst          mst
  portbundle   Port bundle host key to uniquely identify session/service
  session-id   session number
  standby      interface group
  tnlmsg       tnlmsg
  username     username
  vcid         VC ID
  vlan         vlan
  voice-port   voice-port number
  vrf          Virtual Routing and Forwarding
  xconnect     Xconnect conditional debugging on segment pair
  zone-pair    Zone pair debugging

R1#debug condition

P5 は、R1 main で clear logging の後に debug condition interface GigabitEthernet2 を入れ、まず debug を入れずに show debug condition・show debugging・show logging を撮りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の返事は以下のとおりです。

snippet
R1# debug condition interface GigabitEthernet2
Condition 1 set

R1(csr1000v 17.03.08a・RAM 4096 MB)の show debug condition は以下のとおりです。

snippet
R1# show debug condition

Condition 1: interface Gi2 (1 flags triggered)
	Flags: Gi2

この機器では、debug condition interface は受理され、show debug condition は Condition 1: interface Gi2 (1 flags triggered) の形で条件を示しました。show debugging は条件の行を出し、debugging is on を含む行はありませんでした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop
…(省略)
Condition 1: interface Gi2 (1 flags triggered)
	Flags: Gi2

hello の debug を入れる前のこの段の show logging のバッファに、Output intf Gi2 matches debug filer の行・IOSXE-INJECT の行・16 進の dump の行が在りました。行頭の時刻は 12:13:05.962 で、同じ段の show clock(12:13:06.441)より前です。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging は以下のとおりです。

snippet
R1# show logging
…(省略)
Log Buffer (1000000 bytes):
Output intf Gi2 matches debug filer

*Nov  8 12:13:05.962: IOSXE-INJECT: set pak datagramstart(from 0x7F4CBEB47F00 to 0x7F4CBEB47F00), datagramsize(from 54 to 100);
*Nov  8 12:13:05.962: IOSXE-INJECT: set inject sb with outbound intf Gi2 and mcast address 224.0.0.5
*Nov  8 12:13:05.963: IOSXE-INJECT: pak type L3 IP preroute to interface Gi2 nexthop 224.0.0.5
*Nov  8 12:13:05.963: IOSXE-INJECT: inject adj-id[2] 0xF8000084, 0x0, tx 73
*Nov  8 12:13:05.963: IOSXE-INJECT: add L3 inject hdr
*Nov  8 12:13:05.963: IOSXE-INJECT: In case IP pak->ip_tableid not set, Set pak->ip_tableid 0x0
*Nov  8 12:13:05.963: IOSXE-INJECT: inject hdr len 52, feature hdr len 20, l2-enc len 0, link type ip, pak len 100, total len 152, inject type adjacency, seqnum 3854
*Nov  8 12:13:05.963: IOSXE-INJECT: inject_sb inject_flag=0x2, subtype=0, type_flags=0x0,
*Nov  8 12:13:05.963:  send out the l3 packet to cpp: hi-prio
7F4CBEB47EC0:                            01020000              ....
7F4CBEB47ED0: 00000064 00981400 20010000 00000000  ...d.... .......
7F4CBEB47EE0: 00000008 01000001 00100700 01000000  ................
7F4CBEB47EF0: 00000000 F8000084 00000000 00000000  ....x...........
7F4CBEB47F00: 45C00064 0F0C0000 0159B31E 0A510C01  E@.d.....Y3..Q..
7F4CBEB47F10: E0000005 02010030 0A510001 00000000  `......0.Q......
7F4CBEB47F20: AB500000 00000000 00000000 FFFFFF00  +P..............
7F4CBEB47F30: 000A1201 00000028 0A510C02 0A510C01  .......(.Q...Q..
7F4CBEB47F40: 0A510002 7FBA0008 00010004           .Q...:......
*Nov  8 12:13:05.966:  IP protocol OSPF ...
*Nov  8 12:13:05.966: IOSXE-INJECT: pak inject type adjacency, ready for tx, seqnum 3854
*Nov  8 12:13:05.966: IOSXE-INJECT: inject_hdr pal_if_handle=0x8, flags=0x10, cause=7, sub_cause=0

この段のバッファには、IOSXE-INJECT の行が 10 行、16 進の dump の行が 9 行、matches debug filer の行が 1 行在り、OSPF-1 HELLO の行と ICMP: の行は 0 行でした(記録 = バッファ)。IOSXE-INJECT の行が hello の debug を入れる前のこの段から在ったのは、本ラボのこの run での観測です。

7.3 条件 Gi2 の下の hello と ICMP

条件を残したまま、debug ip ospf hello と debug ip icmp を入れ、R1 から R2 の Gi2(10.81.12.2)と Gi3(10.81.13.2)へ ping を 5 本ずつ送りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug ip ospf hello の返事は以下のとおりです。

snippet
R1# debug ip ospf hello
OSPF hello debugging is on

R1(csr1000v 17.03.08a・RAM 4096 MB)の debug ip icmp の返事は以下のとおりです。

snippet
R1# debug ip icmp
ICMP packet debugging is on

R1(csr1000v 17.03.08a・RAM 4096 MB)の ping の 1 本目は以下のとおりです。

snippet
R1# ping 10.81.12.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の ping の 2 本目は以下のとおりです。

snippet
R1# ping 10.81.13.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.13.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

1 本目の round-trip は 4/4/5 ms で、ほかの ping の値と同じではありません。違いの理由は撮っていません。ping の後の show logging のバッファは以下のとおりです(R1 csr1000v 17.03.08a・RAM 4096 MB・抜粋)。

snippet
R1# show logging
…(省略)
*Nov  8 12:13:15.447: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.81.12.1Output intf Gi2 matches debug filer

*Nov  8 12:13:15.447: IOSXE-INJECT: set pak datagramstart(from 0x7F4CBEB4DB30 to 0x7F4CBEB4DB30), datagramsize(from 54 to 100);
*Nov  8 12:13:15.447: IOSXE-INJECT: set inject sb with outbound intf Gi2 and mcast address 224.0.0.5
*Nov  8 12:13:15.447: IOSXE-INJECT: pak type L3 IP preroute to interface Gi2 nexthop 224.0.0.5
*Nov  8 12:13:15.447: IOSXE-INJECT: inject adj-id[2] 0xF8000084, 0x0, tx 74
*Nov  8 12:13:15.447: IOSXE-INJECT: add L3 inject hdr
*Nov  8 12:13:15.447: IOSXE-INJECT: In case IP pak->ip_tableid not set, Set pak->ip_tableid 0x0
*Nov  8 12:13:15.447: IOSXE-INJECT: inject hdr len 52, feature hdr len 20, l2-enc len 0, link type ip, pak len 100, total len 152, inject type adjacency, seqnum 3908
*Nov  8 12:13:15.447: IOSXE-INJECT: inject_sb inject_flag=0x2, subtype=0, type_flags=0x0,
*Nov  8 12:13:15.447:  send out the l3 packet to cpp: hi-prio
7F4CBEB4DAF0:                            01020000              ....
7F4CBEB4DB00: 00000064 00981400 20010000 00000000  ...d.... .......
7F4CBEB4DB10: 00000008 01000001 00100700 01000000  ................
7F4CBEB4DB20: 00000000 F8000084 00000000 00000000  ....x...........
7F4CBEB4DB30: 45C00064 0F420000 0159B2E8 0A510C01  E@.d.B...Y2h.Q..
7F4CBEB4DB40: E0000005 02010030 0A510001 00000000  `......0.Q......
7F4CBEB4DB50: AB500000 00000000 00000000 FFFFFF00  +P..............
7F4CBEB4DB60: 000A1201 00000028 0A510C02 0A510C01  .......(.Q...Q..
7F4CBEB4DB70: 0A510002 7FBA0008 00010004           .Q...:......
*Nov  8 12:13:15.449:  IP protocol OSPF ...
*Nov  8 12:13:15.449: IOSXE-INJECT: pak inject type adjacency, ready for tx, seqnum 3908
*Nov  8 12:13:15.449: IOSXE-INJECT: inject_hdr pal_if_handle=0x8, flags=0x10, cause=7, sub_cause=0
*Nov  8 12:13:17.170: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2
…(省略)
*Nov  8 12:13:36.153: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2Output intf Gi2 matches debug filer

*Nov  8 12:13:40.557: IOSXE-INJECT: set pak datagramstart(from 0x7F4CBEB54570 to 0x7F4CBEB54570), datagramsize(from 100 to 100);
*Nov  8 12:13:40.557: IOSXE-INJECT: add L3 inject hdr
*Nov  8 12:13:40.557: IOSXE-INJECT: inject hdr len 32, feature hdr len 0, l2-enc len 0, link type ip, pak len 100, total len 132, inject type normal, seqnum 3956
*Nov  8 12:13:40.557: IOSXE-INJECT: inject_sb inject_flag=0x0, subtype=0, type_flags=0x0,
*Nov  8 12:13:40.557:  send out the l3 packet to cpp:
7F4CBEB54550: 01010000 00000064 00840000 20010000  .......d.... ...
7F4CBEB54560: 00000000 00000008 01000001 00100200  ................
7F4CBEB54570: 45000064 00280000 FF018ECC 0A510C01  E..d.(.....L.Q..
7F4CBEB54580: 0A510C02 0800E5B4 00080000 00000000  .Q....e4........
7F4CBEB54590: 000A9883 ABCDABCD ABCDABCD ABCDABCD  ....+M+M+M+M+M+M
7F4CBEB545A0: ABCDABCD ABCDABCD ABCDABCD ABCDABCD  +M+M+M+M+M+M+M+M
7F4CBEB545B0: ABCDABCD ABCDABCD ABCDABCD ABCDABCD  +M+M+M+M+M+M+M+M
7F4CBEB545C0: ABCDABCD ABCDABCD ABCDABCD ABCDABCD  +M+M+M+M+M+M+M+M
*Nov  8 12:13:40.560:  IP protocol ICMP ...
*Nov  8 12:13:40.560: IOSXE-INJECT: pak inject type normal, ready for tx, seqnum 3956
*Nov  8 12:13:40.560: IOSXE-INJECT: inject_hdr pal_if_handle=0x8, flags=0x10, cause=2, sub_cause=0
*Nov  8 12:13:40.561: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0Output intf Gi2 matches debug filer
…(省略)
*Nov  8 12:13:40.580: ICMP: echo reply rcvd, src 10.81.12.2, dst 10.81.12.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:42.837: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:42.839: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:42.840: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:42.841: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:42.842: ICMP: echo reply rcvd, src 10.81.13.2, dst 10.81.13.1, topology BASE, dscp 0 topoid 0
*Nov  8 12:13:43.523: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.81.12.1Output intf Gi2 matches debug filer
…(省略)

条件 Gi2 の下のバッファの OSPF-1 HELLO の行は、Gi2 の行が 8 行(Send 4・Rcv 4)で、Gi3 の行は 0 行でした。ICMP: echo reply rcvd の行は、src 10.81.12.2 が 5 行、src 10.81.13.2 が 5 行です。10.81.13.2 は R1 の Gi3 の OSPF の相手のアドレスで、src 10.81.13.2 の 5 行は 1 か所に続いて並びました。

この機器では、条件 Gi2 の下で、OSPF hello の行は Gi2 の行だけが在り、Gi3 の相手の ICMP の行は在りました。15M&T の Troubleshooting 章の一覧(debug aaa・dialer・isdn・modem・ppp)には、debug ip ospf hello も debug ip icmp も在りません。一覧に無い 2 つの debug のうち、OSPF hello の行は条件に従い、ICMP の行は従いませんでした。資料の一覧と機器の振る舞いは並べるだけで、どちらが正しいとは書きません。

IOSXE-INJECT の行は、set pak datagramstart の行で始まる塊で並びました。この段のバッファ全体(条件だけの段に在った 1 個を含む)で塊は 10 個で、IP protocol OSPF ... の行を含む塊が 5 個、IP protocol ICMP ... の行を含む塊が 5 個です。ICMP の塊は、どれも src 10.81.12.2 の行のすぐ前に在り、src 10.81.13.2 の 5 行の間に塊はありませんでした。

この機器では、条件を入れている間のバッファに IOSXE-INJECT と 16 進の dump の行が在りました。塊が何を記録したものかは撮っていません(§13)。

Output intf Gi2 matches debug filer は、本文の頭の 1 回(単独の行)のほか、hello の 5 行と ICMP の 4 行の末尾に、改行も時刻も無く同じ行に続きました。行ごとの印としては扱いません(§14.2)。

7.4 条件が残っている間の no debug condition all

debug を入れたまま、条件が残っている間に no debug condition all を打ちました。機器は全部の条件を外す前に確認を求め、yes の後に 1 conditions have been removed を返しました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# no debug condition all
Removing all conditions may cause a flood of debugging
messages to result, unless specific debugging flags
are first removed.

Proceed with the removal of all conditions? [yes/no]: yes
1 conditions have been removed

その後の show debug condition は、条件が無いという返事でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debug condition


% No conditions found

取得スクリプトの待ち(25 秒〔ツール側〕)の後の show logging のバッファは、前の段のバッファの行がそのまま続き、その後に 12 行が足されました。足された 12 行は Gi3 の hello が 6 行(Send 3・Rcv 3)と Gi2 の hello が 6 行で、IOSXE-INJECT・16 進の dump・matches debug filer の行は 0 行でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging の末尾は以下のとおりです。

snippet
R1# show logging
…(省略)
*Nov  8 12:13:45.662: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2
*Nov  8 12:13:52.327: OSPF-1 HELLO Gi3: Send hello to 224.0.0.5 area 0 from 10.81.13.1
*Nov  8 12:13:53.369: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.81.12.1
*Nov  8 12:13:55.590: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2
*Nov  8 12:13:55.743: OSPF-1 HELLO Gi3: Rcv hello from 10.81.0.3 area 0 10.81.13.2
*Nov  8 12:14:01.824: OSPF-1 HELLO Gi3: Send hello to 224.0.0.5 area 0 from 10.81.13.1
*Nov  8 12:14:03.151: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.81.12.1
*Nov  8 12:14:05.203: OSPF-1 HELLO Gi3: Rcv hello from 10.81.0.3 area 0 10.81.13.2
*Nov  8 12:14:05.363: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2
*Nov  8 12:14:11.820: OSPF-1 HELLO Gi3: Send hello to 224.0.0.5 area 0 from 10.81.13.1
*Nov  8 12:14:13.134: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.81.12.1
*Nov  8 12:14:14.286: OSPF-1 HELLO Gi3: Rcv hello from 10.81.0.3 area 0 10.81.13.2
*Nov  8 12:14:14.473: OSPF-1 HELLO Gi2: Rcv hello from 10.81.0.2 area 0 10.81.12.2

Debug リファレンス(A〜D)は、最後の条件を外すと全部の interface の debug の行に戻り、最後の条件か全部の条件を外す前に確認を求めると書きます。

If the last condition is removed, debugging output resumes for all interfaces. You will be asked for confirmation before removing the last condition or all conditions.

(Debug リファレンス(A〜D)「debug condition」の Usage Guidelines・IOS の本)

本ラボのこの run では、条件を外した後に足された行に Gi3 の hello の行が 6 行在りました。本ラボは hello の debug を条件の後に入れたので、条件を入れる前の Gi3 の hello の行と比べる記録はありません。そのため、「Gi3 の行が戻った」とは書かず、資料の文と、足された行の数を並べるだけにします。

段ごとの数は以下のとおりです。どれもバッファで数えた数で、P5 の間のコンソールは informational、vty は読んでいません。P5 の窓の前後の見出しで、dropped・rate-limited・overruns は増えていません〔ツール側〕。

段(バッファの行)Gi2 の helloGi3 の helloIOSXE-INJECT16 進の dumpmatches debug filersrc 10.81.13.2 の ICMP
条件だけ(hello の debug の前・保存した表示の全体)0010910
条件 Gi2 の下(前の段の後に足された行)80707695
条件を外した後(前の段の後に足された行)660000

matches debug filer は hello と ICMP の行の末尾に続くことがあるので、表の 6 つの数を足しても行の数にはなりません。条件を外した後の段の 12 行は、hello の行だけです。

続いて undebug all で debug を止めました。R1(csr1000v 17.03.08a・RAM 4096 MB)の返事は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

その後の show debugging には、条件の行も debugging is on の行もありませんでした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

この図を大きく開く ↗

条件 Gi2 だけの段・hello と ICMP の段・条件を外した後と、ACL 181 と ACL なしの debug ip packet で、バッファに在った行と無かった行を並べた図です。

8. ACL で絞った debug ip packet

8.1 資料の debug ip packet と ACL

Debug リファレンス(I〜L)は、debug ip packet を一般の IP の debug の情報と IPSO の記録を出すコマンドと書きます。ACL の番号を付けると、その ACL が許さない datagram の行は出なくなります。

To display general IP debugging information and IP security option (IPSO) security transactions, use the debug ip packet command in privileged EXEC mode. To disable debugging output, use the no form of this command.

(Debug リファレンス(I〜L)「debug ip packet」・IOS の本)

(Optional) The IP access list number that you can specify. If the datagram is not permitted by that access list, the related debugging output is suppressed. Standard, extended, and expanded access lists are supported. The range of standard and extended access lists is from 1 to 199. The range of expanded access lists is from 1300 to 2699.

(Debug リファレンス(I〜L)「debug ip packet」の構文の説明・IOS の本)

detail を付けると、パケットの種類と code、port の番号まで出ます。

(Optional) Displays detailed IP packet debugging information. This information includes the packet types and codes as well as source and destination port numbers.

(Debug リファレンス(I〜L)「debug ip packet」の構文の説明・IOS の本)

同じ頁の Caution は、debug ip packet は出力が多く資源を多く使うので、本番のネットワークでは慎重に使い、通信の少ない時だけ有効にすると書きます。

Because the debug ip packet command generates a substantial amount of output and uses a substantial amount of system resources, this command should be used with caution in production networks. It should only be enabled when traffic on the IP network is low, so other activity on the system is not adversely affected.

(Debug リファレンス(I〜L)「debug ip packet」の Caution・IOS の本)

8.2 ACL 181 で絞った debug ip packet 181 detail

R1 の debug ip packet の ? のヘルプは、ACL の番号の 2 つの範囲と detail を示しました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# debug ip packet ?
  <1-199>      Access list
  <1300-2699>  Access list (expanded range)
  detail       Print more debugging detail
  <cr>         <cr>

R1#debug ip packet

P5 の後半は、R1 に ACL 181(R1 の Gi2 と R2 の Gi2 の間の ICMP の 2 行)を入れ、debug ip packet 181 detail を入れて、R1 から 10.81.12.2 と 10.81.13.2 へ ping を送りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の ACL の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#access-list 181 permit icmp host 10.81.12.1 host 10.81.12.2
R1(config)#access-list 181 permit icmp host 10.81.12.2 host 10.81.12.1
R1(config)#end
R1#

R1(csr1000v 17.03.08a・RAM 4096 MB)の debug の返事は以下のとおりです。

snippet
R1# debug ip packet 181 detail
IP packet debugging is on (detailed) for access list 181

2 本の ping は、どちらも 5/5 でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目は以下のとおりです。

snippet
R1# ping 10.81.12.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の 2 本目(ACL に無い 10.81.13.2 宛て)は以下のとおりです。

snippet
R1# ping 10.81.13.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.13.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

バッファには、s=10.81.12.1 → d=10.81.12.2 の行の塊(FIB の 3 行・routed via FIB・sending・ICMP type=8, code=0)と、s=10.81.12.2 → d=10.81.12.1 の行の塊(FIB の 3 行・routed via RIB)が 5 回ずつ交互に並びました。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging の抜粋は以下のとおりです。

snippet
R1# show logging
…(省略)
Log Buffer (1000000 bytes):

…(省略)
*Nov  8 12:14:49.147: FIBipv4-packet-proc: route packet from (local) src 10.81.12.1 dst 10.81.12.2
*Nov  8 12:14:49.147: FIBfwd-proc: packet routed by adj to GigabitEthernet2 10.81.12.2
*Nov  8 12:14:49.147: FIBipv4-packet-proc: packet routing succeeded
*Nov  8 12:14:49.147: IP: tableid=0, s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2) nexthop=10.81.12.2, routed via FIB
*Nov  8 12:14:49.147: IP: s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2), len 100, sending
*Nov  8 12:14:49.147:     ICMP type=8, code=0
*Nov  8 12:14:49.148: FIBipv4-packet-proc: route packet from GigabitEthernet2 src 10.81.12.2 dst 10.81.12.1
*Nov  8 12:14:49.148: FIBfwd-proc: Default:10.81.12.1/32 receive entry
*Nov  8 12:14:49.148: FIBipv4-packet-proc: packet routing failed
*Nov  8 12:14:49.148: IP: tableid=0, s=10.81.12.2 (GigabitEthernet2), d=10.81.12.1 (GigabitEthernet2) nexthop=10.81.12.1, routed via RIB
*Nov  8 12:14:49.149: FIBipv4-packet-proc: route packet from (local) src 10.81.12.1 dst 10.81.12.2
*Nov  8 12:14:49.149: FIBfwd-proc: packet routed by adj to GigabitEthernet2 10.81.12.2
*Nov  8 12:14:49.149: FIBipv4-packet-proc: packet routing succeeded
*Nov  8 12:14:49.149: IP: tableid=0, s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2) nexthop=10.81.12.2, routed via FIB
*Nov  8 12:14:49.149: IP: s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2), len 100, sending
*Nov  8 12:14:49.149:     ICMP type=8, code=0
*Nov  8 12:14:49.150: FIBipv4-packet-proc: route packet from GigabitEthernet2 src 10.81.12.2 dst 10.81.12.1
*Nov  8 12:14:49.150: FIBfwd-proc: Default:10.81.12.1/32 receive entry
*Nov  8 12:14:49.150: FIBipv4-packet-proc: packet routing failed
*Nov  8 12:14:49.150: IP: tableid=0, s=10.81.12.2 (GigabitEthernet2), d=10.81.12.1 (GigabitEthernet2) nexthop=10.81.12.1, routed via RIB
…(省略)

この機器では、ACL 181 で絞った debug ip packet 181 detail のバッファに、ACL の 2 行の外の 10.81.13.x の行と、172.16.1.4 との間の IP: の行はありませんでした。本ラボのこの run では、10.81.13. を含む行が 0 行で(宛先 10.81.13.2 の ping は 5/5)、172.16.1.4 を含む行は設定の syslog の 1 行だけでした(記録 = バッファ・窓の前後の見出しに dropped などの増えは無い〔ツール側〕)。ICMP type= の行は 5 行で、どれも type=8 です。

8.3 ACL なしの debug ip packet と 172.16.1.4 を含む行

続いて ACL を付けずに debug ip packet を入れ、R1 から同じ 2 か所へ ping を送り、その後に R2 から R1 の Gi2 へ ping を送りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug の返事は以下のとおりです。

snippet
R1# debug ip packet
IP packet debugging is on

R1(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目の ping は以下のとおりです。

snippet
R1# ping 10.81.12.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の 2 本目の ping は以下のとおりです。

snippet
R1# ping 10.81.13.2 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.13.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R2(csr1000v 17.03.08a・RAM 4096 MB)から R1 への ping は以下のとおりです。

snippet
R2# ping 10.81.12.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

ACL なしのバッファの最初の行は、172.16.1.241(R1 の Gi1)と 172.16.1.4 の間の行でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging の抜粋は以下のとおりです。

snippet
R1# show logging
…(省略)
Log Buffer (1000000 bytes):

*Nov  8 12:14:58.626: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:14:58.626: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 120, sending
*Nov  8 12:14:58.627: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:14:58.779: IP: s=10.81.13.1 (local), d=224.0.0.5 (GigabitEthernet3), len 100, sending broad/multicast
*Nov  8 12:15:00.872: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:00.873: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:00.873: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending
…(省略)
*Nov  8 12:15:00.901: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:00.902: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:00.902: IP: tableid=0, s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2) nexthop=10.81.12.2, routed via FIB
*Nov  8 12:15:00.902: IP: s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2), len 100, sending
*Nov  8 12:15:00.903: IP: tableid=0, s=10.81.12.2 (GigabitEthernet2), d=10.81.12.1 (GigabitEthernet2) nexthop=10.81.12.1, routed via RIB
*Nov  8 12:15:00.903: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:00.903: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending
*Nov  8 12:15:00.903: IP: tableid=0, s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2) nexthop=10.81.12.2, routed via FIB
*Nov  8 12:15:00.904: IP: s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2), len 100, sending
*Nov  8 12:15:00.904: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:00.905: IP: tableid=0, s=10.81.12.2 (GigabitEthernet2), d=10.81.12.1 (GigabitEthernet2) nexthop=10.81.12.1, routed via RIB
…(省略)
*Nov  8 12:15:03.209: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending
*Nov  8 12:15:03.209: IP: tableid=0, s=10.81.13.1 (local), d=10.81.13.2 (GigabitEthernet3) nexthop=10.81.13.2, routed via FIB
*Nov  8 12:15:03.210: IP: s=10.81.13.1 (local), d=10.81.13.2 (GigabitEthernet3), len 100, sending
*Nov  8 12:15:03.210: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:03.211: IP: tableid=0, s=10.81.13.2 (GigabitEthernet3), d=10.81.13.1 (GigabitEthernet3) nexthop=10.81.13.1, routed via RIB
*Nov  8 12:15:03.211: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:03.211: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending
*Nov  8 12:15:03.212: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:03.213: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 168, sending
…(省略)
*Nov  8 12:15:07.729: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending
*Nov  8 12:15:07.729: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:07.729: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:07.729: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 104, sending

本ラボのこの run の数は以下のとおりです。どれもバッファの本文で数えた数で、窓の前後の見出しに dropped などの増えはありません〔ツール側〕。

段172.16.1.4 を含む行IP: s= の部分を含む行のうち 172.16.1.4 の行IP: s= の部分を含む行のうち 10.81.12.x・10.81.13.x の行10.81.13.1 と 10.81.13.2 の間の行
ACL 181 の段1(設定の syslog の行)050
ACL なしの段2377912(224.0.0.5 宛ての 2 行を含む)15

ACL なしの段の 172.16.1.4 の 237 行は、routed via FIB の行・sending の行・routed via RIB の行の 3 つの形が 79 行ずつです。最初の 172.16.1.4 の行は 12:14:58.626 で、R1 の最初の ping の行(12:15:00.902)の前に 84 行在りました。この機器では、ACL を付けない debug ip packet のバッファに、管理の SSH の相手(172.16.1.4)との間の行が混ざりました。

この段の行は detail を付けない形で、port の欄がありません。172.16.1.4 の行が SSH の通信であることは、この段の行だけでは確かめていません。負荷の段(§11.3)の detail を付けた行には、172.16.1.241 → 172.16.1.4 の行の次に TCP src=22 の行が在ります。

R2 → R1 の ping は、R1 の 2 本の ping の後に送りました(取得の順〔ツール側〕)。この機器では、R2 → R1 の ping の行は ACL なしの debug ip packet のバッファにもありませんでした。本ラボのこの run では、R1 の 2 本目の ping の最後の行(12:15:03.211)より後に 10.81. を含む行は 0 行で、その後の 41 行はどれも 172.16.1.4 を含む行でした(記録 = バッファ)。

s=10.81.12.2・d=10.81.12.1 の向きの行(routed via RIB)は、R1 の 1 本目の ping の行の並びの中に 5 行在ります。R2 から ping を送っていない ACL 181 の段にも、同じ向きの行が 5 行在りました。この向きの行の数は、R2 → R1 の要求の数としては使いません(§14.3)。


9. debug に出ない通信と packet trace

9.1 資料の debug ip packet と packet trace

Debug リファレンス(I〜L)の debug ip packet の頁は、debug ip packet が拾うのは process switching のパケット(受けた・作った・転送したパケット)で、fast path で switching されたパケットは拾わないと書きます。

IP packet debugging captures the packets that are process switched including received, generated and forwarded packets. IP packets that are switched in the fast path are not captured.

(Debug リファレンス(I〜L)「debug ip packet」の Usage Guidelines・IOS の本)

CSR の Packet Trace 章は、Packet-Trace の機能を、IOS XE の platform でパケットがどう処理されたかを詳しく見る機能と書きます。調べるのは debug platform condition に当たるパケットだけです。

The Packet-Trace feature provides a detailed understanding of how data packets are processed by the Cisco IOS XE platform, and thus helps customers to diagnose issues and troubleshoot them more efficiently.

(CSR の Packet Trace 章「Chapter Contents」・csr1000v の本・Updated: April 15, 2020)

The Packet-Trace feature provides three levels of inspection for packets: accounting, summary, and path data. Each level provides a detailed view of packet processing at the cost of some packet processing capability. However, Packet Trace limits inspection to packets that match the debug platform condition statements, and is a viable option even under heavy-traffic situations in customer environments.

(CSR の Packet Trace 章「Information About Packet Trace」・csr1000v の本・Updated: April 15, 2020)

summary の段は、決まった数のパケットの入出力の interface と、最後の状態(punt・drop・inject を含む)を記録します。

At the summary level of packet trace, data is collected for a finite number of packets. Packet-Trace summary tracks the input and output interfaces, the final packet state, and punt, drop, or inject packets, if any. Collecting summary data adds to additional performance compared to normal packet processing, and can help to isolate a troublesome interface.

(CSR の Packet Trace 章「Table 1. Packet-Trace Level」・csr1000v の本・Updated: April 15, 2020)

同じ章は、条件の書き方の語順を 2 通り載せます。手順の要約の構文の行は ipv4 を interface より前に置き、別の手順の例の行は interface から書きます。

debug platform condition [ipv4 | ipv6] [interface interface ][access-list access-list -name | ipv4-address / subnet-mask | ipv6-address / subnet-mask ] [ingress | egress |both]

(CSR の Packet Trace 章「Configuring Packet Trace」の手順の要約・csr1000v の本・Updated: April 15, 2020)

Router# debug platform condition interface gi0/0/0 ipv4 access-list acl2 both

(CSR の Packet Trace 章「Configure Packet Tracer with UDF offset」の例・csr1000v の本・Updated: April 15, 2020)

ISR 4000 の Packet Trace 章も、同じ例の行を interface から書きます。どちらの語順が正しいとは書きません(§14.5)。

Router# debug platform condition interface gi0/0/0 ipv4 access-list acl2 both

(ISR 4000 の Packet Trace 章「Configure Packet Tracer with UDF offset」の例・IOS XE 17・Cisco 4000 Series ISR)

CSR の Packet Trace 章の機能情報の表は、Amsterdam 17.3.1 の行に、IOSd が送った・IOSd 宛てのパケットの trace の情報が足されたと書きます。

The output of the show platform packet-trace command now includes additional trace information for packets either originated from IOSd or destined to IOSd or other BinOS processes.

(CSR の Packet Trace 章「Table 4. Feature Information for Packet Trace」・csr1000v の本・Updated: April 15, 2020)

取得した 22 本の資料に、Packet Consumed・QFP ICMP generated packet・INJ.9 の文字列は 0 件です(数えた)。packet trace の State と Reason の列は機器の逐語として並べ、資料の言葉で言い換えません。

9.2 R1 を通過する通信と debug ip packet

P6 は、R1 に debug ip packet を入れたまま、R2 の Lo0(10.81.0.2・global)から Lo1(10.81.0.3・VRF B)へ ping を送りました(§3.2 の traceroute のとおり、R1 を通る通信)。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug の返事は以下のとおりです。

snippet
R1# debug ip packet
IP packet debugging is on

R2(csr1000v 17.03.08a・RAM 4096 MB)の ping は以下のとおりで、5/5 でした。

snippet
R2# ping 10.81.0.3 source Loopback0 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.0.3, timeout is 2 seconds:
Packet sent with a source address of 10.81.0.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の undebug all の返事は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

その後の show logging のバッファの空でない 42 行は、172.16.1.4 を含む行が 40 行、224.0.0.5 を含む行が 2 行でした。10.81.0. を含む行は 0 行です(記録 = バッファ・窓の前後の見出しに dropped などの増えは無い〔ツール側〕)。R1(csr1000v 17.03.08a・RAM 4096 MB)の show logging の抜粋は以下のとおりです。

snippet
R1# show logging
…(省略)
Log Buffer (1000000 bytes):

*Nov  8 12:15:17.271: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:15:17.271: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 120, sending
*Nov  8 12:15:17.272: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:17.272: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
*Nov  8 12:15:17.536: IP: s=10.81.13.1 (local), d=224.0.0.5 (GigabitEthernet3), len 100, sending broad/multicast
*Nov  8 12:15:19.530: IP: s=10.81.12.1 (local), d=224.0.0.5 (GigabitEthernet2), len 100, sending broad/multicast
…(省略)

この機器では、R1 を通過する通信の行は R1 の debug ip packet のバッファにありませんでした。P6 のコンソールは informational で、P6 ではコンソールの記録の窓と vty の受信は撮っていません(数えた記録はバッファだけ)。

9.3 packet trace の 1 本目(通過の通信)

R1 の debug platform condition の ? のヘルプには、ipv4・interface・both・start・stop など 13 個が並びました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# debug platform condition ?
  application  Debug Application conditions
  both         Simultaneous ingress and egress debug
  egress       Egress only debug
  feature      For a specific feature
  ingress      Ingress only debug
  interface    Set interface for conditional debug
  ipv4         Debug IPv4 conditions
  ipv6         Debug IPv6 conditions
  mac          Debug MAC conditions
  match        Describe inline acl filters
  mpls         Debug MPLS conditions
  start        Start conditional debug
  stop         Stop conditional debug

R1#debug platform condition

R1 の debug platform packet-trace packet の ? のヘルプは、パケットの数の範囲(<16-8192>)と、2 のべき乗であることを示しました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# debug platform packet-trace packet ?
  <16-8192>  Packet count, value must be a power of two

R1#debug platform packet-trace packet

本ラボの packet trace の手順は、パケットの数と FIA trace の指定 → 条件 → start → R2 の ping → stop の順です。R1(csr1000v 17.03.08a・RAM 4096 MB)の debug platform packet-trace packet 16 fia-trace の返事は以下のとおりです。

snippet
R1# debug platform packet-trace packet 16 fia-trace
 Please remember to turn on 'debug platform condition start' for packet-trace to work

条件は debug platform condition ipv4 10.81.0.3/32 both の形で受理されました。取得スクリプトは条件の形の候補を 4 本用意し、1 本目のこの形が受理されたので残りは送っていません〔ツール側〕。受理された形は interface を含まないので、ipv4 と interface のどちらが先かは試していません。R1(csr1000v 17.03.08a・RAM 4096 MB)の条件の投入(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition ipv4 10.81.0.3/32 both

R1(csr1000v 17.03.08a・RAM 4096 MB)の start(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition start

start の直後の show platform condition は、Global State が Start で、条件の行は All Interfaces と IPV4 [10.81.0.3/32]・Direction は both でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform condition

Conditional Debug Global State: Start

Conditions                                                                                     Direction
----------------------------------------------------------------------------------------------|---------
All Interfaces                           & IPV4 [10.81.0.3/32]                                 both
…(省略)

packet trace の設定は、送った形に data-size 2048 が付いた 1 行で表示されました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace configuration
debug platform packet-trace packet 16 fia-trace data-size 2048

CSR の Packet Trace 章は、data-size の既定を 2048 と書きます。

data-size —Specifies the size of data buffers for storing feature and FIA trace data for each packet in bytes. When very heavy packet processing is performed on packets, users can increase the size of the data buffers if necessary. The default value is 2048.

(CSR の Packet Trace 章「Configuring Packet Trace」・csr1000v の本・Updated: April 15, 2020)

start の後の show debugging は、IOSXE の条件付き debug の段(Global State と条件の行)と、packet trace の設定の段を並べました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Start

Conditions                                                                                     Direction
----------------------------------------------------------------------------------------------|---------
All Interfaces                           & IPV4 [10.81.0.3/32]                                 both
…(省略)
IOSXE Packet Tracing Configs:
debug platform packet-trace packet 16 fia-trace data-size 2048
…(省略)

start と stop の間に、R2 は Lo0 から Lo1 への ping を 5 本(5/5)と、R1 の Gi2(10.81.12.1)への ping を 3 本(3/3)送りました。R2(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目は以下のとおりです。

snippet
R2# ping 10.81.0.3 source Loopback0 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.81.0.3, timeout is 2 seconds:
Packet sent with a source address of 10.81.0.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の stop(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition stop

stop の後の statistics は、Matched 10・Traced 10 で、Forward が 10・Punt と Drop と Consume が 0 でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace statistics
Packets Summary
  Matched  10
  Traced   10
Packets Received
  Ingress  10
  Inject   0
Packets Processed
  Forward  10
  Punt     0
  Drop     0
  Consume  0
…(省略)

summary の 10 行は、どれも State が FWD で Reason の列は空でした。偶数の Pkt は Input Gi2 → Output Gi3、奇数の Pkt は Gi3 → Gi2 です(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace summary
Pkt   Input                     Output                    State  Reason
0     Gi2                       Gi3                       FWD
1     Gi3                       Gi2                       FWD
2     Gi2                       Gi3                       FWD
3     Gi3                       Gi2                       FWD
4     Gi2                       Gi3                       FWD
5     Gi3                       Gi2                       FWD
6     Gi2                       Gi3                       FWD
7     Gi3                       Gi2                       FWD
8     Gi2                       Gi3                       FWD
9     Gi3                       Gi2                       FWD

packet 0 の詳細は、Input GigabitEthernet2・Output GigabitEthernet3・State FWD・Source 10.81.0.2・Destination 10.81.0.3・Protocol 1 (ICMP) でした。feature の並びは IPV4(Input) で始まり、2 つ目が DEBUG_COND_INPUT_PKT、最後が MARMOT_SPA_D_TRANSMIT_PKT の 21 個です。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示の抜粋は以下のとおりです。

snippet
R1# show platform packet-trace packet 0
Packet: 0           CBUG ID: 0
Summary
  Input     : GigabitEthernet2
  Output    : GigabitEthernet3
  State     : FWD
  Timestamp
    Start   : 723497330856 ns (11/08/2026 12:15:39.832996 UTC)
    Stop    : 723497345613 ns (11/08/2026 12:15:39.833011 UTC)
Path Trace
  Feature: IPV4(Input)
    Input       : GigabitEthernet2
    Output      : <unknown>
    Source      : 10.81.0.2
    Destination : 10.81.0.3
    Protocol    : 1 (ICMP)
  Feature: DEBUG_COND_INPUT_PKT
    Entry       : Input - 0x812657e0
    Input       : GigabitEthernet2
    Output      : <unknown>
    Lapsed time : 283 ns
…(省略)
  Feature: DEBUG_COND_OUTPUT_PKT
    Entry       : Output - 0x812657ec
    Input       : GigabitEthernet2
    Output      : GigabitEthernet3
    Lapsed time : 240 ns
  Feature: MARMOT_SPA_D_TRANSMIT_PKT
    Entry       : Output - 0x812a5f5c
    Input       : GigabitEthernet2
    Output      : GigabitEthernet3
    Lapsed time : 2518 ns

packet 1 は、向きが逆(Source 10.81.0.3・Destination 10.81.0.2)で、Input GigabitEthernet3・Output GigabitEthernet2・State FWD でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace packet 1
Packet: 1           CBUG ID: 1
Summary
  Input     : GigabitEthernet3
  Output    : GigabitEthernet2
  State     : FWD
  Timestamp
    Start   : 723497862873 ns (11/08/2026 12:15:39.833528 UTC)
    Stop    : 723497868995 ns (11/08/2026 12:15:39.833535 UTC)
Path Trace
  Feature: IPV4(Input)
    Input       : GigabitEthernet3
    Output      : <unknown>
    Source      : 10.81.0.3
    Destination : 10.81.0.2
    Protocol    : 1 (ICMP)
…(省略)

この機器では、R1 を通過する通信は debug ip packet のバッファに行が無く、packet trace の summary では FWD でした。debug の行と packet trace の記録は、別々の ping の送信で撮っています(§13)。

9.4 packet trace の 2 本目(R2 → R1 の ping)

2 本目は、条件を R2 の Gi2(10.81.12.2/32)にして、R2 から R1 の Gi2 へ ping を 3 本送りました。R1(csr1000v 17.03.08a・RAM 4096 MB)のパケットの数の投入の返事は、1 本目と同じ 1 行でした。

snippet
R1# debug platform packet-trace packet 16 fia-trace
 Please remember to turn on 'debug platform condition start' for packet-trace to work

R1(csr1000v 17.03.08a・RAM 4096 MB)の条件の投入(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition ipv4 10.81.12.2/32 both

R1(csr1000v 17.03.08a・RAM 4096 MB)の start(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition start

R2(csr1000v 17.03.08a・RAM 4096 MB)の ping は以下のとおりで、3/3 でした。

snippet
R2# ping 10.81.12.1 repeat 3
Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 10.81.12.1, timeout is 2 seconds:
!!!
Success rate is 100 percent (3/3), round-trip min/avg/max = 1/1/1 ms

2 本目は、start のまま R1 で undebug all を打ち、状態を撮ってから stop しました(§10.3)。R1(csr1000v 17.03.08a・RAM 4096 MB)の stop(返事は空の行)は以下のとおりです。

snippet
R1# debug platform condition stop

stop の後の statistics は、Matched 10・Traced 10 で、Received の Ingress が 7・Inject が 3、Processed の Forward が 3・Punt が 4・Consume が 3 でした。Inject の 3 と Punt のうち 3 は、Cause が QFP ICMP generated packet の行です(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace statistics
Packets Summary
  Matched  10
  Traced   10
Packets Received
  Ingress  7
  Inject   3
    Count       Code  Cause
    3           9     QFP ICMP generated packet
Packets Processed
  Forward  3
  Punt     4
    Count       Code  Cause
    3           26    QFP ICMP generated packet
    1           55    For-us control
  Drop     0
  Consume  3

          PKT_DIR_IN
             Dropped       Consumed       Forwarded
INFRA            0             0             0
TCP              0             0             0
UDP              0             0             0
IP               0             0             1
IPV6             0             0             0
ARP              0             0             0
…(省略)

summary は以下の 10 行でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace summary
Pkt   Input                     Output                    State  Reason
0     Gi2                       internal0/0/rp:0          PUNT   55  (For-us control)
1     Gi2                       Gi2                       CONS   Packet Consumed
2     Gi2                       internal0/0/recycle:0     PUNT   26  (QFP ICMP generated packet)
3     INJ.9                     Gi2                       FWD
4     Gi2                       Gi2                       CONS   Packet Consumed
5     Gi2                       internal0/0/recycle:0     PUNT   26  (QFP ICMP generated packet)
6     INJ.9                     Gi2                       FWD
7     Gi2                       Gi2                       CONS   Packet Consumed
8     Gi2                       internal0/0/recycle:0     PUNT   26  (QFP ICMP generated packet)
9     INJ.9                     Gi2                       FWD

この機器では、R2 → R1 の ping の packet trace は、summary の State と Reason の列で以下の 3 つの形になりました。

PktInputOutputStateReason
1・4・7Gi2Gi2CONSPacket Consumed
2・5・8Gi2internal0/0/recycle:0PUNT26 (QFP ICMP generated packet)
3・6・9INJ.9Gi2FWD(空)

本ラボのこの run では、2 本目の summary の packet 0 は、ping の packet ではなく OSPF の packet でした。packet 0 の詳細は、Output internal0/0/rp:0・State PUNT 55 (For-us control)・Source 10.81.12.2・Destination 224.0.0.5・Protocol 89 (OSPFIGP) で、後ろの IOSd Path Flow の段に FORWARDED To transport layer の行が在りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示の抜粋は以下のとおりです。

snippet
R1# show platform packet-trace packet 0
Packet: 0           CBUG ID: 10
Summary
  Input     : GigabitEthernet2
  Output    : internal0/0/rp:0
  State     : PUNT 55  (For-us control)
  Timestamp
    Start   : 787716975938 ns (11/08/2026 12:16:44.19407 UTC)
    Stop    : 787717003238 ns (11/08/2026 12:16:44.19434 UTC)
Path Trace
  Feature: IPV4(Input)
    Input       : GigabitEthernet2
    Output      : <unknown>
    Source      : 10.81.12.2
    Destination : 224.0.0.5
    Protocol    : 89 (OSPFIGP)
…(省略)
IOSd Path Flow: Packet: 0    CBUG ID: 10
  Feature: INFRA
  Pkt Direction: IN
    Packet Rcvd From DATAPLANE

  Feature: IP
  Pkt Direction: IN
    Packet Enqueued in IP layer
    Source      : 10.81.12.2
    Destination : 224.0.0.5
    Interface   : GigabitEthernet2

  Feature: IP
  Pkt Direction: IN
  FORWARDED To transport layer
    Source        : 10.81.12.2
    Destination   : 224.0.0.5
    Interface     : GigabitEthernet2

R2 → R1 の ping の要求は packet 1 でした。詳細は、Input と Output が GigabitEthernet2・State CONS Packet Consumed・Source 10.81.12.2・Destination 10.81.12.1・Protocol 1 (ICMP) で、ICMPV4(Input) の feature の Type は 8 (Echo) です。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示の抜粋は以下のとおりです。

snippet
R1# show platform packet-trace packet 1
Packet: 1           CBUG ID: 11
Summary
  Input     : GigabitEthernet2
  Output    : GigabitEthernet2
  State     : CONS Packet Consumed
  Timestamp
    Start   : 788500684144 ns (11/08/2026 12:16:44.803115 UTC)
    Stop    : 788500708716 ns (11/08/2026 12:16:44.803140 UTC)
Path Trace
  Feature: IPV4(Input)
    Input       : GigabitEthernet2
    Output      : <unknown>
    Source      : 10.81.12.2
    Destination : 10.81.12.1
    Protocol    : 1 (ICMP)
  Feature: DEBUG_COND_INPUT_PKT
    Entry       : Input - 0x812657e0
    Input       : GigabitEthernet2
    Output      : <unknown>
    Lapsed time : 264 ns
…(省略)
  Feature: ICMPV4(Input)
    Input       : GigabitEthernet2
    Output      : <unknown>
    Type        : 8 (Echo)
    Code        : 0 (No Code)
…(省略)

詳細を撮ったのは packet 0 と packet 1 だけで、Pkt 2 から Pkt 9 までの Source・Destination・Protocol は撮っていません。Reason が 26 (QFP ICMP generated packet) の PUNT と、Input が INJ.9 の FWD は、CONS の行(Pkt 1・4・7)とは別の Pkt 番号の行に並びました。

中身を撮った Pkt 1 は Type が 8 (Echo) で、Pkt 4・7 は summary の行の形が同じというだけです。CONS の行と、この 2 つの形の行との対応は、summary の行の並びのほかに撮っていません。この 2 つの形を「機器が作った packet」と呼びますが、機器の逐語は State と Reason の列(と statistics の Cause の行)までです。

R2 → R1 の ping について本ラボが撮ったのは、debug ip icmp の 3 つの記録(§4.4)と ACL なしの debug ip packet のバッファ(§8.3)に行が無かったことと、packet trace の State と Reason の列の逐語です。2 つの記録を結ぶ記録は撮っておらず、packet trace の列の値を、debug の行が無かったことの説明には使いません。§9.1 の Debug リファレンス(I〜L)の文も、資料の文として並べるだけです。

この図を大きく開く ↗

debug ip packet に行が出た通信と出なかった通信を並べ、R1 の packet trace の Input・Output・State・Reason の列を添えた図です。

10. 片付け

10.1 資料の止め方

15M&T の Troubleshooting 章は、no の形がその debug の行を止めると書き、出力が要らなければプロトコルごとの debug を全部止めると書きます。

Turns message logging off for the specified debug command.

(15M&T の Troubleshooting 章「Enabling Debug Operations」の表・IOS Release 15M&T)

If you do not want output, disable all the protocol-specific debug commands.

(15M&T の Troubleshooting 章「Enabling Protocol-Specific debug Commands」・IOS Release 15M&T)

undebug all を述べる文は、取得した 22 本の中では CF リファレンス(L〜mode)の logging buginf の頁の 1 か所だけで、undebug all の頁はありません。

The no logging buginf command is used to avoid a situation where a large amount of debug messages might overload the processor (CPU hog condition). This condition differs from the use of the undebug all command wherein all debugging calls are disabled in the Cisco IOS software.

(CF リファレンス(L〜mode)「logging buginf」の Usage Guidelines・IOS の本)

条件の外し方について、15M&T の Troubleshooting 章は no debug condition all で全部の interface の出力に戻ると書きます。Debug リファレンス(A〜D)は、条件を外す前に debug を止めておくと、条件を外した時の大量の出力を防げると書きます(debug condition の頁の、GGSN の debug gprs の命令についての注意)。

To reenable the debugging output for all interfaces, enter the no debug condition all command.

(15M&T の Troubleshooting 章「Limiting the Number of Messages Based on Conditions」・IOS Release 15M&T)

In addition, ensure that you disable the debug gprs gtp and debug gprs charging commands using the no debug all command before disabling conditional debugging using the no debug condition command. This will prevent a flood of debugging messages when you disable conditional debugging.

(Debug リファレンス(A〜D)「debug condition」・IOS の本)

Debug リファレンス(A〜D)の見本は、最後の条件を外す時の警告と確認を以下の形で載せます。

Removing all conditions may cause a flood of debugging messages to result, unless specific debugging flags are first removed.

(Debug リファレンス(A〜D)「debug condition interface」の見本・IOS の本)

Proceed with removal? [yes/no]: y

(Debug リファレンス(A〜D)「debug condition interface」の見本・IOS の本)

CSR の Packet Trace 章は、clear platform condition all を、debug platform condition と debug platform packet-trace の設定を消すコマンドと書きます。

Removes the configurations provided by the debug platform condition and debug platform packet-trace commands.

(CSR の Packet Trace 章「Configuring Packet Trace」・csr1000v の本・Updated: April 15, 2020)

10.2 IOS の debug condition の片付け

§7.4 では、条件が残っている間の no debug condition all が確認の後に 1 conditions have been removed で通りました。P5 では続けて、もう一度条件を入れ、条件だけが入っている間に undebug all を打ちました。R1(csr1000v 17.03.08a・RAM 4096 MB)の条件の投入の返事は以下のとおりです。

snippet
R1# debug condition interface GigabitEthernet2
Condition 1 set

undebug all は、All possible debugging has been turned off の前に 1 conditions have been removed を返しました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# undebug all
1 conditions have been removed
All possible debugging has been turned off

その後の show debug condition は、条件が無いという返事でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debug condition


% No conditions found

その後の no debug condition all は、同じ確認の後に % Could not remove conditions を返しました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# no debug condition all
Removing all conditions may cause a flood of debugging
messages to result, unless specific debugging flags
are first removed.

Proceed with the removal of all conditions? [yes/no]: yes
% Could not remove conditions

最後の片付けの段(PZ)でも、undebug all の後の no debug condition all は同じ返事でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の PZ の undebug all は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

R1(csr1000v 17.03.08a・RAM 4096 MB)の PZ の no debug condition all は以下のとおりです。

snippet
R1# no debug condition all
Removing all conditions may cause a flood of debugging
messages to result, unless specific debugging flags
are first removed.

Proceed with the removal of all conditions? [yes/no]: yes
% Could not remove conditions

この機器では、undebug all は IOS の debug condition を外し(1 conditions have been removed)、その後の no debug condition all は % Could not remove conditions を返しました。確認の文言は、全部の条件の削除を問う形でした。資料の見本の確認(Proceed with removal? の形)は、最後の 1 つの条件を外す no debug condition interface atm 1/0 vc 4335 への確認で、命令が違うので比べません(§14.4)。

10.3 platform の条件と packet trace の設定

1 本目の trace では、stop の後に undebug all を打ち、show platform condition・show platform packet-trace configuration・show debugging の 3 本を撮りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の undebug all の返事は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

undebug all の後も、条件の行(IPV4 [10.81.0.3/32])が残っていました。R1(csr1000v 17.03.08a・RAM 4096 MB)の show platform condition は以下のとおりです。

snippet
R1# show platform condition

Conditional Debug Global State: Stop

Conditions                                                                                     Direction
----------------------------------------------------------------------------------------------|---------
All Interfaces                           & IPV4 [10.81.0.3/32]                                 both
…(省略)

packet trace の設定の行も残っていました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace configuration
debug platform packet-trace packet 16 fia-trace data-size 2048

この機器では、undebug all の後も platform の条件と packet trace の設定が表示に残りました(Global State は Stop)。2 本目の trace では、start のまま undebug all を打ちました。R1(csr1000v 17.03.08a・RAM 4096 MB)の undebug all の返事は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

本ラボのこの run では、start のまま打った undebug all の後の Global State は Stop で、条件の行(IPV4 [10.81.12.2/32])は残りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の show platform condition は以下のとおりです。

snippet
R1# show platform condition

Conditional Debug Global State: Stop

Conditions                                                                                     Direction
----------------------------------------------------------------------------------------------|---------
All Interfaces                           & IPV4 [10.81.12.2/32]                                both
…(省略)

packet trace の設定の行も残りました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace configuration
debug platform packet-trace packet 16 fia-trace data-size 2048

2 本目の undebug all の前の Global State の行は撮っていません(1 本目の start の直後は Start・§9.3)。

stop の後は、clear platform condition all → clear platform packet-trace configuration → clear platform packet-trace statistics の順に打ち、clear ごとに同じ 3 本の show を撮りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の 1 本目の clear platform condition all(返事は空の行)は以下のとおりです。

snippet
R1# clear platform condition all

clear platform condition all の直後の show platform condition は、Global State の行だけになりました(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform condition

Conditional Debug Global State: Stop

show platform packet-trace configuration は、空の返事でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show platform packet-trace configuration

show debugging の本文は、P0 の何も入れていない時の show debugging と同じ形でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

残りの 2 つの clear(返事はどちらも空の行)の後の 3 本の show も、同じ本文でした。R1(csr1000v 17.03.08a・RAM 4096 MB)の configuration の clear は以下のとおりです。

snippet
R1# clear platform packet-trace configuration

R1(csr1000v 17.03.08a・RAM 4096 MB)の statistics の clear は以下のとおりです。

snippet
R1# clear platform packet-trace statistics

本ラボのこの run では、1 本目と 2 本目のどちらも、clear platform condition all の直後に、条件の行と packet trace の設定の行の両方が 3 本の show から消えました。残りの 2 つの clear は、両方が既に無い状態に打っています。どの clear が何を消すかは、この run の並びでは分けられていません(§13)。

10.4 片付けの後のログの設定

PZ の show debugging は、P0 の何も入れていない時と同じ本文でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show debugging
IOSXE Conditional Debug Configs:

Conditional Debug Global State: Stop


IOSXE Packet Tracing Configs:




Packet Infra debugs:

Ip Address                                               Port
------------------------------------------------------|----------

PZ では、ログの設定を P0 の値(day0 にログの設定を入れずに起動した直後の値)に戻していません。running-config には logging buffered 1000000 が残り、コンソールの水準は P9 の最後の run で入れた logging console debugging のままでした。PZ の素の running-config に、logging console の行はありませんでした。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show running-config | include ^logging|^service timestamps
service timestamps debug datetime msec
service timestamps log datetime msec
logging buffered 1000000

R1(csr1000v 17.03.08a・RAM 4096 MB)の PZ の show logging の見出しは以下のとおりです。

snippet
R1# show logging | include messages logged|logging:
Syslog logging: enabled (354596 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 260275 messages logged, xml disabled,
    Monitor logging: level debugging, 40 messages logged, xml disabled,
    Buffer logging:  level debugging, 375786 messages logged, xml disabled,
    Persistent logging: disabled
    Trap logging: level informational, 130 message lines logged

片付けの手順と、本ラボで見たことは以下のとおりです。

対象打ったコマンド本ラボで見たこと
IOS の debugundebug allAll possible debugging has been turned off(どの段でも)
IOS の debug condition(条件だけが入っている間)undebug all1 conditions have been removed が先に出た(§10.2)
IOS の debug condition(条件が残っている間)no debug condition all確認の後に 1 conditions have been removed(§7.4)
IOS の debug condition(undebug all の後)no debug condition all確認の後に % Could not remove conditions(§10.2)
platform の条件と packet trace の設定undebug all表示に残った(§10.3)
platform の条件と packet trace の設定clear platform condition all直後の 3 本の show から両方が消えた(§10.3)
vty の受信terminal no monitorR1 mon で P2・P3 の窓の後に入れた(§4.3・§5.3)
ログの設定(戻していない)logging buffered 1000000 が running-config に残った

最後の clear platform condition all は P6 の 2 本目の後で、PZ では show platform condition を撮っていません。PZ の platform の条件の状態は、PZ の show debugging の IOSXE Conditional Debug Configs の段でだけ見えます。


11. debug の負荷

11.1 資料の負荷の注意

Debug リファレンス(I〜L)は、debug ip packet の detail と dump が、このコマンドの選択肢の中で最も多く資源を使うと書きます。§11 の負荷の段は、detail を付けた debug ip packet を使いました。

Enabling the detail and dump keywords use the highest level of system resources of the available configuration options for this command, so a high level of caution should be applied when enabling either of these keywords.

(Debug リファレンス(I〜L)「debug ip packet」の Caution・IOS の本)

ESM リファレンスは、コンソールは遅い表示の機器で、出力が溢れるとコンソールの queue が満ちて行が黙って落ちうると書きます。logger の queue の大きさを変える頁は、出来事の行が一度に来ると行が落ちうると書きます。

The console is a slow display device. In message storms some logging messages may be silently dropped when the console queue becomes full. Set severity levels accordingly.

(ESM リファレンス「logging console」の Caution・IOS の本)

Tuning the queue size is sometimes required when Cisco technical support staff needs to reduce the possibility that logging messages are dropped because the event messages are bursty.

(ESM リファレンス「logging queue-limit」の Usage Guidelines・IOS の本)

コンソールの保証を有効にした時について、ESM リファレンスは、debug の出力以外の機能を止めることがあり、時間の厳しい機能が失敗しうると書きます。本ラボの R1 の既定は no logging console guaranteed でした(§4.2)。

If the amount of console debugging is too large, Cisco IOS software will periodically stop all functions except providing the debug message output. This guaranteed output of debugging information can be useful, but it can also cause certain time-critical functions of Cisco IOS software to fail. To disable the guarantee of console logging, use the no form of the command.

(ESM リファレンス「logging console guaranteed」・IOS の本)

CF リファレンス(show gsr〜)は、show logging の Syslog logging の行が、落ちた・rate-limit された・flush された件数を示すと書きます。

Shows the general state of system logging (enabled or disabled), the status of logged messages (number of messages dropped, rate-limited, or flushed), and whether XML formatting or ESM filtering is enabled.

(CF リファレンス(show gsr〜)「Table 7. show logging Field Descriptions」・IOS の本)

CF リファレンス(show monitor permit〜)は、show processes cpu をプロセスごとの CPU の詳しい統計のコマンドと書き、CPU utilization for five seconds の欄を直近 5 秒の値と書きます。2 つ目の数は割り込みの時間の割合です。

To display detailed CPU utilization statistics (CPU use per process) when Cisco IOS, Cisco IOS XE, or Cisco IOS Software Modularity images are running, use the show processes cpu command in user EXEC or privileged EXEC mode.

(CF リファレンス(show monitor permit〜)「show processes cpu」・IOS の本)

CPU utilization for the last 5 seconds. The second number indicates the percent of CPU time spent at the interrupt level.

(CF リファレンス(show monitor permit〜)「show processes cpu」の表・IOS の本)

同じ頁は、history のグラフの最大は 1 秒ごとに記録し、平均は 1 秒より長い区間で計算すると書きます。

Maximum usage is measured and recorded every second; average usage is calculated on periods of more than one second. Consistently high CPU utilization over an extended period indicates a problem.

(CF リファレンス(show monitor permit〜)「show processes cpu」の Usage Guidelines・IOS の本)

ISR 4000 の Process Health 章は、これらのコマンドの値は Cisco IOS のプロセスから見た値で、platform 全体の資源を含まないと書きます。CSR の VM の章は、同じホストの他の VM が csr1000v の性能に影響しうると書きます。

These commands provide a representation of memory and CPU utilization from the perspective of only the Cisco IOS process; they do not include information for resources on the entire platform.

(ISR 4000 の Process Health 章「Cisco IOS Process Resources」・IOS XE 17・Cisco 4000 Series ISR)

When troubleshooting performance issues, note that other VMs on the same host as the Cisco CSR 1000v can impact the performance of the Cisco CSR 1000v VM. Verify that other VMs on the host are not causing memory issues that are impacting the Cisco CSR 1000v VM.

(CSR の VM の章「Troubleshooting—Memory」・csr1000v の本・Updated: April 15, 2020)

17.x の Basic System Management 章は、普段は switching が中央の処理装置を要るだけ使い、負荷が重く routing protocol の時間が無い時は scheduler の優先度を考えると書きます。

The normal operation of the network server allows the switching operations to use as much of the central processor as required. If the network is running unusually heavy loads that do not allow the processor the time to handle the routing protocols, you may need to give priority to the system process scheduler.

(17.x の Basic System Management 章「Switching and Scheduling Priorities」・IOS XE 17.x)

ISR 4000 の Process Health 章は、普段の監視で普段の負荷の基準を作ると書きます。本ラボは、debug を入れない run 0 を各 round の最初に置き、比べる基準にしました。

Regular monitoring establishes a baseline for a normal system load.

(ISR 4000 の Process Health 章「Avoiding Problems Through Regular Monitoring」・IOS XE 17・Cisco 4000 Series ISR)

11.2 4 つの run と 3 round

P9 は、R1 で 4 つの run を 3 回くり返しました(3 round)。どの run も、負荷は R1 main からの ping 10.81.12.2 repeat 3000 です。

runR1 のログの設定debug負荷
run 0logging console informational(round の頭の設定のまま)入れないping 3000 本
Alogging console debuggingdebug ip packet detail(ACL なし)ping 3000 本
Blogging console informationaldebug ip packet detail(ACL なし)ping 3000 本
Clogging console debugging と logging rate-limit console 10debug ip packet detail(ACL なし)ping 3000 本

round の中の順は、round 1 が run 0 → A → B → C、round 2 が run 0 → C → B → A、round 3 が run 0 → B → C → A です。各 round の頭で logging console informational を入れ直し、show running-config all で rate-limit とコンソールの行を撮りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の round 1 の頭の投入は以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#logging console informational
R1(config)#end
R1#

R1(csr1000v 17.03.08a・RAM 4096 MB)の round 1 の頭の show running-config all の抜粋は以下のとおりです。

snippet
R1# show running-config all | include rate-limit|logging console
logging rate-limit console 40 except errors
no logging console guaranteed
logging console informational
ip icmp rate-limit unreachable 500
monitor event-trace eigrp perf-events rate-limiting 1
 rate-limit 20

3 round とも、rate-limit の行・guaranteed の行・logging console の行は同じ並びでした。round 1 の run 0 の前の見出しは、messages dropped が 0 でした(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show logging | include messages logged|logging:|Log Buffer
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
    Console logging: level informational, 117 messages logged, xml disabled,
    Monitor logging: level debugging, 40 messages logged, xml disabled,
    Buffer logging:  level debugging, 917 messages logged, xml disabled,
    Persistent logging: disabled
    Trap logging: level informational, 78 message lines logged
Log Buffer (1000000 bytes):

どの run も、ping の戻りから 2 秒後に R1 aux で CPU の 5 秒の値を採る決めで、debug を入れた run は戻りから 5 秒後に R1 aux から undebug all を打つ決めです〔ツール側〕。実際の遅れは run ごとに取得スクリプトの判定メモに在ります。採取の遅れは、最も早い run で 2.1 秒、最も遅い run で 4.1 秒でした〔ツール側〕。debug を入れる前には、R1 main の show clock が答えるかを確かめました(9 run とも通った〔ツール側〕)。

1 つの run の流れを、round 1 の run A で示します。R1(csr1000v 17.03.08a・RAM 4096 MB)の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#logging console debugging
R1(config)#end
R1#

R1(csr1000v 17.03.08a・RAM 4096 MB)の debug の返事は以下のとおりです。

snippet
R1# debug ip packet detail
IP packet debugging is on (detailed)

R1(csr1000v 17.03.08a・RAM 4096 MB)の負荷の ping は以下のとおりで、3000/3000 でした。

snippet
R1# ping 10.81.12.2 repeat 3000
Type escape sequence to abort.
Sending 3000, 100-byte ICMP Echos to 10.81.12.2, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
…(省略)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (3000/3000), round-trip min/avg/max = 1/1/256 ms

R1(csr1000v 17.03.08a・RAM 4096 MB)の R1 aux の ping の直後の CPU の採取は以下のとおりです。

snippet
R1# show processes cpu | include CPU utilization
CPU utilization for five seconds: 29%/9%; one minute: 9%; five minutes: 3%

R1(csr1000v 17.03.08a・RAM 4096 MB)の R1 aux の undebug all は以下のとおりです。

snippet
R1# undebug all
All possible debugging has been turned off

run の後の見出しは以下のとおりです(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show logging | include messages logged|logging:|Log Buffer
Syslog logging: enabled (35072 messages dropped, 3 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
    Console logging: level debugging, 46268 messages logged, xml disabled,
    Monitor logging: level debugging, 40 messages logged, xml disabled,
    Buffer logging:  level debugging, 47068 messages logged, xml disabled,
    Persistent logging: disabled
    Trap logging: level informational, 84 message lines logged
Log Buffer (1000000 bytes):

バッファに残った IP: の行の数は以下のとおりです(R1 csr1000v 17.03.08a・RAM 4096 MB)。

snippet
R1# show logging | count IP:
Number of lines which match regexp = 3184

この数は 1,000,000 バイトのバッファに残った行の数で、量の比べには使いません。debug を入れた 9 run の後は 3183・3184・3189 のどれかで、run 0 の後は 3 round とも 0 でした。

run C は、logging console debugging と logging rate-limit console 10 を入れてから debug を入れました。R1(csr1000v 17.03.08a・RAM 4096 MB)の round 1 の run C の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#logging console debugging
R1(config)#logging rate-limit console 10
R1(config)#end
R1#

R1(csr1000v 17.03.08a・RAM 4096 MB)の投入の後の running-config は以下のとおりです。

snippet
R1# show running-config | include ^logging
logging buffered 1000000
logging rate-limit console 10

run C の後始末では、P0 で読んだ機器の既定の行(logging rate-limit console 40 except errors)を入れ直しました。R1(csr1000v 17.03.08a・RAM 4096 MB)の投入のエコーは以下のとおりです。

snippet
configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#logging rate-limit console 40 except errors
R1(config)#end
R1#

11.3 debug の行の中身と管理の SSH の行

run A の窓のコンソールの記録には、R1 の Gi1 と 172.16.1.4 の間の行と、負荷の ping の行が並びました。round 1 の run A の窓では、172.16.1.241 から 172.16.1.4 へ送る sending の行が 66 行在り、66 行とも次の行が TCP src=22 の行です(round 2 の run A の窓では、66 行のうち 64 行)。R1(csr1000v 17.03.08a・RAM 4096 MB)のコンソールの記録(round 1 の run A の窓の差分〔ツール側〕)の抜粋は以下のとおりです。

snippet
*Nov  8 12:19:11.027: FIBipv4-packet-proc: route packet from (local) src 172.16.1.241 dst 172.16.1.4
*Nov  8 12:19:11.027: FIBfwd-proc: packet routed by adj to GigabitEthernet1 172.16.1.4
*Nov  8 12:19:11.027: FIBipv4-packet-proc: packet routing succeeded
*Nov  8 12:19:11.027: IP: tableid=1, s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1) nexthop=172.16.1.4, routed via FIB
*Nov  8 12:19:11.027: IP: s=172.16.1.241 (local), d=172.16.1.4 (GigabitEthernet1), len 136, sending
*Nov  8 12:19:11.028:     TCP src=22, dst=58993, seq=3659493002, ack=3530788429, win=3856 ACK PSH
*Nov  8 12:19:11.029: FIBipv4-packet-proc: route packet from GigabitEthernet1 src 172.16.1.4 dst 172.16.1.241
*Nov  8 12:19:11.029: FIBfwd-proc: Mgmt-vrf:172.16.1.241/32 receive entry
*Nov  8 12:19:11.029: FIBipv4-packet-proc: packet routing failed
*Nov  8 12:19:11.029: IP: tableid=1, s=172.16.1.4 (GigabitEthernet1), d=172.16.1.241 (GigabitEthernet1) nexthop=172.16.1.241, routed via RIB
…(省略)
*Nov  8 12:19:13.330: FIBipv4-packet-proc: route packet from (local) src 10.81.12.1 dst 10.81.12.2
*Nov  8 12:19:13.330: FIBfwd-proc: packet routed by adj to GigabitEthernet2 10.81.12.2
*Nov  8 12:19:13.330: FIBipv4-packet-proc: packet routing succeeded
*Nov  8 12:19:13.330: IP: tableid=0, s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2) nexthop=10.81.12.2, routed via FIB
*Nov  8 12:19:13.330: IP: s=10.81.12.1 (local), d=10.81.12.2 (GigabitEthernet2), len 100, sending
*Nov  8 12:19:13.330:     ICMP type=8, code=0
*Nov  8 12:19:13.331: FIBipv4-packet-proc: route packet from GigabitEthernet2 src 10.81.12.2 dst 10.81.12.1
*Nov  8 12:19:13.331: FIBfwd-proc: Default:10.81.12.1/32 receive entry
*Nov  8 12:19:13.331: FIBipv4-packet-proc: packet routing failed
*Nov  8 12:19:13.331: IP: tableid=0, s=10.81.12.2 (GigabitEthernet2), d=10.81.12.1 (GigabitEthernet2) nexthop=10.81.12.1, routed via RIB
…(省略)

run A と run C の窓のコンソールの記録を、その IP を含む全部の行と、IP: s= の部分を含む行の 2 つの規則で数えると、以下のとおりでした〔ツール側〕。10.81.12.x・10.81.13.x の列は、224.0.0.5 宛ての OSPF の行(proto=89)も含みます。

round と run窓の行172.16.1.4 を含む行10.81.12.x・10.81.13.x を含む行IP: s= の部分のうち 172.16.1.4IP: s= の部分のうち 10.81.12.x・10.81.13.x
round 1 の A8403971196619
round 1 の C8394081076815
round 2 の C8063811186318
round 2 の A8483941316621
round 3 の C8504151096917
round 3 の A8393991176719

§11 の負荷の値は、ACL なしの debug ip packet detail を入れたまま ping 3000 本を流した時の値で、管理の SSH の debug を含みます。

11.4 値(3 round)

5 つの指標を、4 つの run と 3 round で撮りました。ping の所要秒は取得スクリプトの単調時計の値〔ツール側〕、RTT の max は ping の最後の行の値、messages dropped の差は run の前と後の見出しの差、コンソールの窓の debug の行の数はコンソールの記録の差分の debug の行(syslog の形の行を除く)の数、CPU の 5 秒の値は ping の直後の採取の値です。

run指標round 1round 2round 3範囲(最小〜最大)
run 0ping の所要秒〔ツール側〕4.84.74.84.7〜4.8
Aping の所要秒〔ツール側〕9.39.58.98.9〜9.5
Bping の所要秒〔ツール側〕6.66.67.46.6〜7.4
Cping の所要秒〔ツール側〕8.98.59.18.5〜9.1
run 0RTT の max(ms・ping の逐語)8474〜8
ARTT の max(ms・ping の逐語)256261301256〜301
BRTT の max(ms・ping の逐語)98178〜17
CRTT の max(ms・ping の逐語)253241237237〜253
run 0messages dropped の差(見出しの逐語)0000〜0
Amessages dropped の差(見出しの逐語)35072399114027435072〜40274
Bmessages dropped の差(見出しの逐語)41876435504211641876〜43550
Cmessages dropped の差(見出しの逐語)39623360033617136003〜39623
run 0コンソールの窓の debug の行の数0000〜0
Aコンソールの窓の debug の行の数840848838838〜848
Bコンソールの窓の debug の行の数0000〜0
Cコンソールの窓の debug の行の数838806850806〜850
run 0ping の直後の CPU の 5 秒の値(%)16272916〜29
Aping の直後の CPU の 5 秒の値(%)29303729〜37
Bping の直後の CPU の 5 秒の値(%)46623333〜62
Cping の直後の CPU の 5 秒の値(%)59542727〜59

run A・B・C の 9 つの窓は、どれも窓の前後の見出しで messages dropped の値が変わった窓です。この 9 つの窓では、「窓の中に〜の行は無い」の形では書きません。run B のコンソールの窓の debug の行の数 0 も、数えた値として並べるだけです。

11.5 3 round とも揃った関係

3 round とも同じ向きで、かつ 3 round の値の範囲(最小〜最大)が重ならない関係を「揃った」と呼びます。round で向きが割れた関係・範囲が重なる関係・同値の round が在る関係は「崩れた」とします。指標 5 つ × 組 5 つの全 25 組のうち、揃った関係は 16 組でした。

本ラボのこの run では、揃った 16 組の向きは以下のとおりでした。崩れた 9 組は §13.3 に名前だけを並べ、大小は書きません。

指標組round 1round 2round 3判定
ping の所要秒〔ツール側〕A と run 09.3 > 4.89.5 > 4.78.9 > 4.8揃った(A > run 0)
ping の所要秒〔ツール側〕B と run 06.6 > 4.86.6 > 4.77.4 > 4.8揃った(B > run 0)
ping の所要秒〔ツール側〕C と run 08.9 > 4.88.5 > 4.79.1 > 4.8揃った(C > run 0)
ping の所要秒〔ツール側〕A と B9.3 > 6.69.5 > 6.68.9 > 7.4揃った(A > B)
RTT の max(ms・ping の逐語)A と run 0256 > 8261 > 4301 > 7揃った(A > run 0)
RTT の max(ms・ping の逐語)C と run 0253 > 8241 > 4237 > 7揃った(C > run 0)
RTT の max(ms・ping の逐語)A と B256 > 9261 > 8301 > 17揃った(A > B)
RTT の max(ms・ping の逐語)C と A253 < 256241 < 261237 < 301揃った(C < A)
messages dropped の差(見出しの逐語)A と run 035072 > 039911 > 040274 > 0揃った(A > run 0)
messages dropped の差(見出しの逐語)B と run 041876 > 043550 > 042116 > 0揃った(B > run 0)
messages dropped の差(見出しの逐語)C と run 039623 > 036003 > 036171 > 0揃った(C > run 0)
messages dropped の差(見出しの逐語)A と B35072 < 4187639911 < 4355040274 < 42116揃った(A < B)
コンソールの窓の debug の行の数A と run 0840 > 0848 > 0838 > 0揃った(A > run 0)
コンソールの窓の debug の行の数C と run 0838 > 0806 > 0850 > 0揃った(C > run 0)
コンソールの窓の debug の行の数A と B840 > 0848 > 0838 > 0揃った(A > B)
ping の直後の CPU の 5 秒の値(%)B と run 046 > 1662 > 2733 > 29揃った(B > run 0)

ping の所要秒〔ツール側〕で揃ったのは、run 0 との 3 組(A・B・C)と、A と B の組です。RTT の max で揃ったのは計 4 組です。RTT の max の run 0 との組では、A と run 0・C と run 0 の 2 組が揃いました。残りの 2 組は A と B・C と A で、どちらも RTT の max で揃いました。

messages dropped の差で揃ったのは、run 0 との 3 組(A・B・C)と、A と B の組です。コンソールの窓の debug の行の数で揃ったのは計 3 組です。コンソールの窓の debug の行の数の run 0 との組では、A と run 0・C と run 0 の 2 組が揃いました。残りの 1 組は A と B で、この組もコンソールの窓の debug の行の数で揃いました。

ping の直後の CPU の 5 秒の値で揃ったのは、B と run 0 の 1 組だけです。CPU の 5 秒の値は、採った時点が run ごとにそろっていないので、値の意味は書きません。値はどれも負荷の原因を示すものとしては扱わず、測った値と規則の判定だけを並べます。

11.6 run C の logging rate-limit console 10

ESM リファレンスは、console のキーワードを、コンソールに出るエラーと debug の行の rate limit と書きます。R1 のヘルプは、console を「コンソールの行だけを絞る」、all を「debug の行を含む全部の行を絞る」と書きます。

Sets the rate limit for error and debug messages displayed at the console.

(ESM リファレンス「logging rate-limit」の構文の説明・IOS の本)

R1(csr1000v 17.03.08a・RAM 4096 MB)の設定モードの logging rate-limit ? のヘルプは以下のとおりです。

snippet
logging rate-limit ?
  <1-10000>  Messages per second
  all        Rate limit all messages, including debug messages
  console    Rate limit only console messages

R1(config)#logging rate-limit

コンソールの窓の debug の行の数の C と A の組は、round で向きが割れ、崩れた組に入りました。コンソールの窓の debug の行の数の範囲は、run C が 806〜850、run A が 838〜848 です。

P9 の見出しの messages rate-limited は、run C の後の 3 本を含む 16 本とも 3 で、どの窓でも窓の前後で変わっていません〔ツール側〕。この機器では、logging rate-limit console 10 を入れた run C の後の見出しでも、messages rate-limited は 3 のままでした。all のキーワードを使う形は試していません(§13)。

11.7 LOGGER_DROPPED の行

debug を入れた 9 run の後の show logging | include LOGGER_DROPPED には、%SYS-3-LOGGER_DROPPED の行が 1 行か 2 行在りました。run 0 の後は 0 行です。R1(csr1000v 17.03.08a・RAM 4096 MB)の round 1 の run A の後の表示は以下のとおりです。

snippet
R1# show logging | include LOGGER_DROPPED
*Nov  8 12:19:21.952: %SYS-3-LOGGER_DROPPED: System dropped 11927 console debug messages.

run B の窓のコンソールの記録は、数えた debug の行が 0 行で、syslog の形の行が 3 行(3 行とも %SYS-3-LOGGER_DROPPED)でした。R1(csr1000v 17.03.08a・RAM 4096 MB)のコンソールの記録(round 1 の run B の窓の差分〔ツール側〕)は以下のとおりです。

snippet
*Nov  8 12:20:18.899: %SYS-3-LOGGER_DROPPED: System dropped 14657 console debug messages.

*Nov  8 12:20:20.909: %SYS-3-LOGGER_DROPPED: System dropped 13328 console debug messages.

*Nov  8 12:20:23.173: %SYS-3-LOGGER_DROPPED: System dropped 13891 console debug messages.

%SYS-3-LOGGER_DROPPED の行の数と、行の中の数(N)の和は、記録ごとに以下のとおりでした〔ツール側〕。

round と runバッファ(include で絞った show logging)の行と N の和コンソールの窓の行と N の和
round 1 の A1 行・119270 行・0
round 1 の B1 行・138913 行・41876
round 1 の C1 行・128521 行・13603
round 2 の C1 行・99680 行・0
round 2 の B2 行・295343 行・43550
round 2 の A1 行・116920 行・0
round 3 の B1 行・106463 行・42116
round 3 の C1 行・119650 行・0
round 3 の A1 行・132301 行・13230

行の数と N の和が、バッファとコンソールの窓で違う run があります。違う理由は確かめていません(§13)。

11.8 各 run の後の show processes cpu history(補助)

各 run の後に R1 aux で撮った show processes cpu history の、60 秒の段を補助として並べます。60 秒の段のどの秒が ping の間に当たるかは確かめておらず、値の大小や run の間の比べは書きません。

round 1・run 0 の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                     1111122222
           11111111116666600000     11111                    22222
  100
   90
   80
   70
   60
   50
   40
   30
   20                **********
   10                **********
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 1・A の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                        222225555511111
         111111111122222999994444477777     11111
  100
   90
   80
   70
   60
   50                        *****
   40                        *****
   30                   **********
   20                   ***************
   10                   ***************
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 1・B の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                        4444444444
         11111     222226666655555          22222111115555511111
  100
   90
   80
   70
   60
   50                   **********
   40                   **********
   30                   **********
   20                   **********
   10                   **********                    *****
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 1・C の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                      222225555522222
      1          1111122222999996666622222          22222777774444
  100
   90
   80
   70
   60                      *****
   50                      *****
   40                      *****
   30                      **********
   20                 ***************
   10                 ***************                    *****
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 2・run 0 の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                        22222
                   555557777755555          111111111144444     11
  100
   90
   80
   70
   60
   50
   40
   30                   *****
   20                   *****
   10              ***************
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 2・C の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                           5555533333
       11111111111111177777444443333322222
  100
   90
   80
   70
   60
   50                      *****
   40                      *****
   30                      **********
   20                      **********
   10                 ***************
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 2・B の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                         6666633333
                    222222222233333          11111     2222244444
  100
   90
   80
   70
   60                    *****
   50                    *****
   40                    *****
   30                    **********
   20                    **********
   10                    **********
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 2・A の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                       333335555511111
        111111111122222000005555599999          333336666622222555
  100
   90
   80
   70
   60                       *****
   50                       *****
   40                       *****
   30                  **********
   20                  ***************
   10                  ***************               *****     *
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 3・run 0 の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                      22222
       11111     111119999988888     111111111144444          1111
  100
   90
   80
   70
   60
   50
   40
   30                 *****
   20                 *****
   10                 **********
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 3・B の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                        3333366666
         11111     11111333336666611111          11111
  100
   90
   80
   70                        *****
   60                        *****
   50                        *****
   40                        *****
   30                   **********
   20                   **********
   10                   **********
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 3・C の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                       222225555522222
        11111     1111177777555550000022222     111113333355555333
  100
   90
   80
   70
   60                       *****
   50                       *****
   40                       *****
   30                  **********
   20                  ***************
   10                  ***************                    *****
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

round 3・A の後の R1 aux の表示(R1 csr1000v 17.03.08a・RAM 4096 MB)は以下のとおりです。

snippet
R1# show processes cpu history



                        3333355555
              111112222277777555556666611111          111112222244
  100
   90
   80
   70
   60                        *****
   50                        *****
   40                   **********
   30                   **********
   20                   **********
   10                   ***************
     0....5....1....1....2....2....3....3....4....4....5....5....6
               0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)
…(省略)

12. 常時記録の trace(btrace)

12.1 資料の trace

ISR 4000 の Trace Management 章は、trace を機器の内部の出来事を記録する機能と書きます。trace のファイルは自動で作られ、bootflash の tracelogs のディレクトリに置かれます。同じ章は、trace は止められないと書きます。どちらも Cisco 4000 Series ISR の本の文で、本ラボの機器(csr1000v)とは機種が違います。

Tracing is a function that logs internal events. Trace files containing trace messages are automatically created and saved to the tracelogs directory on the hard disk: file system on the router, which stores tracing files in bootflash.

(ISR 4000 の Trace Management 章「Tracing Overview」・IOS XE 17・Cisco 4000 Series ISR)

Tracing cannot be disabled on a router.

(ISR 4000 の Trace Management 章「How Tracing Works」の Note・IOS XE 17・Cisco 4000 Series ISR)

同じ章は、trace を見るコマンドと、記録する水準を決めるコマンドを挙げます。

show platform software trace message—Shows the most recent trace information for a specific module.

(ISR 4000 の Trace Management 章「How Tracing Works」・IOS XE 17・Cisco 4000 Series ISR)

set platform software trace—Sets a tracing level that determines the types of messages that are stored in the output.

(ISR 4000 の Trace Management 章「How Tracing Works」・IOS XE 17・Cisco 4000 Series ISR)

水準を debug 以上にすると、性能に悪い影響が出うるとも書きます。

Setting the tracing level of a module to debug level or higher can have a negative impact on the performance.

(ISR 4000 の Trace Management 章「Table 1. Tracing Levels and Descriptions」の Caution・IOS XE 17・Cisco 4000 Series ISR)

12.2 R1 の trace のヘルプ

本ラボは、R1 の trace の中身を撮っていません(§13)。撮ったのはヘルプの逐語だけです。R1(csr1000v 17.03.08a・RAM 4096 MB)の set platform software trace の ? のヘルプの抜粋は以下のとおりで、bt-logger(Binary-Tracing Logger Process)と btrace-manager(Btrace Manager Process)の行が在ります。

snippet
R1# set platform software trace ?
  all                      All processes
  backplaneswitch-manager  Backplane Switch Manager Process
  bt-logger                Binary-Tracing Logger Process
  btrace-manager           Btrace Manager Process
…(省略)

R1(csr1000v 17.03.08a・RAM 4096 MB)の show platform software trace の ? のヘルプは以下のとおりで、message の行が在ります。

snippet
R1# show platform software trace ?
  counter        Show counter value of modules
  filter-binary  Filter the modules to collated, eg. wireless or wireline
  level          Show trace levels
  message        Show trace message ring contents

R1#show platform software trace

set platform software trace … の投入と、show platform software trace … を打った出力は撮っていません。

12.3 R1 の show logging のヘルプ

R1 の show logging ? のヘルプには、process の行(show logs for specific processes)が在りました。R1(csr1000v 17.03.08a・RAM 4096 MB)の表示は以下のとおりです。

snippet
R1# show logging ?
  count             Show counts of each logging message
  file              show logs in a file
  history           Show the contents of syslog history table
  last              Show the last number of lines from the logging buffer
  log-export        Trace export info
  markers           List all markers
  persistent        Show the contents of the logging persistent
  process           show logs for specific processes
  process-helper    show logs for known process
  profile           show logs for specific profile
  serdes            Show serdes errors
  trace-on-failure  Trace on failure
  xml               Show the contents of XML logging buffer
  |                 Output modifiers
  <cr>              <cr>

R1#show logging

process の後に続けるのは、process の名前(1 つか、コンマで区切った複数)でした。R1(csr1000v 17.03.08a・RAM 4096 MB)のヘルプは以下のとおりです。

snippet
R1# show logging process ?
  WORD  single process name or comma separated list of process names.         e.g. sman or dbm,sman

R1#show logging process

process の名前を付けて打った出力は撮っておらず、何の記録を出すかはヘルプの文言より先を書きません。§12.2 と §12.3 のヘルプは、R1 の別々のヘルプの逐語として並べるだけです。


13. 本ラボで確かめていないこと

本ラボの実測は、csr1000v 17.03.08a(R1・R2 とも RAM 4096 MB)の 1 回の run の撮影です。以下は観測していません。

13.1 撮らなかったもの

  • 常時記録の trace の中身。撮ったのは R1 の set platform software trace と show platform software trace のヘルプの逐語だけで(§12.2)、投入も出力もありません
  • show logging の process を付けて打った出力。撮ったのはヘルプの逐語だけです(§12.3)
  • R2 → R1 の ping の行が debug の記録に無かった理由。並べたのは packet trace の State と Reason の列の逐語までです(§9.4)
  • 負荷の値(所要秒・RTT・messages dropped・コンソールの行・CPU)が動いた原因。値と、3 round の規則の判定だけです(§11)
  • どの clear が platform の条件と packet trace の設定を消すか。clear platform condition all の直後に両方が表示から消え、残りの 2 つの clear は空の状態に打ちました(§10.3)。clear platform packet-trace configuration が単独で設定を消すかと、clear platform packet-trace statistics の後の statistics は撮っていません
  • packet trace の条件の語順。受理されたのは interface を含まない候補の 1 本目で、interface を含む形は、どちらの語順も送っていません(§9.3)
  • packet trace の Pkt 2 から Pkt 9 までの詳細。1 本目・2 本目とも、詳細は packet 0 と packet 1 だけです(§9.4)
  • 2 本目の trace の start の直後の状態。start と undebug all の間の show platform condition は撮っていません(§10.3)
  • 同じパケットを debug と packet trace の両方で見ること。debug ip packet の間の ping と、packet trace の間の ping は別の送信です(§9.3)
  • P3 の terminal monitor の前の R1 mon の窓。terminal monitor の前と後の vty の比べは P2 の 1 回だけです(§5.3)
  • 同じ値(同じ大きさと同じ水準)での logging buffered の入れ直しと、水準だけを変えた投入(§5.2)。P3 の 3 行は 1 回の設定モードで入れたので、どの行の投入の後にバッファの行が入れ替わったかも分けていません
  • P3 の投入の間のコンソールの記録。P2 の窓を閉じてから P3 の窓を開けるまでの記録は保存していません
  • no logging console の下の vty の受信。ESM リファレンスの例(§4.1)の形は試していません。§5.3 は、コンソールの水準を informational にした窓だけです
  • P4・P5 の vty の受信と、P5 のコンソールの記録。P4 の「無い」はバッファとコンソールの記録の窓、P5 の「無い」はバッファだけで数えています
  • dead timer の数え方。Dead Time の表示と dead の行の時刻の関係は、1 回の run の値だけです(§6.3)
  • P4 の R1 の Gi3 の interface の状態。P4 のバッファとコンソールの記録に %LINK と %LINEPROTO の行は 0 行でした
  • P5 で hello の debug を入れた後の待ちと、条件を外した時の機器の時刻。条件を外した時刻と Gi3 の最初の hello の行(12:13:52.327)の前後は、R1 の時刻からは出せません
  • 条件を入れる前の Gi3 の hello の行。条件を外した後に足された Gi3 の hello の行と比べる記録がありません(§7.4)
  • 確認の文言の「flood of debugging」が起きるか。文言を引くだけです(§10.1・§14.4)
  • 172.16.1.4 の行が SSH の通信であることを、detail を付けない debug ip packet の行で確かめること。port の欄がありません(§8.3)
  • P9 の vty の受信。P9 で数えた記録は、コンソールの記録の窓とバッファの 2 つです
  • CPU の値の意味。ping の直後の採取の位置はそろっていません(§11.2)。show processes cpu history の値の大小と run の間の比べも書きません(§11.8)
  • round 3 の run C の後始末の後の rate-limit の値。round 1・2 の後始末の後は、次の round の頭の show running-config all で読んでいます
  • logging rate-limit の all のキーワードを使う形(§11.6)
  • PZ の show platform condition と clear platform condition all。最後の clear platform condition all は P6 の 2 本目の後です(§10.4)
  • ログの設定を P0 の値に戻した姿。PZ では戻していません(§10.4)
  • show platform software status control-processor brief。P0 で打った返事は空の本文で、撮れませんでした。空になった理由は撮っていません
  • 別の機種・別の版と、同じ手順をくり返した時に同じ値・同じ順になるか(負荷の 3 round を除く)

13.2 撮れなかったもの・書かないもの

  • 理由の行が機器の記録に無いもの。条件 Gi2 の下で src 10.81.13.2 の ICMP の行が出たこと・IOSXE-INJECT の塊が何を記録したか・条件を外した後に足された行に IOSXE-INJECT の行が無いこと・P5 の 1 本目の ping の RTT(4/4/5 ms)とほかの ping の違い・ACL 181 の detail の packet routing failed の行・INIT/DROTHER と表示した show の時刻(12:12:23.305)を挟む区間のバッファに adj の debug の行が無いこと
  • 見出しの messages logged の数と、記録の行の数が合わない理由(§14.1)。Logging to: vty2(20) の 20 と R1 mon の受信の 10 行の関係と、vty2 が R1 mon の行かも確かめていません
  • 見出しの 3 messages rate-limited の 3 件の中身。P0 から PZ までの show logging で 3 のままでした
  • %SYS-3-LOGGER_DROPPED の行の数と N の和が、バッファとコンソールの窓で違う理由(§11.7)
  • R1(3978424K)と R2(3978408K)の物理メモリの行の値が違う理由と、CML の設定の 4096 MB との関係(§3.1)
  • debug ip icmp が echo reply rcvd のほかの形の行を出すか。P2・P3 の ICMP: の行は全部 echo reply rcvd の行でした
  • R1 と R2 の時計の差。R2 の ping と R1 の行は時刻で並べていません

13.3 負荷の崩れた 9 組

以下の 9 組は、3 round の規則(§11.5)で崩れた組です。値は §11.4 の表のとおりで、大小は書きません。

指標組判定と理由
ping の所要秒〔ツール側〕C と A崩れた(round で向きが割れた)
RTT の max(ms・ping の逐語)B と run 0崩れた(範囲が重なる)
messages dropped の差(見出しの逐語)C と A崩れた(round で向きが割れた)
コンソールの窓の debug の行の数B と run 0崩れた(同値の round が在る)
コンソールの窓の debug の行の数C と A崩れた(round で向きが割れた)
ping の直後の CPU の 5 秒の値(%)A と run 0崩れた(範囲が重なる)
ping の直後の CPU の 5 秒の値(%)C と run 0崩れた(round で向きが割れた)
ping の直後の CPU の 5 秒の値(%)A と B崩れた(round で向きが割れた)
ping の直後の CPU の 5 秒の値(%)C と A崩れた(round で向きが割れた)

14. 落とし穴・補足

14.1 見出しの messages logged と記録の行の数

show logging の見出しの messages logged の数の差は、本ラボのこの run では、記録で数えた行の数と同じ数ではありませんでした。見出しの数は「届いた行の数」としては使っていません。数えた例は以下のとおりで、理由は撮っていません。

区間見出しの差記録で数えた行
P2 の窓Console +42・Monitor +20・Buffer +42コンソールの記録 21 行・vty 10 行・バッファ 21 行
P3 の窓Monitor +20・Buffer +40vty 10 行・バッファ 20 行
P5 の条件だけの段 → 条件 Gi2 の下の段Buffer +201バッファに足された行 182 行
P5 の ACL 181 の段 → ACL なしの段Buffer +451ACL なしの段のバッファの本文 269 行
P9 の round 1 の A の窓Console +46150コンソールの窓の debug の行 840 行

P2 と P3 の窓では、見出しの差は数えた行のちょうど 2 倍でした。見出しの差は前後の 2 本の show logging の間の区間の数で(P2 の前の見出しは P0 の show logging)、記録の行はそれぞれの記録の区間の数です。2 つの区間はそろっていません。

14.2 matches debug filer の行の付き方

条件 Gi2 の下のバッファの Output intf Gi2 matches debug filer は、本文の頭の 1 回だけが単独の行で、ほかの 9 回は hello か ICMP の行の末尾に、改行も時刻も無く続きました(§7.3)。続いた後の行は空行で、その次の行は IOSXE-INJECT の塊の頭の set pak datagramstart の行です。§7.4 の表は、この印と OSPF-1 HELLO・ICMP: の行を別々に数えており、足して行の数にはしていません。

14.3 向きの正規表現と ping の要求

s=10.81.12.2・d=10.81.12.1 の向きの行は、R2 から ping を送っていない ACL 181 の段にも 5 行在りました(§8.3)。この向きの正規表現は、R1 が送った ping の並びの中の行にも当たります。§8.3 は、R2 → R1 の行を、R1 の 2 本目の ping の最後の行より後に足された行で数えました。

14.4 確認の文言

no debug condition all の確認は、本ラボの機器では全部の条件の削除を問う形で、末尾は [yes/no]: でした(§7.4・§10.2 のコードブロック)。Debug リファレンス(A〜D)の見本の確認 Proceed with removal? [yes/no]: y は、最後の 1 つの条件を外す no debug condition interface atm 1/0 vc 4335 への確認です(§10.1)。命令が違うので、文言の違いを資料と機器の割れとは扱いません。確認の前の警告の 3 行は、行をつなぐと資料の見本の警告の文(§10.1)と同じ語の並びでした。

本ラボの取得スクリプトは、確認の文言に yes で答えました〔ツール側〕。条件が残っている間は確認の後に条件が外れ、undebug all の後は確認の後に % Could not remove conditions が返りました。どちらの場合も確認は出たので、確認が出たことは条件が外れたことの印にはなりません。

14.5 資料の見本の誤りと揺れ

資料の見本には、本ラボの機器の形と違う書き方や誤りがあります。誤りや揺れも、そのまま引きます。

CSR の Packet Trace 章は、debug platform condition の構文の行では ipv4 が先で、例の 1 つでは interface が先です(ISR 4000 の本の例も interface が先)。資料の中で語順が割れています。本ラボの機器が受理したのは、interface を含まない debug platform condition ipv4 10.81.0.3/32 both で、同じ章の別の例 Router#debug platform condition ipv4 10.118.74.53/32 both と同じ形です。interface を含む形は、どちらの語順も送っていません(§9.3・§13.1)。

15M&T の Troubleshooting 章は、全部の interface の出力に戻す命令を一方の節で no debug interface と書き、別の節では no debug condition all と書きます(§10.1)。

To reenable debugging output for all interfaces, use the no debug interfacecommand.

(15M&T の Troubleshooting 章「Displaying Messages for One Interface」・IOS Release 15M&T。interfacecommand の語のつながりは原典のまま)

CSR の Packet Trace 章の手順の例の行は、packet-trace packets と書きます。構文の行は packet です。同じ手順の、条件を止める段(構文の行は debug platform condition stop)の例の行は Router# debug platform condition start で、start のままです。別の例の行は、show platform packet-trace の後にキーワードが無く数だけです。

Router# debug platform packet-trace packets 2048 summary-only

(CSR の Packet Trace 章「Configuring Packet Trace」の例・csr1000v の本・Updated: April 15, 2020)

Router# show platform packet-trace 14

(CSR の Packet Trace 章「Configuring Packet Trace」の例・csr1000v の本・Updated: April 15, 2020)

Debug リファレンス(I〜L)の debug ip icmp の頁は、ICMP を Internal Control Message Protocol と展開します。15M&T の Troubleshooting 章の Logging System Messages の書き出しの文は、ログのプロセスへ送ると書く所の前置詞(to)がありません。

To display information on Internal Control Message Protocol (ICMP ) transactions, use the debug ip icmp command in privileged EXEC mode.

(Debug リファレンス(I〜L)「debug ip icmp」・IOS の本)

By default, routers send logging messages (including debug command output) a logging process.

(15M&T の Troubleshooting 章「Logging System Messages」・IOS Release 15M&T)

14.6 資料と実機が割れた所の一覧

資料と本ラボの機器が割れた所は以下のとおりです。資料の版と機種は、本ラボの機器(csr1000v 17.03.08a)と合わないものを含みます。どれも両方を並べるだけで、どちらが正しいとは書きません。

項目資料(版・機種)本ラボの機器節
rate-limit の数の既定ESM リファレンス(IOS の本)は 1 秒に 10running-config all は logging rate-limit console 40 except errors§4.2
logging rate-limit console の意味ESM リファレンスは、コンソールに出るエラーと debug の行の rate limitヘルプは Rate limit only console messages と Rate limit all messages, including debug messages。run C の後も messages rate-limited は 3§11.6
条件に従う debug15M&T の Troubleshooting 章の一覧は debug aaa・dialer・isdn・modem・ppp一覧に無い OSPF hello の行は条件に従い、ICMP の行は従わなかった§7.3
コンソールの保証の既定ESM リファレンスは既定で有効no logging console guaranteed§4.2
バッファの既定CF リファレンス(L〜mode)は、多くの platform で無効logging buffered 131072 debugging§4.2
logger の queue の既定ESM リファレンスは 100(同じ頁は、platform によって変わると書く)logging queue-limit 1024§4.2
debug の行の行き先15M&T の Troubleshooting 章は、普通はコンソールの端末だけバッファにも在った§4.3
logging console と vtyESM リファレンスの logging console の頁は、logging console がコンソールの TTY だけでなく機器の全部の TTY の line を含むと書くコンソールの水準が informational の間も、terminal monitor を入れた vty(logging monitor debugging の下)に debug の行が届いた(本ラボのこの run で)。no logging console は試していない§4.1・§5.3
monitor の既定ESM リファレンスの logging monitor の頁は、Command Default で機能が無効と書く(水準の引数の既定は Level 7 = debugging)。15M&T の Troubleshooting 章は、logging monitor の既定は debugging と書くday0 に入れていない logging monitor debugging が running-config all に在った。水準は資料の既定と同じ debugging で、資料と割れるのは Command Default の「無効」だけ§4.1・§14.6
時刻の既定15M&T の Troubleshooting 章は log の行に時刻が付かない、CF リファレンス(R〜setup)は debug と log の行に付くday0 に入れていない service timestamps debug datetime msec と service timestamps log datetime msec が在った§3.3・§14.7

ESM リファレンスの logging monitor の頁の Command Default は以下のとおりです(15M&T の Troubleshooting 章の既定の文は §4.1)。

The logging monitor function is disabled.

(ESM リファレンス「logging monitor」の Command Default・IOS の本)

17.x の Reliable Delivery 章は、機器全体の rate limit の機能を global rate limiting と呼び、設定すると全部の出し先に効くと書きます。本ラボの run C の設定は logging rate-limit console 10 の形で、この文の global rate limiting に当たるかは確かめていません。

The device-wide rate limiting capability in Cisco IOS XE syslog is preserved in the Reliable Delivery and Filtering for Syslog feature and is referred to as “global rate limiting.”

When global rate limiting is set, it applies to all destinations.

(17.x の Reliable Delivery 章「Rate Limiting」・IOS XE 17.x)

14.7 時刻の既定と *

時刻の既定は、資料の中で割れます。15M&T の Troubleshooting 章は、既定では log の行に時刻が付かないと書きます。CF リファレンス(R〜setup)は、既定で debug と log の行に時刻が付くと書き、引数なしの service timestamps の既定を debug の uptime の形と書きます。

By default, log messages are not time-stamped.

(15M&T の Troubleshooting 章「Enabling Time-Stamps on Log Messages」・IOS Release 15M&T)

Time stamps are applied to debug and logging messages.

(CF リファレンス(R〜setup)「service timestamps」の Command Default・IOS の本)

If the service timestamps command is specified with no arguments or keywords, the default is service timestamps debug uptime .

(CF リファレンス(R〜setup)「service timestamps」・IOS の本。uptime の後の空白は原典のまま)

17.x の ESM 章は、時刻の形を service timestamps が決め、時刻の前の * は時計が信頼できる時刻の源と同期していないことを示すと書きます。localtime を使わない時刻は UTC で出ます(CF リファレンス(R〜setup))。

The time stamp format used in system logging messages is determined by the service timestamps global configuration mode command. The service sequence-numbers global configuration command enables or disables the leading sequence number. An asterisk (*) before the time indicates that the time may be incorrect because the system clock has not synchronized to a reliable time source.

(17.x の ESM 章「System Logging Message Formatting」・IOS XE 17.x)

If the localtime keyword option is not used (or if the local time zone has not been configured using the clock timezone command), time will be displayed in Coordinated Universal Time (UTC).

(CF リファレンス(R〜setup)「service timestamps」・IOS の本)

本ラボの R1 と R2 の時刻は、ログの行頭も show clock も * で始まり、show clock は UTC でした。P4 の terminal exec prompt timestamp の行は No time source, で始まりました。どちらの機器も NTP を設定していません〔ツール側〕。

14.8 debug の場面だけで使う設定

ISR 4000 の System Messages 章は、%PMAN-3-PROCFAIL_IGNORE の推奨の対処に、プロセスの失敗を無視する設定は debug の場面でだけ使い、その設定のまま機器を運用しないと書きます。この文はプロセスの失敗の扱いの設定の文で、本ラボの debug のコマンドの文ではありません。

This setting should only be used in a debug scenario. It is not normal to run the router with this setting.

(ISR 4000 の System Messages 章「How to Find Error Message Details」・IOS XE 17・Cisco 4000 Series ISR)

本ラボの片付けでは、IOS の debug と条件は undebug all と no debug condition all で、platform の条件と packet trace の設定は clear platform condition all で表示から消えました(§10)。ログの設定(logging buffered 1000000)は、PZ でも戻していません。


15. まとめ

本節では、csr1000v 17.03.08a の R1 と R2(どちらも RAM 4096 MB)で、debug の行の行き先・show との対比・条件付き debug・ACL・packet trace・片付け・負荷を、1 回の run で撮りました。debug の運用の資料は IOS の本(15M&T の Troubleshooting 章とコマンドリファレンス)で、版と機種が機器と合わない文として引きました。

day0 にログの設定を入れずに起動した R1 の show running-config all は、コンソール・vty・バッファの 3 つが debugging で、バッファは 131072 バイトでした(§4.2)。本ラボのこの run では、debug ip icmp の行はコンソールの記録とバッファに在りました。この機器では、vty には terminal monitor の後にだけ行が届きました(§4.3)。

コンソールを informational にした窓では、行はバッファと vty に在り、コンソールの記録には在りませんでした(§5.3)。logging buffered の大きさだけを変えた投入の後のバッファに、投入の前の行は残っていませんでした(§5.2)。

show ip ospf neighbor の表と debug ip ospf adj・debug ip routing の行を同じ切断と回復に並べると、show は Dead Time と State の移り変わりを、debug は dead・DR の選び直し・RT: del・2WAY・FULL・RT: add の行を示しました(§6)。

この機器では、条件 Gi2 の下で、OSPF hello の行は Gi2 の行だけが在り、Gi3 の相手の ICMP の行も在りました(§7)。資料の一覧と機器の振る舞いは並べるだけにしています。ACL 181 で絞った debug ip packet のバッファに ACL の外の 10.81.13.x の行は無く、ACL なしの debug ip packet には管理の SSH の相手(172.16.1.4)との間の行が混ざりました(§8)。

この機器では、R2 → R1 の ping の行は、debug ip icmp の 3 つの記録と ACL なしの debug ip packet のバッファにありませんでした。同じ向きの ping の packet trace は、要求が CONS Packet Consumed、別の Pkt 番号の行が PUNT 26 (QFP ICMP generated packet) と、Input が INJ.9・Output が Gi2 の FWD でした(§9)。この機器では、R1 を通過する通信は debug ip packet に行が無く、packet trace では FWD でした。

この機器では、undebug all は IOS の debug condition も外し、その後の no debug condition all は % Could not remove conditions を返しました。platform の条件と packet trace の設定は undebug all の後も残り、本ラボのこの run では clear platform condition all の直後に表示から消えました(§10)。

負荷の段では、ACL なしの debug ip packet detail を入れたまま ping 3000 本を流した値を 3 round 撮り、全 25 組のうち 3 round とも揃った関係 16 組を表にしました(§11.5)。崩れた 9 組は §13.3 に名前だけを並べています。常時記録の trace は、R1 のヘルプの逐語と ISR 4000 の本の文までです(§12)。


16. 次節(8-2 SPAN / RSPAN / ERSPAN)

本節は、機器の中の記録(debug の行と packet trace)で、機器を通る通信と機器に届く通信を読みました。

次節 8-2 は、SPAN / RSPAN / ERSPAN を扱います。ローカル・リモート・カプセル化が主題です。

次節では、SPAN / RSPAN / ERSPAN を見ていきましょう。


17. 出典

本節が参照した資料です。引用の原典 22 本(IOS の本 9 章・CSR 1000v の本 3 章・ISR 4000 の本 4 章・17.x の System Management の本 6 章)を 2026 年 11 月 8 日に取得しました。本文中の > の引用は、表の参照日の時点のページのテキストの逐語です。

IOS の本の 9 章(15M&T の Troubleshooting 章と 8 本のコマンドリファレンス)は、IOS XE 17.3 の版の本ではありません。ISR 4000 の本は IOS XE 17 の本ですが、機種は Cisco 4000 Series ISR です。CSR 1000v の本の 3 章は csr1000v の本で、本の名前に版の表記はありません(Packet Trace 章の機能情報の表には Amsterdam 17.3.1 の行があります)。リダイレクトの記録 1 本は、IOS XE 3S の Basic System Management の本の URL が移った先の記録で、> の引用の原典ではありません。

資料版・更新日(資料の表記)参照日URL
Basic System Management Configuration Guide, Cisco IOS Release 15M&T — Chapter: Troubleshooting and Fault ManagementIOS Release 15M&T・Updated: November 30, 20122026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/bsm/configuration/15-mt/bsm-15-mt-book/bsm-troubleshooting.html
Cisco IOS Debug Command Reference - Commands A through D — Chapter: debug clns esis events through debug dbconn tcp本の名前に版の表記なし・Updated: August 6, 20142026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/debug/command/db-a1-cr-book/db-c1.html
Cisco IOS Debug Command Reference - Commands I through L — Chapter: debug ip http all through debug ip rsvp本の名前に版の表記なし・Updated: August 6, 20142026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/debug/command/db-i1-cr-book/db-i2.html
Cisco IOS Configuration Fundamentals Command Reference — Chapter: L through mode本の名前に版の表記なし・Updated: December 16, 20192026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/L_through_mode.html
Cisco IOS Configuration Fundamentals Command Reference — Chapter: R through setup本の名前に版の表記なし・Updated: December 16, 20192026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/R_through_setup.html
Cisco IOS Configuration Fundamentals Command Reference — Chapter: show gsr through show monitor event trace本の名前に版の表記なし・Updated: December 16, 20192026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/show_gsr_through_show_monitor_event_trace.html
Cisco IOS Configuration Fundamentals Command Reference — Chapter: show monitor permit list through show process memory本の名前に版の表記なし・Updated: December 16, 20192026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/show_monitor_permit_list_through_show_process_memory.html
Cisco IOS Configuration Fundamentals Command Reference — Chapter: slave auto-sync config through terminal-type本の名前に版の表記なし・Updated: December 16, 20192026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/slave_auto-sync_config_through_terminal-type.html
Cisco IOS Embedded Syslog Manager Command Reference — Chapter: A through Z Commands本の名前に版の表記なし・Updated: July 27, 20112026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/esm/command/esm-cr-book/esm-cr-a1.html
Cisco CSR 1000v and Cisco ISRv Software Configuration Guide — Chapter: Packet Trace(置き場: Cisco Cloud Services Router 1000V Series)本の名前に版の表記なし・Updated: April 15, 20202026-11-08https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/configuration/b_CSR1000v_Configuration_Guide/packet_trace.html
Cisco CSR 1000v and Cisco ISRv Software Configuration Guide — Chapter: Troubleshooting Cisco CSR 1000v VM Issues(置き場: 同上)本の名前に版の表記なし・Updated: April 15, 20202026-11-08https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/configuration/b_CSR1000v_Configuration_Guide/b_CSR1000v_Configuration_Guide_chapter_01111.html
Cisco CSR 1000v and Cisco ISRv Software Configuration Guide — Chapter: Using Cisco IOS XE Software(置き場: 同上)本の名前に版の表記なし・Updated: April 15, 20202026-11-08https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/configuration/b_CSR1000v_Configuration_Guide/b_CSR1000v_Configuration_Guide_chapter_01.html
Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 — Chapter: Packet Trace(置き場: Cisco 4000 Series Integrated Services Routers)IOS XE 17・Updated: August 26, 20242026-11-08https://www.cisco.com/c/en/us/td/docs/routers/access/isr4400/software/configuration/xe-17/isr4400-sw-config-xe-17/packet_trace.html
Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 — Chapter: Process Health Monitoring(置き場: 同上)IOS XE 17・Updated: August 26, 20242026-11-08https://www.cisco.com/c/en/us/td/docs/routers/access/isr4400/software/configuration/xe-17/isr4400-sw-config-xe-17/process_health_monitoring.html
Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 — Chapter: System Messages(置き場: 同上)IOS XE 17・Updated: August 26, 20242026-11-08https://www.cisco.com/c/en/us/td/docs/routers/access/isr4400/software/configuration/xe-17/isr4400-sw-config-xe-17/system_messages.html
Cisco 4000 Series ISRs Software Configuration Guide, Cisco IOS XE 17 — Chapter: Trace Management(置き場: 同上)IOS XE 17・Updated: August 26, 20242026-11-08https://www.cisco.com/c/en/us/td/docs/routers/access/isr4400/software/configuration/xe-17/isr4400-sw-config-xe-17/trace_management.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: Performing Basic System ManagementIOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_bsm-basic-sys-manage-xe.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: Using the Cisco IOS Command-Line InterfaceIOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_cf-cli-basics.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: Searching and Filtering CLI OutputIOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_cf-cli-search.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: Embedded Syslog Manager (ESM)IOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_esm-syslog.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: Reliable Delivery and Filtering for SyslogIOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_reliable-del-filter-0.html
System Management Configuration Guide, Cisco IOS XE 17.x — Chapter: show Command Output RedirectionIOS XE 17.x・Updated: August 21, 20232026-11-08https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_cf-shw-cmd-out-redirect-0.html
IOS XE 3S の Basic System Management の本の URL(リダイレクトの記録。引用の原典ではない)HTTP 200・移った先は Cisco の support の入口のページ2026-11-08https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/bsm/configuration/xe-3s/bsm-xe-3s-book.html

本文の「取得した 22 本の資料に無い」「22 本の中に無い」は、引用の原典の 22 本の中での話です。「0 件(数えた)」は、この 22 本の取得したテキストで文字列を数えた件数です。