{"articleId":"art_72e429c15a","slug":"nw-basics-04-trunk","title":"タグが付くのはトランクの区間だけ","version":1,"area":"tech","topic":"ネットワーク","tags":["ネットワーク","vlan","トランク","concept"],"date":"2026-09-14","updated":"2026-09-14","records":[{"id":"rev_86e5bbb5ee","at":"2026-09-14","actor":{"kind":"ai","id":"claude-fable-5","label":"AI (claude-fable-5)"},"version":1,"kind":"ai-check","scope":{},"text":"タグの位置（宛先 MAC・送信元 MAC のうしろに 4 バイト）をインフラエキスパートで、VLAN 番号の範囲 1〜4094 とネイティブ VLAN の既定 1・タグなしフレームの転送を Cisco の設定ガイドで確認した。0 と 4095 が使えない理由は IEEE 802.1Q の規格本文を読んでおらず未検証。校正チェックリストを通し、英訳しての通読・結論の先取り・未定義語の初出・体言止めの混入・「手順」と「フロー」の表記を機械検査した。守秘: 実名・社名・会場名・地名・金額なし（勉強会は一般化して記述）","status":"open","source":"frontmatter"},{"id":"rev_a0d6f763ed","at":"2026-09-14","actor":{"kind":"ai","id":"claude-fable-5","label":"AI (claude-fable-5)"},"version":1,"kind":"fact-check","scope":{},"text":"VLAN ID 0 と 4095 が予約で使えないことを Cisco の Catalyst 6500 設定ガイドの範囲表で確認し、未検証の記述を出典付きに改めた","status":"open","source":"frontmatter"}],"blocks":[{"id":"blk_e1027b","type":"paragraph","markdown":"スイッチを 2 台に増やし、同じ VLAN の PC を別々のスイッチにつなぐと、2 台の間をどう渡すかという問いが残ります。","text":"スイッチを 2 台に増やし、同じ VLAN の PC を別々のスイッチにつなぐと、2 台の間をどう渡すかという問いが残ります。","line":2,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2fe39f","type":"paragraph","markdown":"勉強会で配られた資料の説明は「トランクポートは複数の VLAN を運ぶ。どの VLAN かを識別するタグを付ける」の 2 行でした。\nタグがどこで付き、どこで外れるのかは書いてありません。\nこの記事は、A から B への 1 本の通信を 1 枚の図で追います。","text":"勉強会で配られた資料の説明は「トランクポートは複数の VLAN を運ぶ。どの VLAN かを識別するタグを付ける」の 2 行でした。\nタグがどこで付き、どこで外れるのかは書いてありません。\nこの記事は、A から B への 1 本の通信を 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_599031","type":"heading","depth":4,"markdown":"#### トランクポート","text":"トランクポート","line":13,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_3377a4","type":"paragraph","markdown":"物理ポートを「複数の VLAN を通す」設定で使ったものです。\nPC をつなぐアクセスポート（1 つの VLAN だけに所属する物理ポート）と対になります。","text":"物理ポートを「複数の VLAN を通す」設定で使ったものです。\nPC をつなぐアクセスポート（1 つの VLAN だけに所属する物理ポート）と対になります。","line":15,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1ca35d","type":"heading","depth":4,"markdown":"#### タグ","text":"タグ","line":18,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_460cf1","type":"paragraph","markdown":"論理のものです。\n通信 1 つずつに差し込む 4 バイトで、中に VLAN 番号が入ります。\n規格は IEEE 802.1Q で、宛先 MAC・送信元 MAC のうしろに差し込まれます。","text":"論理のものです。\n通信 1 つずつに差し込む 4 バイトで、中に VLAN 番号が入ります。\n規格は IEEE 802.1Q で、宛先 MAC・送信元 MAC のうしろに差し込まれます。","line":20,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_974bb5","type":"heading","depth":4,"markdown":"#### ネイティブ VLAN","text":"ネイティブ VLAN","line":24,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_dc65eb","type":"paragraph","markdown":"トランクでタグを付けないまま通る VLAN です。\n既定は VLAN 1 で、両端のスイッチで同じ番号にそろえます。","text":"トランクでタグを付けないまま通る VLAN です。\n既定は VLAN 1 で、両端のスイッチで同じ番号にそろえます。","line":26,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_118c7a","type":"heading","depth":2,"markdown":"## 結びつき","text":"結びつき","line":29,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_360c17","type":"list","markdown":"- 物理ポート ⇄ トランク設定は手動です。人が「このポートはトランク」と決めます。\n- 通信 ⇄ タグは自動です。スイッチがトランクポートから出すときに付け、アクセスポートから出すときに外します。\n- 通す VLAN の一覧は、初期状態では全部の VLAN を通す設定です。人が絞れます。\n- 通す VLAN の一覧は自動ではそろいません。各スイッチがトランクポートの設定として自分の分を持つので、人が両側を一致させます。\n- その VLAN が両方のスイッチに作られていることも要ります。受け側に無ければ流す先がありません。","text":"物理ポート ⇄ トランク設定は手動です。人が「このポートはトランク」と決めます。通信 ⇄ タグは自動です。スイッチがトランクポートから出すときに付け、アクセスポートから出すときに外します。通す VLAN の一覧は、初期状態では全部の VLAN を通す設定です。人が絞れます。通す VLAN の一覧は自動ではそろいません。各スイッチがトランクポートの設定として自分の分を持つので、人が両側を一致させます。その VLAN が両方のスイッチに作られていることも要ります。受け側に無ければ流す先がありません。","line":31,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_df21fc","type":"heading","depth":2,"markdown":"## 通信フロー","text":"通信フロー","line":37,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_01f008","type":"paragraph","markdown":"A と B はどちらも VLAN 10 で、別々のスイッチにつながっています。","text":"A と B はどちらも VLAN 10 で、別々のスイッチにつながっています。","line":39,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_d13fd3","type":"paragraph","markdown":"① A はタグなしで送ります。PC はタグを知りません。","text":"① A はタグなしで送ります。PC はタグを知りません。","line":41,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c75b85","type":"paragraph","markdown":"② スイッチ 1 は「ポート 1 ＝ VLAN 10」から来たので VLAN 10 と扱い、トランクポートから出すときにタグ「10」を付けます。","text":"② スイッチ 1 は「ポート 1 ＝ VLAN 10」から来たので VLAN 10 と扱い、トランクポートから出すときにタグ「10」を付けます。","line":43,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_466640","type":"paragraph","markdown":"③ スイッチ 2 はタグ「10」を読んで VLAN 10 と扱い、VLAN 10 のテーブルで MAC B を探してポート 1 へ出します。VLAN 20 の D には流しません。","text":"③ スイッチ 2 はタグ「10」を読んで VLAN 10 と扱い、VLAN 10 のテーブルで MAC B を探してポート 1 へ出します。VLAN 20 の D には流しません。","line":45,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_a3ed31","type":"paragraph","markdown":"④ アクセスポートから出すときにタグを外します。B はタグなしで受け取ります。","text":"④ アクセスポートから出すときにタグを外します。B はタグなしで受け取ります。","line":47,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c0b26e","type":"paragraph","markdown":"タグが付いているのはトランクの区間だけです。\nトランクが無ければ、VLAN の数だけスイッチ間にケーブルが要ります。","text":"タグが付いているのはトランクの区間だけです。\nトランクが無ければ、VLAN の数だけスイッチ間にケーブルが要ります。","line":49,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_963d40","type":"heading","depth":2,"markdown":"## 図 4","text":"図 4","line":52,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2abd90","type":"paragraph","markdown":"図の上半分が構成図とフローの番号、下半分が各テーブルの推移と通信の中身の推移です。","text":"図の上半分が構成図とフローの番号、下半分が各テーブルの推移と通信の中身の推移です。","line":54,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_57da8a","type":"html","markdown":"<svg viewBox=\"0 0 900 1103\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"構成図（トランク・スイッチ 2 台をまたぐ VLAN 10 の通信）\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1103\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">トランク：スイッチ 2 台をまたぐ A → B の通信（A・B は VLAN 10、E・D は VLAN 20）</text>\n  <text x=\"20\" y=\"50\" font-size=\"11\" fill=\"#6b7280\">VLAN 10 と VLAN 20 の通信を、1 本のケーブルで運ぶ。どちらの VLAN かは、通信 1 つずつに付けた「タグ」で見分ける</text>\n  <rect x=\"60\" y=\"110\" width=\"300\" height=\"90\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"72\" y=\"132\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1</text>\n  <text x=\"72\" y=\"156\" font-size=\"11\" fill=\"#374151\">ポート 1 は VLAN 10、ポート 2 は VLAN 20</text>\n  <text x=\"72\" y=\"174\" font-size=\"11\" fill=\"#0a7aff\" font-weight=\"700\">② VLAN 10 の通信にタグ「10」を付けて T から出す</text>\n  <rect x=\"540\" y=\"110\" width=\"300\" height=\"90\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"552\" y=\"132\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 2</text>\n  <text x=\"552\" y=\"156\" font-size=\"11\" fill=\"#0a7aff\" font-weight=\"700\">③ タグ「10」を読み、VLAN 10 のポートだけへ</text>\n  <text x=\"552\" y=\"174\" font-size=\"11\" fill=\"#374151\">ポート 1 は VLAN 10、ポート 2 は VLAN 20</text>\n  <rect x=\"121\" y=\"191\" width=\"18\" height=\"18\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><text x=\"130\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">1</text>\n  <rect x=\"221\" y=\"191\" width=\"18\" height=\"18\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1.5\"/><text x=\"230\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">2</text>\n  <rect x=\"601\" y=\"191\" width=\"18\" height=\"18\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><text x=\"610\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">1</text>\n  <rect x=\"701\" y=\"191\" width=\"18\" height=\"18\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1.5\"/><text x=\"710\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">2</text>\n  <rect x=\"351\" y=\"146\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#1f2937\" stroke-width=\"1.5\"/><text x=\"360\" y=\"159\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">T</text>\n  <rect x=\"531\" y=\"146\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#1f2937\" stroke-width=\"1.5\"/><text x=\"540\" y=\"159\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">T</text>\n  <text x=\"360\" y=\"100\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">トランクポート</text>\n  <text x=\"540\" y=\"100\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">トランクポート</text>\n  <line x1=\"369\" y1=\"155\" x2=\"531\" y2=\"155\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <text x=\"450\" y=\"147\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">ケーブル 1 本</text>\n  <line x1=\"130\" y1=\"209\" x2=\"130\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"230\" y1=\"209\" x2=\"230\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"610\" y1=\"209\" x2=\"610\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"710\" y1=\"209\" x2=\"710\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"85\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"130\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"130\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.10</text>\n  <text x=\"130\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC A</text>\n  <rect x=\"185\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"230\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-E</text>\n  <text x=\"230\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.20.40</text>\n  <text x=\"230\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC E</text>\n  <rect x=\"565\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-B</text>\n  <text x=\"610\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.20</text>\n  <text x=\"610\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC B</text>\n  <rect x=\"665\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"710\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-D</text>\n  <text x=\"710\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.20.30</text>\n  <text x=\"710\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC D</text>\n  <line x1=\"116\" y1=\"300\" x2=\"116\" y2=\"220\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"111,221 121,221 116,212\" fill=\"#0a7aff\"/>\n  <circle cx=\"116\" cy=\"250\" r=\"9\" fill=\"#0a7aff\"/><text x=\"116\" y=\"254\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <text x=\"104\" y=\"254\" text-anchor=\"end\" font-size=\"10\" fill=\"#374151\">タグなし</text>\n  <line x1=\"369\" y1=\"178\" x2=\"523\" y2=\"178\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"522,173 522,183 531,178\" fill=\"#0a7aff\"/>\n  <circle cx=\"450\" cy=\"178\" r=\"9\" fill=\"#0a7aff\"/><text x=\"450\" y=\"182\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <rect x=\"405\" y=\"192\" width=\"90\" height=\"22\" rx=\"4\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"450\" y=\"207\" text-anchor=\"middle\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">タグ「10」付き</text>\n  <line x1=\"624\" y1=\"209\" x2=\"624\" y2=\"288\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"619,287 629,287 624,296\" fill=\"#0a7aff\"/>\n  <circle cx=\"624\" cy=\"250\" r=\"9\" fill=\"#0a7aff\"/><text x=\"624\" y=\"254\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <text x=\"640\" y=\"254\" font-size=\"10\" fill=\"#374151\">タグを外して渡す</text>\n  <line x1=\"724\" y1=\"209\" x2=\"724\" y2=\"254\" stroke=\"#9aa7b5\" stroke-width=\"2\" stroke-dasharray=\"3 3\"/><polygon points=\"719,253 729,253 724,262\" fill=\"#9aa7b5\"/>\n  <line x1=\"717\" y1=\"266\" x2=\"731\" y2=\"280\" stroke=\"#b45309\" stroke-width=\"2.5\"/>\n  <line x1=\"731\" y1=\"266\" x2=\"717\" y2=\"280\" stroke=\"#b45309\" stroke-width=\"2.5\"/>\n  <text x=\"740\" y=\"277\" font-size=\"10\" fill=\"#b45309\">D には流さない</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 はタグなしで送る（PC はタグを知らない）　② スイッチ 1 は「ポート 1 ＝ VLAN 10」から来たので VLAN 10 と扱い、トランクポートから出すときタグ「10」を付ける</text>\n  <text x=\"20\" y=\"440\" font-size=\"11\" fill=\"#374151\">③ スイッチ 2 はタグ「10」を読んで VLAN 10 と扱い、VLAN 10 のポートだけに流す　④ アクセスポートから出すときタグを外す。B はタグなしで受け取る</text>\n  <text x=\"20\" y=\"470\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">増えたもの</text>\n  <text x=\"20\" y=\"490\" font-size=\"11\" fill=\"#374151\">もの：トランクポート（物理ポートを複数 VLAN 用に使う設定）・タグ（論理・通信 1 つずつに付く VLAN 番号の札）</text>\n  <text x=\"20\" y=\"508\" font-size=\"11\" fill=\"#374151\">結びつき：物理ポート ⇄ トランク設定（手動）、通信 ⇄ タグ（自動・スイッチが付け外し）</text>\n  <text x=\"20\" y=\"526\" font-size=\"11\" fill=\"#6b7280\">タグの規格は IEEE 802.1Q。宛先 MAC・送信元 MAC のうしろに 4 バイト差し込み、その中に VLAN 番号が入る。使える番号は 1〜4094（0 と 4095 は規格上使えない）</text>\n  <text x=\"20\" y=\"544\" font-size=\"11\" fill=\"#6b7280\">タグが付くのはトランクの区間だけ。トランクでも 1 つだけタグを付けない VLAN（ネイティブ VLAN）を決められるが、この図では全部タグを付ける設定として描く</text>\n<line x1=\"20\" y1=\"564\" x2=\"880\" y2=\"564\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"586\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n<text x=\"20\" y=\"598\" font-size=\"10\" fill=\"#6b7280\">前提: A と B の ARP は済んでいて、その ARP が両スイッチを通ったので両方の MAC も学習済み（この図の主題はタグの付け外し）</text>\n  <rect x=\"20\" y=\"612\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: MAC テーブル（VLAN 10）</text>\n  <text x=\"30\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: MAC A → ポート 1</text>\n  <text x=\"30\" y=\"659\" font-size=\"10\" fill=\"#374151\">前提: MAC B → ポート T</text>\n  <rect x=\"310\" y=\"612\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 2: MAC テーブル（VLAN 10）</text>\n  <text x=\"320\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: MAC A → ポート T</text>\n  <text x=\"320\" y=\"659\" font-size=\"10\" fill=\"#374151\">前提: MAC B → ポート 1</text>\n  <rect x=\"600\" y=\"612\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: ARP テーブル</text>\n  <text x=\"610\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: 192.168.10.20 → MAC B</text>\n  <rect x=\"20\" y=\"682\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"698\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-B: ARP テーブル</text>\n  <text x=\"30\" y=\"714\" font-size=\"10\" fill=\"#374151\">前提: 192.168.10.10 → MAC A</text>\n<text x=\"20\" y=\"767\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"817\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① A → スイッチ 1（アクセス区間・タグなし）</text>\n  <rect x=\"20\" y=\"823\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"823\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"823\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"374\" y=\"823\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"823\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <line x1=\"20\" y1=\"867\" x2=\"562\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"863\" x2=\"20\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"863\" x2=\"562\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"291.0\" y=\"880\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"809\" x2=\"562\" y2=\"809\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"809\" x2=\"256\" y2=\"813\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"809\" x2=\"562\" y2=\"813\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"409.0\" y=\"805\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"913\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">② スイッチ 1 → スイッチ 2（トランク区間・タグ 10 を挿入）</text>\n  <rect x=\"20\" y=\"919\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"919\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"919\" width=\"84\" height=\"36\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1\"/>\n  <text x=\"298.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">タグ（VLAN 番号）</text>\n  <text x=\"298.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">10</text>\n  <rect x=\"340\" y=\"919\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"399.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"399.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"458\" y=\"919\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"517.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"517.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"576\" y=\"919\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"611.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"611.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"973\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ スイッチ 2 の中</text>\n  <text x=\"20\" y=\"993\" font-size=\"10\" fill=\"#6b7280\">タグ 10 を読んで VLAN 10 と判断。VLAN 10 のテーブルの MAC B → ポート 1 を見て、そこだけへ出す</text>\n  <text x=\"20\" y=\"1017\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ スイッチ 2 → B（アクセス区間・タグを除去）</text>\n  <rect x=\"20\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"374\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"1023\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n<text x=\"20\" y=\"1077\" font-size=\"10\" fill=\"#6b7280\">タグは MAC の部分と IP の部分の間に挟まる 4 バイト。トランクの区間だけ付き、宛先・送信元は変わらない</text>\n</svg>","text":"<svg viewBox=\"0 0 900 1103\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"構成図（トランク・スイッチ 2 台をまたぐ VLAN 10 の通信）\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1103\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">トランク：スイッチ 2 台をまたぐ A → B の通信（A・B は VLAN 10、E・D は VLAN 20）</text>\n  <text x=\"20\" y=\"50\" font-size=\"11\" fill=\"#6b7280\">VLAN 10 と VLAN 20 の通信を、1 本のケーブルで運ぶ。どちらの VLAN かは、通信 1 つずつに付けた「タグ」で見分ける</text>\n  <rect x=\"60\" y=\"110\" width=\"300\" height=\"90\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"72\" y=\"132\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1</text>\n  <text x=\"72\" y=\"156\" font-size=\"11\" fill=\"#374151\">ポート 1 は VLAN 10、ポート 2 は VLAN 20</text>\n  <text x=\"72\" y=\"174\" font-size=\"11\" fill=\"#0a7aff\" font-weight=\"700\">② VLAN 10 の通信にタグ「10」を付けて T から出す</text>\n  <rect x=\"540\" y=\"110\" width=\"300\" height=\"90\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"552\" y=\"132\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 2</text>\n  <text x=\"552\" y=\"156\" font-size=\"11\" fill=\"#0a7aff\" font-weight=\"700\">③ タグ「10」を読み、VLAN 10 のポートだけへ</text>\n  <text x=\"552\" y=\"174\" font-size=\"11\" fill=\"#374151\">ポート 1 は VLAN 10、ポート 2 は VLAN 20</text>\n  <rect x=\"121\" y=\"191\" width=\"18\" height=\"18\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><text x=\"130\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">1</text>\n  <rect x=\"221\" y=\"191\" width=\"18\" height=\"18\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1.5\"/><text x=\"230\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">2</text>\n  <rect x=\"601\" y=\"191\" width=\"18\" height=\"18\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><text x=\"610\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">1</text>\n  <rect x=\"701\" y=\"191\" width=\"18\" height=\"18\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1.5\"/><text x=\"710\" y=\"204\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">2</text>\n  <rect x=\"351\" y=\"146\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#1f2937\" stroke-width=\"1.5\"/><text x=\"360\" y=\"159\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">T</text>\n  <rect x=\"531\" y=\"146\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#1f2937\" stroke-width=\"1.5\"/><text x=\"540\" y=\"159\" text-anchor=\"middle\" font-size=\"10\" fill=\"#1f2937\">T</text>\n  <text x=\"360\" y=\"100\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">トランクポート</text>\n  <text x=\"540\" y=\"100\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">トランクポート</text>\n  <line x1=\"369\" y1=\"155\" x2=\"531\" y2=\"155\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <text x=\"450\" y=\"147\" text-anchor=\"middle\" font-size=\"10\" fill=\"#6b7280\">ケーブル 1 本</text>\n  <line x1=\"130\" y1=\"209\" x2=\"130\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"230\" y1=\"209\" x2=\"230\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"610\" y1=\"209\" x2=\"610\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <line x1=\"710\" y1=\"209\" x2=\"710\" y2=\"300\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"85\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"130\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"130\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.10</text>\n  <text x=\"130\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC A</text>\n  <rect x=\"185\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"230\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-E</text>\n  <text x=\"230\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.20.40</text>\n  <text x=\"230\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC E</text>\n  <rect x=\"565\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-B</text>\n  <text x=\"610\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.10.20</text>\n  <text x=\"610\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC B</text>\n  <rect x=\"665\" y=\"300\" width=\"90\" height=\"56\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"710\" y=\"320\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-D</text>\n  <text x=\"710\" y=\"336\" text-anchor=\"middle\" font-size=\"11\" fill=\"#374151\">192.168.20.30</text>\n  <text x=\"710\" y=\"350\" text-anchor=\"middle\" font-size=\"11\" fill=\"#6b7280\">MAC D</text>\n  <line x1=\"116\" y1=\"300\" x2=\"116\" y2=\"220\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"111,221 121,221 116,212\" fill=\"#0a7aff\"/>\n  <circle cx=\"116\" cy=\"250\" r=\"9\" fill=\"#0a7aff\"/><text x=\"116\" y=\"254\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <text x=\"104\" y=\"254\" text-anchor=\"end\" font-size=\"10\" fill=\"#374151\">タグなし</text>\n  <line x1=\"369\" y1=\"178\" x2=\"523\" y2=\"178\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"522,173 522,183 531,178\" fill=\"#0a7aff\"/>\n  <circle cx=\"450\" cy=\"178\" r=\"9\" fill=\"#0a7aff\"/><text x=\"450\" y=\"182\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <rect x=\"405\" y=\"192\" width=\"90\" height=\"22\" rx=\"4\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"450\" y=\"207\" text-anchor=\"middle\" font-size=\"11\" font-weight=\"700\" fill=\"#0a7aff\">タグ「10」付き</text>\n  <line x1=\"624\" y1=\"209\" x2=\"624\" y2=\"288\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"619,287 629,287 624,296\" fill=\"#0a7aff\"/>\n  <circle cx=\"624\" cy=\"250\" r=\"9\" fill=\"#0a7aff\"/><text x=\"624\" y=\"254\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <text x=\"640\" y=\"254\" font-size=\"10\" fill=\"#374151\">タグを外して渡す</text>\n  <line x1=\"724\" y1=\"209\" x2=\"724\" y2=\"254\" stroke=\"#9aa7b5\" stroke-width=\"2\" stroke-dasharray=\"3 3\"/><polygon points=\"719,253 729,253 724,262\" fill=\"#9aa7b5\"/>\n  <line x1=\"717\" y1=\"266\" x2=\"731\" y2=\"280\" stroke=\"#b45309\" stroke-width=\"2.5\"/>\n  <line x1=\"731\" y1=\"266\" x2=\"717\" y2=\"280\" stroke=\"#b45309\" stroke-width=\"2.5\"/>\n  <text x=\"740\" y=\"277\" font-size=\"10\" fill=\"#b45309\">D には流さない</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 はタグなしで送る（PC はタグを知らない）　② スイッチ 1 は「ポート 1 ＝ VLAN 10」から来たので VLAN 10 と扱い、トランクポートから出すときタグ「10」を付ける</text>\n  <text x=\"20\" y=\"440\" font-size=\"11\" fill=\"#374151\">③ スイッチ 2 はタグ「10」を読んで VLAN 10 と扱い、VLAN 10 のポートだけに流す　④ アクセスポートから出すときタグを外す。B はタグなしで受け取る</text>\n  <text x=\"20\" y=\"470\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">増えたもの</text>\n  <text x=\"20\" y=\"490\" font-size=\"11\" fill=\"#374151\">もの：トランクポート（物理ポートを複数 VLAN 用に使う設定）・タグ（論理・通信 1 つずつに付く VLAN 番号の札）</text>\n  <text x=\"20\" y=\"508\" font-size=\"11\" fill=\"#374151\">結びつき：物理ポート ⇄ トランク設定（手動）、通信 ⇄ タグ（自動・スイッチが付け外し）</text>\n  <text x=\"20\" y=\"526\" font-size=\"11\" fill=\"#6b7280\">タグの規格は IEEE 802.1Q。宛先 MAC・送信元 MAC のうしろに 4 バイト差し込み、その中に VLAN 番号が入る。使える番号は 1〜4094（0 と 4095 は規格上使えない）</text>\n  <text x=\"20\" y=\"544\" font-size=\"11\" fill=\"#6b7280\">タグが付くのはトランクの区間だけ。トランクでも 1 つだけタグを付けない VLAN（ネイティブ VLAN）を決められるが、この図では全部タグを付ける設定として描く</text>\n<line x1=\"20\" y1=\"564\" x2=\"880\" y2=\"564\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"586\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n<text x=\"20\" y=\"598\" font-size=\"10\" fill=\"#6b7280\">前提: A と B の ARP は済んでいて、その ARP が両スイッチを通ったので両方の MAC も学習済み（この図の主題はタグの付け外し）</text>\n  <rect x=\"20\" y=\"612\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: MAC テーブル（VLAN 10）</text>\n  <text x=\"30\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: MAC A → ポート 1</text>\n  <text x=\"30\" y=\"659\" font-size=\"10\" fill=\"#374151\">前提: MAC B → ポート T</text>\n  <rect x=\"310\" y=\"612\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 2: MAC テーブル（VLAN 10）</text>\n  <text x=\"320\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: MAC A → ポート T</text>\n  <text x=\"320\" y=\"659\" font-size=\"10\" fill=\"#374151\">前提: MAC B → ポート 1</text>\n  <rect x=\"600\" y=\"612\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"628\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: ARP テーブル</text>\n  <text x=\"610\" y=\"644\" font-size=\"10\" fill=\"#374151\">前提: 192.168.10.20 → MAC B</text>\n  <rect x=\"20\" y=\"682\" width=\"280\" height=\"45\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"698\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-B: ARP テーブル</text>\n  <text x=\"30\" y=\"714\" font-size=\"10\" fill=\"#374151\">前提: 192.168.10.10 → MAC A</text>\n<text x=\"20\" y=\"767\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"817\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① A → スイッチ 1（アクセス区間・タグなし）</text>\n  <rect x=\"20\" y=\"823\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"823\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"823\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"374\" y=\"823\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"823\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"837\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"852\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <line x1=\"20\" y1=\"867\" x2=\"562\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"863\" x2=\"20\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"863\" x2=\"562\" y2=\"867\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"291.0\" y=\"880\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"809\" x2=\"562\" y2=\"809\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"809\" x2=\"256\" y2=\"813\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"562\" y1=\"809\" x2=\"562\" y2=\"813\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"409.0\" y=\"805\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"913\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">② スイッチ 1 → スイッチ 2（トランク区間・タグ 10 を挿入）</text>\n  <rect x=\"20\" y=\"919\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"919\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"919\" width=\"84\" height=\"36\" fill=\"#fff1dc\" stroke=\"#d97706\" stroke-width=\"1\"/>\n  <text x=\"298.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">タグ（VLAN 番号）</text>\n  <text x=\"298.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">10</text>\n  <rect x=\"340\" y=\"919\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"399.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"399.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"458\" y=\"919\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"517.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"517.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"576\" y=\"919\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"611.0\" y=\"933\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"611.0\" y=\"948\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n  <text x=\"20\" y=\"973\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ スイッチ 2 の中</text>\n  <text x=\"20\" y=\"993\" font-size=\"10\" fill=\"#6b7280\">タグ 10 を読んで VLAN 10 と判断。VLAN 10 のテーブルの MAC B → ポート 1 を見て、そこだけへ出す</text>\n  <text x=\"20\" y=\"1017\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ スイッチ 2 → B（アクセス区間・タグを除去）</text>\n  <rect x=\"20\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC B</text>\n  <rect x=\"138\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.20</text>\n  <rect x=\"374\" y=\"1023\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.10</text>\n  <rect x=\"492\" y=\"1023\" width=\"70\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"527.0\" y=\"1037\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">データ</text>\n  <text x=\"527.0\" y=\"1052\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ping</text>\n<text x=\"20\" y=\"1077\" font-size=\"10\" fill=\"#6b7280\">タグは MAC の部分と IP の部分の間に挟まる 4 バイト。トランクの区間だけ付き、宛先・送信元は変わらない</text>\n</svg>","line":56,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_9dd5f2","type":"heading","depth":2,"markdown":"## 図 3・図 5 との接続","text":"図 3・図 5 との接続","line":198,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_631078","type":"paragraph","markdown":"図 3 はスイッチ 1 台の中の話でした。\nVLAN は、全員あてを流す範囲を同じ VLAN のポートだけに絞ります。\nこの図ではスイッチが 2 台になり、その範囲が箱をまたぎます。\nまたぐ区間だけタグが付き、PC 側に出るときには外れるので、PC から見える通信は図 3 と変わりません。","text":"図 3 はスイッチ 1 台の中の話でした。\nVLAN は、全員あてを流す範囲を同じ VLAN のポートだけに絞ります。\nこの図ではスイッチが 2 台になり、その範囲が箱をまたぎます。\nまたぐ区間だけタグが付き、PC 側に出るときには外れるので、PC から見える通信は図 3 と変わりません。","line":200,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_f2780c","type":"paragraph","markdown":"次の図 5 では、スイッチではなくルータが 2 台になります。\nそこで変わるのは MAC の付け替えとルーティングテーブルで、タグは出てきません。\nタグがルータに関わるのは図 6 です。","text":"次の図 5 では、スイッチではなくルータが 2 台になります。\nそこで変わるのは MAC の付け替えとルーティングテーブルで、タグは出てきません。\nタグがルータに関わるのは図 6 です。","line":205,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_703626","type":"heading","depth":2,"markdown":"## 未検証・注意","text":"未検証・注意","line":209,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_4b5347","type":"list","markdown":"- タグの中の VLAN 番号の欄には、値としては 0 から 4095 まで入ります。Cisco の設定ガイドの範囲表では、使える VLAN ID は 1 から 4094 です。図の「0 と 4095 は規格上使えない」は、Cisco の VLAN 設定ガイドの範囲表（0 と 4095 は Reserved。システム専用で、見ることも使うこともできない）で確認しました。IEEE 802.1Q の規格本文そのものは読んでいません。\n- 図はネイティブ VLAN を使わない設定（両方の VLAN にタグを付ける）として描いています。ネイティブ VLAN を使うと、その VLAN だけタグなしで通ります。\n- 図の帯は、A と B の ARP が済んでいて、その通信が両方のスイッチを通ったので両方の MAC テーブルが学習済み、という前提で書いています。この図の主題はタグの付け外しです。","text":"タグの中の VLAN 番号の欄には、値としては 0 から 4095 まで入ります。Cisco の設定ガイドの範囲表では、使える VLAN ID は 1 から 4094 です。図の「0 と 4095 は規格上使えない」は、Cisco の VLAN 設定ガイドの範囲表（0 と 4095 は Reserved。システム専用で、見ることも使うこともできない）で確認しました。IEEE 802.1Q の規格本文そのものは読んでいません。図はネイティブ VLAN を使わない設定（両方の VLAN にタグを付ける）として描いています。ネイティブ VLAN を使うと、その VLAN だけタグなしで通ります。図の帯は、A と B の ARP が済んでいて、その通信が両方のスイッチを通ったので両方の MAC テーブルが学習済み、という前提で書いています。この図の主題はタグの付け外しです。","line":211,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_240080","type":"heading","depth":2,"markdown":"## 出典","text":"出典","line":215,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_3e5bfe","type":"list","markdown":"- [Cisco: Catalyst 6500 Release 15.4SY Software Configuration Guide — Configuring VLANs](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/15-4SY/config_guide/sup6T/15_3_sy_swcg_6T/vlans.html) — VLAN ID の範囲表（0 と 4095 は Reserved）\n\n- 勉強会での本人の観察（2026-09-13 実機ハンズオン。資料は非公開）\n\n- [インフラエキスパート: VLAN - アクセスポート/トランクポート](https://www.infraexpert.com/study/vlanz2.html) — IEEE 802.1Q のタグは送信元 MAC アドレスとタイプフィールドの間に 4 バイト差し込まれる\n\n- [Cisco: Configuring VLANs（Catalyst 3750-X/3560-X）](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750x_3560x/software/release/12-2_55_se/configuration/guide/3750xscg/swvlan.html) — VLAN ID の範囲は 1 から 4094。ネイティブ VLAN の既定は VLAN 1 で、タグなしの通信はネイティブ VLAN で転送される","text":"Cisco: Catalyst 6500 Release 15.4SY Software Configuration Guide — Configuring VLANs — VLAN ID の範囲表（0 と 4095 は Reserved）勉強会での本人の観察（2026-09-13 実機ハンズオン。資料は非公開）インフラエキスパート: VLAN - アクセスポート/トランクポート — IEEE 802.1Q のタグは送信元 MAC アドレスとタイプフィールドの間に 4 バイト差し込まれるCisco: Configuring VLANs（Catalyst 3750-X/3560-X） — VLAN ID の範囲は 1 から 4094。ネイティブ VLAN の既定は VLAN 1 で、タグなしの通信はネイティブ VLAN で転送される","line":217,"sources":["src_1","src_2","src_3"],"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1f7c1f","type":"heading","depth":2,"markdown":"## 関連","text":"関連","line":223,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c602cc","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- 前の記事（図 3）: [ネットワーク\\_03\\_VLAN](/notes/nw-basics-03-vlan)（`/notes/nw-basics-03-vlan`）\n\n- 次の記事（図 5）: [ネットワーク\\_05\\_行きと帰り](/notes/nw-basics-05-static-route)（`/notes/nw-basics-05-static-route`）\n\n- この図に関わる補足（補 3）: [ネットワーク\\_07c\\_CDPとLLDP](/notes/nw-basics-07c-cdp-lldp)（`/notes/nw-basics-07c-cdp-lldp`）","text":"ネットワーク_INDEX — 連載の目次連載の入口: ネットワーク_00_3層で言葉を置く（/notes/nw-basics-00-three-layers）前の記事（図 3）: ネットワーク_03_VLAN（/notes/nw-basics-03-vlan）次の記事（図 5）: ネットワーク_05_行きと帰り（/notes/nw-basics-05-static-route）この図に関わる補足（補 3）: ネットワーク_07c_CDPとLLDP（/notes/nw-basics-07c-cdp-lldp）","line":225,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}}]}