{"articleId":"art_d62a795e8b","slug":"nw-basics-05-static-route","title":"行きと帰りは別々に決まる","version":1,"area":"tech","topic":"ネットワーク","tags":["ネットワーク","ルーティング","スタティックルート","concept"],"date":"2026-09-14","updated":"2026-09-14","records":[{"id":"rev_336ccf3f05","at":"2026-09-14","actor":{"kind":"ai","id":"claude-fable-5","label":"AI (claude-fable-5)"},"version":1,"kind":"ai-check","scope":{},"text":"直接接続されたネットワークがルーティングテーブルに自動登録されること・ネクストホップの定義・ロンゲストマッチをインフラエキスパートのルーティングのページで、スタティックルートの設定とデフォルトルート 0.0.0.0/0 を同サイトのスタティックルーティングのページで確認した。経路が無いときに送り主へ到達不能の通知が返るかどうかは一次資料で未確認。本文の定義 4 文とスタティックルートの言い換えは、本人が確定した文をそのまま使った。校正チェックリストを通し、「手順」と「フロー」の表記を機械検査した。守秘: 実名・社名・会場名・地名・金額なし","status":"open","source":"frontmatter"}],"blocks":[{"id":"blk_ccae04","type":"paragraph","markdown":"勉強会の最初のラボは、ルータを数台つなぎ、遠くのネットワークへの経路を 1 本ずつ手で書き足す作業でした。","text":"勉強会の最初のラボは、ルータを数台つなぎ、遠くのネットワークへの経路を 1 本ずつ手で書き足す作業でした。","line":2,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_490637","type":"paragraph","markdown":"書き終えると ping が通り、書き漏らすと通りません。\nなぜ行きの経路を書いただけでは通らないのかは、資料には書いてありませんでした。\nこの記事は、ルータ 2 台をまたぐ通信の往復を 1 枚の図で追います。","text":"書き終えると ping が通り、書き漏らすと通りません。\nなぜ行きの経路を書いただけでは通らないのかは、資料には書いてありませんでした。\nこの記事は、ルータ 2 台をまたぐ通信の往復を 1 枚の図で追います。","line":4,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_bb713c","type":"paragraph","markdown":"この連載は、ネットワークの言葉を 3 つの層に置いて読みます。\nもの（物理か論理か）、結びつき（人が設定で付ける手動か、機器が学習する自動か、製造時に決まる固定か）、通信フロー（1 本の通信がそれらを順に通る道筋）の 3 つです。","text":"この連載は、ネットワークの言葉を 3 つの層に置いて読みます。\nもの（物理か論理か）、結びつき（人が設定で付ける手動か、機器が学習する自動か、製造時に決まる固定か）、通信フロー（1 本の通信がそれらを順に通る道筋）の 3 つです。","line":8,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_34ba84","type":"heading","depth":2,"markdown":"## 登場するもの","text":"登場するもの","line":11,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1badd0","type":"paragraph","markdown":"パケットの先頭には、送信元 IP・宛先 IP・寿命（TTL）などが書いてあります。どの経路を通るかは書いてありません。","text":"パケットの先頭には、送信元 IP・宛先 IP・寿命（TTL）などが書いてあります。どの経路を通るかは書いてありません。","line":13,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_3cf9de","type":"paragraph","markdown":"ルータは自分のルーティングテーブルの中から宛先 IP に一致する行を探し、パケットの次の渡し先となるルータを決めます。","text":"ルータは自分のルーティングテーブルの中から宛先 IP に一致する行を探し、パケットの次の渡し先となるルータを決めます。","line":15,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_94efb9","type":"heading","depth":4,"markdown":"#### ルーティングテーブル","text":"ルーティングテーブル","line":17,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2610ad","type":"paragraph","markdown":"論理のものです。\nルータが持つ、宛先ネットワークと出口の一覧です。\n行には、自動で載るものと、人が手で書くものがあります。","text":"論理のものです。\nルータが持つ、宛先ネットワークと出口の一覧です。\n行には、自動で載るものと、人が手で書くものがあります。","line":19,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_457764","type":"heading","depth":4,"markdown":"#### 自動で載る行","text":"自動で載る行","line":23,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_cff97e","type":"paragraph","markdown":"ルータのポートに IP アドレスを設定すると、そのアドレスを含むネットワークの行が、ルーティングテーブルに自動で追加されます。ポートに 192.168.10.1/24 を設定すれば、192.168.10.0/24 の行が載ります。この宛先への経路は手動追加なしでわかります。","text":"ルータのポートに IP アドレスを設定すると、そのアドレスを含むネットワークの行が、ルーティングテーブルに自動で追加されます。ポートに 192.168.10.1/24 を設定すれば、192.168.10.0/24 の行が載ります。この宛先への経路は手動追加なしでわかります。","line":25,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_216821","type":"heading","depth":4,"markdown":"#### 手動で書く行","text":"手動で書く行","line":27,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_af1212","type":"paragraph","markdown":"それ以外の宛先は、人がルーティングテーブルに手動で追加します。これがスタティックルートです。","text":"それ以外の宛先は、人がルーティングテーブルに手動で追加します。これがスタティックルートです。","line":29,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_703348","type":"paragraph","markdown":"書いた行に指定するのは、宛先ネットワークと、そこへ向かうときに渡す相手の IP です。\nこの相手をルーティングテーブルではネクストホップ（次の渡し先）と呼び、PC に設定するデフォルトゲートウェイと役割は同じです。","text":"書いた行に指定するのは、宛先ネットワークと、そこへ向かうときに渡す相手の IP です。\nこの相手をルーティングテーブルではネクストホップ（次の渡し先）と呼び、PC に設定するデフォルトゲートウェイと役割は同じです。","line":31,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_63053c","type":"paragraph","markdown":"壁打ちで自分の言葉に置き換えると、こうなりました。\n「ルータ同士が繋がってるところをゲートウェイにして、他のネットワークをルーティングテーブルに登録することによって、自分が直接繋がってないネットワークに通信を届けることができる」","text":"壁打ちで自分の言葉に置き換えると、こうなりました。\n「ルータ同士が繋がってるところをゲートウェイにして、他のネットワークをルーティングテーブルに登録することによって、自分が直接繋がってないネットワークに通信を届けることができる」","line":34,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_118c7a","type":"heading","depth":2,"markdown":"## 結びつき","text":"結びつき","line":37,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_4ec88b","type":"list","markdown":"- ポートの IP ⇄ ルーティングテーブルの行は自動です。IP を設定した時点で載ります。\n- 宛先ネットワーク ⇄ 次の渡し先は手動です。人が 1 行ずつ書きます。\n- 行きの行と帰りの行は結び付きません。行きはルータ 1 の表、帰りはルータ 2 の表にあり、別々の人手で書かれます。\n- IP ⇄ MAC は自動です。各ルータが ARP で次の相手の MAC を引き、要求を受け取った側も送信元を覚えます。","text":"ポートの IP ⇄ ルーティングテーブルの行は自動です。IP を設定した時点で載ります。宛先ネットワーク ⇄ 次の渡し先は手動です。人が 1 行ずつ書きます。行きの行と帰りの行は結び付きません。行きはルータ 1 の表、帰りはルータ 2 の表にあり、別々の人手で書かれます。IP ⇄ MAC は自動です。各ルータが ARP で次の相手の MAC を引き、要求を受け取った側も送信元を覚えます。","line":39,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_df21fc","type":"heading","depth":2,"markdown":"## 通信フロー","text":"通信フロー","line":44,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c458ac","type":"paragraph","markdown":"A（192.168.10.10）からルータ 2 台をまたいで C（192.168.3.10）へ送り、C から返事が戻るまでです。","text":"A（192.168.10.10）からルータ 2 台をまたいで C（192.168.3.10）へ送り、C から返事が戻るまでです。","line":46,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ea5c01","type":"paragraph","markdown":"① A は宛先 192.168.3.10 が自分のネットワーク外なので、デフォルトゲートウェイ（ルータ 1）へ送ります。","text":"① A は宛先 192.168.3.10 が自分のネットワーク外なので、デフォルトゲートウェイ（ルータ 1）へ送ります。","line":48,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_f611cf","type":"paragraph","markdown":"② ルータ 1 はテーブルで 192.168.3.10 に一致する行を探します。手動で追加した行が一致し、次の渡し先 172.16.12.2 へ送ります。","text":"② ルータ 1 はテーブルで 192.168.3.10 に一致する行を探します。手動で追加した行が一致し、次の渡し先 172.16.12.2 へ送ります。","line":50,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ded375","type":"paragraph","markdown":"③ ルータ 2 はテーブルを探します。自動の行 192.168.3.0/24 が一致し、自分の Gi1 から C へ直接届けます。","text":"③ ルータ 2 はテーブルを探します。自動の行 192.168.3.0/24 が一致し、自分の Gi1 から C へ直接届けます。","line":52,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_735609","type":"paragraph","markdown":"④ C の返事は、宛先 192.168.10.10 がネットワーク外なので、デフォルトゲートウェイ（ルータ 2）へ向かいます。","text":"④ C の返事は、宛先 192.168.10.10 がネットワーク外なので、デフォルトゲートウェイ（ルータ 2）へ向かいます。","line":54,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_93cdc3","type":"paragraph","markdown":"⑤ ルータ 2 はテーブルを探します。192.168.10.0/24 は自動では載らないので、一致するのは人が書いた行です。その行の次の渡し先 172.16.12.1 へ送ります。この行が無ければ捨てられ、送り主に「そこへは行けない」の通知が返ります。","text":"⑤ ルータ 2 はテーブルを探します。192.168.10.0/24 は自動では載らないので、一致するのは人が書いた行です。その行の次の渡し先 172.16.12.1 へ送ります。この行が無ければ捨てられ、送り主に「そこへは行けない」の通知が返ります。","line":56,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2d71ff","type":"paragraph","markdown":"⑥ ルータ 1 は自動の行 192.168.10.0/24 で A へ直接届けます。","text":"⑥ ルータ 1 は自動の行 192.168.10.0/24 で A へ直接届けます。","line":58,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_f6dbed","type":"paragraph","markdown":"行きと帰りは別々に決まります。\nだからスタティックルートは、通したい通信の往復ぶん、両側のルータに書きます。","text":"行きと帰りは別々に決まります。\nだからスタティックルートは、通したい通信の往復ぶん、両側のルータに書きます。","line":60,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c032dd","type":"heading","depth":2,"markdown":"## 図 5","text":"図 5","line":63,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_9917d3","type":"paragraph","markdown":"図の上半分が構成図と往復のフロー、下半分が各テーブルの推移と通信の中身の推移です。","text":"図の上半分が構成図と往復のフロー、下半分が各テーブルの推移と通信の中身の推移です。","line":65,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_eacd74","type":"html","markdown":"<svg viewBox=\"0 0 900 1245\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"構成図（スタティックルート・ルータ 2 台をまたぐ A → C の通信と帰り道）\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1245\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スタティックルート：ルータ 2 台をまたぐ A → C の通信と、C → A の帰り道</text>\n  <text x=\"20\" y=\"50\" font-size=\"11\" fill=\"#6b7280\">ルータが自動で知っているのは自分のポートのネットワークだけ。その先は誰かが教えないと分からない。ここでは人が手動で追加する（スタティックルート）</text>\n  <rect x=\"30\" y=\"150\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"75\" y=\"170\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"75\" y=\"186\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.10</text>\n  <text x=\"75\" y=\"200\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">GW 192.168.10.1</text>\n  <line x1=\"120\" y1=\"178\" x2=\"160\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"160\" y=\"158\" width=\"90\" height=\"40\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"205\" y=\"175\" text-anchor=\"middle\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">スイッチ</text>\n  <text x=\"205\" y=\"190\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">MAC で転送</text>\n  <line x1=\"250\" y1=\"178\" x2=\"300\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"300\" y=\"140\" width=\"170\" height=\"76\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"385\" y=\"160\" text-anchor=\"middle\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1</text>\n  <text x=\"385\" y=\"180\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0: 192.168.10.1</text>\n  <text x=\"385\" y=\"196\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1: 172.16.12.1 /30</text>\n  <rect x=\"291\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"300\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi0</text>\n  <rect x=\"461\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"470\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi1</text>\n  <line x1=\"479\" y1=\"178\" x2=\"521\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <text x=\"500\" y=\"207\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">172.16.12.0/30</text>\n  <rect x=\"530\" y=\"140\" width=\"170\" height=\"76\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"615\" y=\"160\" text-anchor=\"middle\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2</text>\n  <text x=\"615\" y=\"180\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0: 172.16.12.2 /30</text>\n  <text x=\"615\" y=\"196\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1: 192.168.3.1</text>\n  <rect x=\"521\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"530\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi0</text>\n  <rect x=\"691\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"700\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi1</text>\n  <line x1=\"709\" y1=\"178\" x2=\"770\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"770\" y=\"150\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"815\" y=\"170\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-C</text>\n  <text x=\"815\" y=\"186\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.3.10</text>\n  <text x=\"815\" y=\"200\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">GW 192.168.3.1</text>\n  <text x=\"20\" y=\"118\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">行き A → C</text>\n  <line x1=\"120\" y1=\"118\" x2=\"292\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"291,113 291,123 300,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"210\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"210\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <line x1=\"479\" y1=\"118\" x2=\"513\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"512,113 512,123 521,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"500\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"500\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <line x1=\"709\" y1=\"118\" x2=\"762\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"761,113 761,123 770,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"740\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"740\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">3</text>\n  <text x=\"20\" y=\"244\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">帰り C → A</text>\n  <line x1=\"770\" y1=\"244\" x2=\"717\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"718,239 718,249 709,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"740\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"740\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <line x1=\"521\" y1=\"244\" x2=\"487\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"488,239 488,249 479,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"500\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"500\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">5</text>\n  <line x1=\"300\" y1=\"244\" x2=\"128\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"129,239 129,249 120,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"210\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"210\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">6</text>\n  <rect x=\"280\" y=\"270\" width=\"210\" height=\"96\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"290\" y=\"288\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1 のルーティングテーブル</text>\n  <text x=\"290\" y=\"308\" font-size=\"10\" fill=\"#374151\">192.168.10.0/24　→ Gi0（自動）</text>\n  <text x=\"290\" y=\"324\" font-size=\"10\" fill=\"#374151\">172.16.12.0/30　→ Gi1（自動）</text>\n  <text x=\"290\" y=\"344\" font-size=\"10\" font-weight=\"700\" fill=\"#0a7aff\">192.168.3.0/24　→ 172.16.12.2（手動）</text>\n  <text x=\"290\" y=\"358\" font-size=\"9\" fill=\"#6b7280\">② がこの行を使う</text>\n  <rect x=\"510\" y=\"270\" width=\"210\" height=\"96\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"520\" y=\"288\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2 のルーティングテーブル</text>\n  <text x=\"520\" y=\"308\" font-size=\"10\" fill=\"#374151\">172.16.12.0/30　→ Gi0（自動）</text>\n  <text x=\"520\" y=\"324\" font-size=\"10\" fill=\"#374151\">192.168.3.0/24　→ Gi1（自動）</text>\n  <text x=\"520\" y=\"344\" font-size=\"10\" font-weight=\"700\" fill=\"#0a7aff\">192.168.10.0/24　→ 172.16.12.1（手動）</text>\n  <text x=\"520\" y=\"358\" font-size=\"9\" fill=\"#6b7280\">⑤ がこの行を使う。無いと帰れない</text>\n  <text x=\"20\" y=\"400\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">フロー</text>\n  <text x=\"20\" y=\"420\" font-size=\"11\" fill=\"#374151\">① A は宛先 192.168.3.10 が自分のネットワーク外なので、デフォルトゲートウェイ（ルータ 1）へ送る</text>\n  <text x=\"20\" y=\"438\" font-size=\"11\" fill=\"#374151\">② ルータ 1 はテーブルで 192.168.3.10 に一致する行を探す。手動で追加した行が一致し、次の渡し先 172.16.12.2 へ送る</text>\n  <text x=\"20\" y=\"456\" font-size=\"11\" fill=\"#374151\">③ ルータ 2 はテーブルを探す。自動の行 192.168.3.0/24 が一致し、自分の Gi1 から C へ直接届ける</text>\n  <text x=\"20\" y=\"474\" font-size=\"11\" fill=\"#374151\">④ C の返事は、宛先 192.168.10.10 がネットワーク外なので、デフォルトゲートウェイ（ルータ 2）へ</text>\n  <text x=\"20\" y=\"492\" font-size=\"11\" fill=\"#374151\">⑤ ルータ 2 はテーブルを探す。192.168.10.0/24 は自動では載らないので、一致するのは手動の行。その渡し先 172.16.12.1 へ送る</text>\n  <text x=\"20\" y=\"510\" font-size=\"11\" fill=\"#374151\">　（この行が無ければ捨てられ、送り主に「そこへは行けない」の通知が返る）</text>\n  <text x=\"20\" y=\"528\" font-size=\"11\" fill=\"#374151\">⑥ ルータ 1 は自動の行 192.168.10.0/24 で A へ直接届ける</text>\n  <text x=\"20\" y=\"556\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">行きと帰りは別々に決まる。だからスタティックルートは、通したい通信の往復ぶん、両側のルータに書く</text>\n<line x1=\"20\" y1=\"568\" x2=\"880\" y2=\"568\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"590\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n  <rect x=\"20\" y=\"602\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: ARP テーブル</text>\n  <text x=\"30\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">① 追加: 192.168.10.1 → MAC R1-Gi0</text>\n  <rect x=\"310\" y=\"602\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1: ARP テーブル</text>\n  <text x=\"320\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">① 追加: 192.168.10.10 → MAC A（要求を受けて）</text>\n  <text x=\"320\" y=\"649\" font-size=\"10\" fill=\"#0a7aff\">② 追加: 172.16.12.2 → MAC R2-Gi0</text>\n  <rect x=\"600\" y=\"602\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2: ARP テーブル</text>\n  <text x=\"610\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">② 追加: 172.16.12.1 → MAC R1-Gi1（要求を受けて）</text>\n  <text x=\"610\" y=\"649\" font-size=\"10\" fill=\"#0a7aff\">③ 追加: 192.168.3.10 → MAC C</text>\n  <rect x=\"20\" y=\"672\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"688\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-C: ARP テーブル</text>\n  <text x=\"30\" y=\"704\" font-size=\"10\" fill=\"#0a7aff\">③ 追加: 192.168.3.1 → MAC R2-Gi1（要求を受けて）</text>\n  <rect x=\"310\" y=\"672\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"688\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルーティングテーブル</text>\n  <text x=\"320\" y=\"704\" font-size=\"10\" fill=\"#374151\">ルータ 1・ルータ 2 とも上の図の中の箱</text>\n<text x=\"20\" y=\"757\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"807\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① A → ルータ 1</text>\n  <rect x=\"20\" y=\"813\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"138\" y=\"813\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"813\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"813\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"813\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <line x1=\"20\" y1=\"857\" x2=\"562\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"853\" x2=\"20\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"853\" x2=\"562\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"291.0\" y=\"870\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"799\" x2=\"562\" y2=\"799\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"799\" x2=\"256\" y2=\"803\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"799\" x2=\"562\" y2=\"803\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"409.0\" y=\"795\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"903\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">② ルータ 1 → ルータ 2（MAC を付け替え）</text>\n  <rect x=\"20\" y=\"909\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi0</text>\n  <rect x=\"138\" y=\"909\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"256\" y=\"909\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"909\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"909\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"963\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ ルータ 2 → C（MAC を付け替え）</text>\n  <rect x=\"20\" y=\"969\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC C</text>\n  <rect x=\"138\" y=\"969\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi1</text>\n  <rect x=\"256\" y=\"969\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"969\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"969\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"1023\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ C → ルータ 2（返事。IP が入れ替わる）</text>\n  <rect x=\"20\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi1</text>\n  <rect x=\"138\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC C</text>\n  <rect x=\"256\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1029\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n  <text x=\"20\" y=\"1083\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑤ ルータ 2 → ルータ 1</text>\n  <rect x=\"20\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"138\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi0</text>\n  <rect x=\"256\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1089\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n  <text x=\"20\" y=\"1143\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑥ ルータ 1 → A</text>\n  <rect x=\"20\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"138\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"256\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1149\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n<text x=\"20\" y=\"1203\" font-size=\"10\" fill=\"#6b7280\">宛先 IP と送信元 IP は端から端まで変わらない（TTL などルータが書き換える欄はある）。MAC の部分はルータを越えるたびに付け替わる</text>\n<text x=\"20\" y=\"1219\" font-size=\"10\" fill=\"#6b7280\">各機器は ARP で次の相手の MAC を引く（やり取り自体は省略）。要求を受け取った側も相手を覚えるので、帰り ④⑤⑥ では ARP を引き直さない</text>\n</svg>","text":"<svg viewBox=\"0 0 900 1245\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"構成図（スタティックルート・ルータ 2 台をまたぐ A → C の通信と帰り道）\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1245\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スタティックルート：ルータ 2 台をまたぐ A → C の通信と、C → A の帰り道</text>\n  <text x=\"20\" y=\"50\" font-size=\"11\" fill=\"#6b7280\">ルータが自動で知っているのは自分のポートのネットワークだけ。その先は誰かが教えないと分からない。ここでは人が手動で追加する（スタティックルート）</text>\n  <rect x=\"30\" y=\"150\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"75\" y=\"170\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"75\" y=\"186\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.10</text>\n  <text x=\"75\" y=\"200\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">GW 192.168.10.1</text>\n  <line x1=\"120\" y1=\"178\" x2=\"160\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"160\" y=\"158\" width=\"90\" height=\"40\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"205\" y=\"175\" text-anchor=\"middle\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">スイッチ</text>\n  <text x=\"205\" y=\"190\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">MAC で転送</text>\n  <line x1=\"250\" y1=\"178\" x2=\"300\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"300\" y=\"140\" width=\"170\" height=\"76\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"385\" y=\"160\" text-anchor=\"middle\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1</text>\n  <text x=\"385\" y=\"180\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0: 192.168.10.1</text>\n  <text x=\"385\" y=\"196\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1: 172.16.12.1 /30</text>\n  <rect x=\"291\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"300\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi0</text>\n  <rect x=\"461\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"470\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi1</text>\n  <line x1=\"479\" y1=\"178\" x2=\"521\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <text x=\"500\" y=\"207\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">172.16.12.0/30</text>\n  <rect x=\"530\" y=\"140\" width=\"170\" height=\"76\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"615\" y=\"160\" text-anchor=\"middle\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2</text>\n  <text x=\"615\" y=\"180\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0: 172.16.12.2 /30</text>\n  <text x=\"615\" y=\"196\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1: 192.168.3.1</text>\n  <rect x=\"521\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"530\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi0</text>\n  <rect x=\"691\" y=\"169\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/>\n  <text x=\"700\" y=\"182\" text-anchor=\"middle\" font-size=\"8\" fill=\"#374151\">Gi1</text>\n  <line x1=\"709\" y1=\"178\" x2=\"770\" y2=\"178\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"770\" y=\"150\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"815\" y=\"170\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-C</text>\n  <text x=\"815\" y=\"186\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.3.10</text>\n  <text x=\"815\" y=\"200\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">GW 192.168.3.1</text>\n  <text x=\"20\" y=\"118\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">行き A → C</text>\n  <line x1=\"120\" y1=\"118\" x2=\"292\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"291,113 291,123 300,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"210\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"210\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <line x1=\"479\" y1=\"118\" x2=\"513\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"512,113 512,123 521,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"500\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"500\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <line x1=\"709\" y1=\"118\" x2=\"762\" y2=\"118\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"761,113 761,123 770,118\" fill=\"#0a7aff\"/>\n  <circle cx=\"740\" cy=\"118\" r=\"9\" fill=\"#0a7aff\"/><text x=\"740\" y=\"122\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">3</text>\n  <text x=\"20\" y=\"244\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">帰り C → A</text>\n  <line x1=\"770\" y1=\"244\" x2=\"717\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"718,239 718,249 709,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"740\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"740\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <line x1=\"521\" y1=\"244\" x2=\"487\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"488,239 488,249 479,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"500\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"500\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">5</text>\n  <line x1=\"300\" y1=\"244\" x2=\"128\" y2=\"244\" stroke=\"#0a7aff\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/><polygon points=\"129,239 129,249 120,244\" fill=\"#0a7aff\"/>\n  <circle cx=\"210\" cy=\"244\" r=\"9\" fill=\"#0a7aff\"/><text x=\"210\" y=\"248\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">6</text>\n  <rect x=\"280\" y=\"270\" width=\"210\" height=\"96\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"290\" y=\"288\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1 のルーティングテーブル</text>\n  <text x=\"290\" y=\"308\" font-size=\"10\" fill=\"#374151\">192.168.10.0/24　→ Gi0（自動）</text>\n  <text x=\"290\" y=\"324\" font-size=\"10\" fill=\"#374151\">172.16.12.0/30　→ Gi1（自動）</text>\n  <text x=\"290\" y=\"344\" font-size=\"10\" font-weight=\"700\" fill=\"#0a7aff\">192.168.3.0/24　→ 172.16.12.2（手動）</text>\n  <text x=\"290\" y=\"358\" font-size=\"9\" fill=\"#6b7280\">② がこの行を使う</text>\n  <rect x=\"510\" y=\"270\" width=\"210\" height=\"96\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"520\" y=\"288\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2 のルーティングテーブル</text>\n  <text x=\"520\" y=\"308\" font-size=\"10\" fill=\"#374151\">172.16.12.0/30　→ Gi0（自動）</text>\n  <text x=\"520\" y=\"324\" font-size=\"10\" fill=\"#374151\">192.168.3.0/24　→ Gi1（自動）</text>\n  <text x=\"520\" y=\"344\" font-size=\"10\" font-weight=\"700\" fill=\"#0a7aff\">192.168.10.0/24　→ 172.16.12.1（手動）</text>\n  <text x=\"520\" y=\"358\" font-size=\"9\" fill=\"#6b7280\">⑤ がこの行を使う。無いと帰れない</text>\n  <text x=\"20\" y=\"400\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">フロー</text>\n  <text x=\"20\" y=\"420\" font-size=\"11\" fill=\"#374151\">① A は宛先 192.168.3.10 が自分のネットワーク外なので、デフォルトゲートウェイ（ルータ 1）へ送る</text>\n  <text x=\"20\" y=\"438\" font-size=\"11\" fill=\"#374151\">② ルータ 1 はテーブルで 192.168.3.10 に一致する行を探す。手動で追加した行が一致し、次の渡し先 172.16.12.2 へ送る</text>\n  <text x=\"20\" y=\"456\" font-size=\"11\" fill=\"#374151\">③ ルータ 2 はテーブルを探す。自動の行 192.168.3.0/24 が一致し、自分の Gi1 から C へ直接届ける</text>\n  <text x=\"20\" y=\"474\" font-size=\"11\" fill=\"#374151\">④ C の返事は、宛先 192.168.10.10 がネットワーク外なので、デフォルトゲートウェイ（ルータ 2）へ</text>\n  <text x=\"20\" y=\"492\" font-size=\"11\" fill=\"#374151\">⑤ ルータ 2 はテーブルを探す。192.168.10.0/24 は自動では載らないので、一致するのは手動の行。その渡し先 172.16.12.1 へ送る</text>\n  <text x=\"20\" y=\"510\" font-size=\"11\" fill=\"#374151\">　（この行が無ければ捨てられ、送り主に「そこへは行けない」の通知が返る）</text>\n  <text x=\"20\" y=\"528\" font-size=\"11\" fill=\"#374151\">⑥ ルータ 1 は自動の行 192.168.10.0/24 で A へ直接届ける</text>\n  <text x=\"20\" y=\"556\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">行きと帰りは別々に決まる。だからスタティックルートは、通したい通信の往復ぶん、両側のルータに書く</text>\n<line x1=\"20\" y1=\"568\" x2=\"880\" y2=\"568\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"590\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n  <rect x=\"20\" y=\"602\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: ARP テーブル</text>\n  <text x=\"30\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">① 追加: 192.168.10.1 → MAC R1-Gi0</text>\n  <rect x=\"310\" y=\"602\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1: ARP テーブル</text>\n  <text x=\"320\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">① 追加: 192.168.10.10 → MAC A（要求を受けて）</text>\n  <text x=\"320\" y=\"649\" font-size=\"10\" fill=\"#0a7aff\">② 追加: 172.16.12.2 → MAC R2-Gi0</text>\n  <rect x=\"600\" y=\"602\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"618\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 2: ARP テーブル</text>\n  <text x=\"610\" y=\"634\" font-size=\"10\" fill=\"#0a7aff\">② 追加: 172.16.12.1 → MAC R1-Gi1（要求を受けて）</text>\n  <text x=\"610\" y=\"649\" font-size=\"10\" fill=\"#0a7aff\">③ 追加: 192.168.3.10 → MAC C</text>\n  <rect x=\"20\" y=\"672\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"688\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-C: ARP テーブル</text>\n  <text x=\"30\" y=\"704\" font-size=\"10\" fill=\"#0a7aff\">③ 追加: 192.168.3.1 → MAC R2-Gi1（要求を受けて）</text>\n  <rect x=\"310\" y=\"672\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"688\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルーティングテーブル</text>\n  <text x=\"320\" y=\"704\" font-size=\"10\" fill=\"#374151\">ルータ 1・ルータ 2 とも上の図の中の箱</text>\n<text x=\"20\" y=\"757\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"807\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① A → ルータ 1</text>\n  <rect x=\"20\" y=\"813\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"138\" y=\"813\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"813\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"813\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"813\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"827\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"842\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <line x1=\"20\" y1=\"857\" x2=\"562\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"853\" x2=\"20\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"853\" x2=\"562\" y2=\"857\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"291.0\" y=\"870\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"799\" x2=\"562\" y2=\"799\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"799\" x2=\"256\" y2=\"803\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"799\" x2=\"562\" y2=\"803\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"409.0\" y=\"795\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"903\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">② ルータ 1 → ルータ 2（MAC を付け替え）</text>\n  <rect x=\"20\" y=\"909\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi0</text>\n  <rect x=\"138\" y=\"909\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"256\" y=\"909\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"909\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"909\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"923\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"938\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"963\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ ルータ 2 → C（MAC を付け替え）</text>\n  <rect x=\"20\" y=\"969\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC C</text>\n  <rect x=\"138\" y=\"969\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi1</text>\n  <rect x=\"256\" y=\"969\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"374\" y=\"969\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"969\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"983\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"998\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"1023\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ C → ルータ 2（返事。IP が入れ替わる）</text>\n  <rect x=\"20\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi1</text>\n  <rect x=\"138\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC C</text>\n  <rect x=\"256\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1029\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1029\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1043\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1058\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n  <text x=\"20\" y=\"1083\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑤ ルータ 2 → ルータ 1</text>\n  <rect x=\"20\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"138\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R2-Gi0</text>\n  <rect x=\"256\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1089\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1089\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1103\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1118\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n  <text x=\"20\" y=\"1143\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑥ ルータ 1 → A</text>\n  <rect x=\"20\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"138\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"256\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"374\" y=\"1149\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.10</text>\n  <rect x=\"492\" y=\"1149\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1163\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1178\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">返事</text>\n<text x=\"20\" y=\"1203\" font-size=\"10\" fill=\"#6b7280\">宛先 IP と送信元 IP は端から端まで変わらない（TTL などルータが書き換える欄はある）。MAC の部分はルータを越えるたびに付け替わる</text>\n<text x=\"20\" y=\"1219\" font-size=\"10\" fill=\"#6b7280\">各機器は ARP で次の相手の MAC を引く（やり取り自体は省略）。要求を受け取った側も相手を覚えるので、帰り ④⑤⑥ では ARP を引き直さない</text>\n</svg>","line":67,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_a3c241","type":"heading","depth":2,"markdown":"## 図 4・図 6 との接続","text":"図 4・図 6 との接続","line":262,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2512f3","type":"paragraph","markdown":"図 4 ではスイッチが 2 台でした。\nスイッチは MAC を見て転送するので、ルーティングテーブルは出てきません。\nこの図ではルータが 2 台になり、ルータは IP を見るので、テーブルの行が主役になります。","text":"図 4 ではスイッチが 2 台でした。\nスイッチは MAC を見て転送するので、ルーティングテーブルは出てきません。\nこの図ではルータが 2 台になり、ルータは IP を見るので、テーブルの行が主役になります。","line":264,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_069b27","type":"paragraph","markdown":"帯を並べると、宛先 IP と送信元 IP は端から端まで変わらず、MAC の部分がルータを越えるたびに付け替わることが見えます。パケットの中で変わるのは、TTL のようにルータが書き換える欄だけです。","text":"帯を並べると、宛先 IP と送信元 IP は端から端まで変わらず、MAC の部分がルータを越えるたびに付け替わることが見えます。パケットの中で変わるのは、TTL のようにルータが書き換える欄だけです。","line":268,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_baa156","type":"paragraph","markdown":"次の図 6 では、ルータが 1 台に戻り、そのかわり VLAN が 2 つになります。\n図 4 のタグと、この図のルーティングテーブルが、そこで 1 台の中で出会います。","text":"次の図 6 では、ルータが 1 台に戻り、そのかわり VLAN が 2 つになります。\n図 4 のタグと、この図のルーティングテーブルが、そこで 1 台の中で出会います。","line":270,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_703626","type":"heading","depth":2,"markdown":"## 未検証・注意","text":"未検証・注意","line":273,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_e6433a","type":"list","markdown":"- 一致する行が複数あるときは、範囲の狭い行が勝ちます（ロンゲストマッチ）。「それ以外は全部ここへ」の行をデフォルトルート 0.0.0.0/0 と呼び、経路を 1 本ずつ書く代わりに使えます。この図では使っていません。\n- 同じ宛先の行が複数あるとき、どちらが載るかは行の信用度（AD 値）で決まります。予備の経路を眠らせておく書き方は、補 1 で扱います。\n- ⑤ で「送り主に通知が返る」と図に書いています。これは ICMP の到達不能の通知ですが、返すかどうかは機器の設定で変えられます。今回は一次資料で確認していないので未検証です。\n- 図では ARP のやり取り自体を省いています。要求を受け取った側も相手を覚えるので、帰りの ④⑤⑥ では ARP を引き直しません。","text":"一致する行が複数あるときは、範囲の狭い行が勝ちます（ロンゲストマッチ）。「それ以外は全部ここへ」の行をデフォルトルート 0.0.0.0/0 と呼び、経路を 1 本ずつ書く代わりに使えます。この図では使っていません。同じ宛先の行が複数あるとき、どちらが載るかは行の信用度（AD 値）で決まります。予備の経路を眠らせておく書き方は、補 1 で扱います。⑤ で「送り主に通知が返る」と図に書いています。これは ICMP の到達不能の通知ですが、返すかどうかは機器の設定で変えられます。今回は一次資料で確認していないので未検証です。図では ARP のやり取り自体を省いています。要求を受け取った側も相手を覚えるので、帰りの ④⑤⑥ では ARP を引き直しません。","line":275,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_240080","type":"heading","depth":2,"markdown":"## 出典","text":"出典","line":280,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_5c64c0","type":"list","markdown":"- 勉強会での本人の観察（2026-09-13 実機ハンズオン。資料は非公開）\n- [インフラエキスパート: ルーティングとは](https://www.infraexpert.com/study/routing.html) — インターフェイスが直接接続されているネットワークはルーティングテーブルに自動的に登録される。ネクストホップは、パケットを次に転送する隣接ルータの IP アドレス。ロンゲストマッチ\n- [インフラエキスパート: スタティックルーティング](https://www.infraexpert.com/study/routing3.html) — 管理者が手動で経路を設定する。`ip route` の書式と、デフォルトルート 0.0.0.0/0","text":"勉強会での本人の観察（2026-09-13 実機ハンズオン。資料は非公開）インフラエキスパート: ルーティングとは — インターフェイスが直接接続されているネットワークはルーティングテーブルに自動的に登録される。ネクストホップは、パケットを次に転送する隣接ルータの IP アドレス。ロンゲストマッチインフラエキスパート: スタティックルーティング — 管理者が手動で経路を設定する。ip route の書式と、デフォルトルート 0.0.0.0/0","line":282,"sources":["src_1","src_2"],"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1f7c1f","type":"heading","depth":2,"markdown":"## 関連","text":"関連","line":286,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_289b45","type":"list","markdown":"- [ネットワーク\\_INDEX](/notes/nw-basics-index) — 連載の目次\n\n- 連載の入口: [ネットワーク\\_00\\_3層で言葉を置く](/notes/nw-basics-00-three-layers)（`/notes/nw-basics-00-three-layers`）\n\n- 前の記事（図 4）: [ネットワーク\\_04\\_トランクとタグ](/notes/nw-basics-04-trunk)（`/notes/nw-basics-04-trunk`）\n\n- 次の記事（図 6）: [ネットワーク\\_06\\_VLAN間ルーティング](/notes/nw-basics-06-inter-vlan)（`/notes/nw-basics-06-inter-vlan`）\n\n- この図に関わる補足（補 1・補 2）: [ネットワーク\\_07a\\_フローティングスタティック](/notes/nw-basics-07a-floating-static)（`/notes/nw-basics-07a-floating-static`） ／ [ネットワーク\\_07b\\_VRF](/notes/nw-basics-07b-vrf)（`/notes/nw-basics-07b-vrf`）","text":"ネットワーク_INDEX — 連載の目次連載の入口: ネットワーク_00_3層で言葉を置く（/notes/nw-basics-00-three-layers）前の記事（図 4）: ネットワーク_04_トランクとタグ（/notes/nw-basics-04-trunk）次の記事（図 6）: ネットワーク_06_VLAN間ルーティング（/notes/nw-basics-06-inter-vlan）この図に関わる補足（補 1・補 2）: ネットワーク_07a_フローティングスタティック（/notes/nw-basics-07a-floating-static） ／ ネットワーク_07b_VRF（/notes/nw-basics-07b-vrf）","line":288,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}}]}