{"articleId":"art_e4fbdc045b","slug":"nw-basics-17-dhcp","title":"住所を配る全員あてが、偽のサーバにも答える隙を与える","version":1,"area":"tech","topic":"ネットワーク","tags":["ネットワーク","dhcp","セキュリティ","concept"],"date":"2026-09-14","updated":"2026-09-14","records":[{"id":"rev_0bc66ed823","at":"2026-09-14","actor":{"kind":"ai","id":"claude-fable-5","label":"AI (claude-fable-5)"},"version":1,"kind":"ai-check","scope":{},"text":"出典 5 件を WebFetch で取得して確認した。ポート番号 67 と 68 の使い分け、Request を全員あてで出す理由、返事が全員あてか 1 対 1 かが BROADCAST フラグで決まることは RFC 2131 §3.1・§4.1 で確認した。リレーが giaddr に受けたインターフェースの IP アドレスを書くことと 1 対 1 で送ることは Cisco の DHCP リレーエージェントの記述で確認した。非信頼のインターフェースでサーバ側のメッセージを止めること、表に載る項目、上流を信頼にすることは Cisco のスヌーピングの文書で確認した。スヌーピングが既定で無効・インターフェースが既定で非信頼であることは Catalyst 2960 構成ガイドの既定値の表で確認した。DAI がスヌーピングの表を照合先にすることは同ガイドの DAI の章で確認した。リレーの送信元 IP アドレス、helper-address が中継する UDP のポート番号の一覧、貸出時間の更新、RFC 1542 の本文は確認しておらず未検証として本文に明記した。スヌーピングと DAI は実機で見ていないことも明記した。校正チェックリストを全項目回し、図の『口』を本文では物理ポートとインターフェースに書き分け、ポート番号は UDP の番号にだけ使った。守秘検査（人名、社名、会場名、地名、連絡先の機械検査）で該当なし","status":"open","source":"frontmatter"},{"id":"rev_187ce1e6ca","at":"2026-09-14","actor":{"kind":"ai","id":"claude-fable-5","label":"AI (claude-fable-5)"},"version":1,"kind":"edit","scope":{},"text":"公開前の校閲。「この 17 本目」は連載の通し数（この記事は 21 本目）とずれる自己参照なので「図 17」に直した。関連を、図 8〜16 と同じ形（連載の入口・前の記事・次の記事・関連記事に /notes/ のパスを添える）に揃えた。全員あての Offer と Ack を MAC アドレスまで全員あてで描く点と BROADCAST フラグの断りは RFC 2131 §4.1 の記述と一致しているので、そのままにした。","status":"open","source":"frontmatter"}],"blocks":[{"id":"blk_cdfd40","type":"paragraph","markdown":"図 2 の PC-A も図 5 の PC-A も、自分の IP アドレスをすでに持っているところから始まっていました。その値がどこから来たのかは、まだ埋めていません。","text":"図 2 の PC-A も図 5 の PC-A も、自分の IP アドレスをすでに持っているところから始まっていました。その値がどこから来たのかは、まだ埋めていません。","line":2,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_fd3df9","type":"paragraph","markdown":"図 17 でそこを埋めます。同時に、住所を配るために使う全員あてが、偽のサーバにも答える隙を与えることを見ます。","text":"図 17 でそこを埋めます。同時に、住所を配るために使う全員あてが、偽のサーバにも答える隙を与えることを見ます。","line":4,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1d5028","type":"paragraph","markdown":"この連載は、ネットワークの言葉をもの（物理と論理）、結びつき（手動、自動、固定）、通信フロー（1 本の通信がこれらを順に通る流れ）の 3 層に置いています。ここで増えるのは、もの 2 つと、人が決める結びつき 2 つです。","text":"この連載は、ネットワークの言葉をもの（物理と論理）、結びつき（手動、自動、固定）、通信フロー（1 本の通信がこれらを順に通る流れ）の 3 層に置いています。ここで増えるのは、もの 2 つと、人が決める結びつき 2 つです。","line":6,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_34ba84","type":"heading","depth":2,"markdown":"## 登場するもの","text":"登場するもの","line":8,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ed2555","type":"heading","depth":4,"markdown":"#### 貸出の台帳","text":"貸出の台帳","line":10,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_44967f","type":"paragraph","markdown":"DHCP サーバが持つ論理のものです。どの範囲（プール）から配るか、どの MAC アドレスにどの IP アドレスを貸したか、残り時間を持ちます。","text":"DHCP サーバが持つ論理のものです。どの範囲（プール）から配るか、どの MAC アドレスにどの IP アドレスを貸したか、残り時間を持ちます。","line":12,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_e4d725","type":"heading","depth":4,"markdown":"#### DHCP スヌーピングの表","text":"DHCP スヌーピングの表","line":14,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_d37ce6","type":"paragraph","markdown":"スイッチが持つ論理のものです。MAC アドレス、IP アドレス、物理ポート、VLAN 番号、貸出の残り時間が載ります。通信を見て自動で育ちます。","text":"スイッチが持つ論理のものです。MAC アドレス、IP アドレス、物理ポート、VLAN 番号、貸出の残り時間が載ります。通信を見て自動で育ちます。","line":16,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_feddf1","type":"heading","depth":4,"markdown":"#### 信頼する物理ポートの印","text":"信頼する物理ポートの印","line":18,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_691d27","type":"paragraph","markdown":"スイッチの物理ポートに人が付ける論理の印です。スヌーピングそのものが既定で無効で、有効にしたあとも物理ポートは既定で非信頼です。","text":"スイッチの物理ポートに人が付ける論理の印です。スヌーピングそのものが既定で無効で、有効にしたあとも物理ポートは既定で非信頼です。","line":20,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_e95c92","type":"heading","depth":4,"markdown":"#### ip helper-address","text":"ip helper-address","line":22,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_9fb07b","type":"paragraph","markdown":"ルータのインターフェースに人が書く設定です。DHCP サーバの IP アドレスを 1 つ書きます。","text":"ルータのインターフェースに人が書く設定です。DHCP サーバの IP アドレスを 1 つ書きます。","line":24,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_118c7a","type":"heading","depth":2,"markdown":"## 結びつき","text":"結びつき","line":26,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_989fb5","type":"paragraph","markdown":"MAC アドレスと IP アドレスの対応は自動です。貸出で決まり、期限が切れると消えます。図 1〜5 では PC-A に手で 192.168.10.10 を入れていましたが、ここでは貸し出された 192.168.10.100 になります。","text":"MAC アドレスと IP アドレスの対応は自動です。貸出で決まり、期限が切れると消えます。図 1〜5 では PC-A に手で 192.168.10.10 を入れていましたが、ここでは貸し出された 192.168.10.100 になります。","line":28,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ba1372","type":"paragraph","markdown":"人が決めるのは、信頼する物理ポートと ip helper-address の 2 つだけです。表そのものは人が書きません。","text":"人が決めるのは、信頼する物理ポートと ip helper-address の 2 つだけです。表そのものは人が書きません。","line":30,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ecfae2","type":"paragraph","markdown":"偽の DHCP サーバは、この MAC アドレスと IP アドレスとデフォルトゲートウェイの結びつきを乗っ取ります。DAI（動的 ARP 検査）は、スヌーピングの表を照合先にして ARP を検査します。","text":"偽の DHCP サーバは、この MAC アドレスと IP アドレスとデフォルトゲートウェイの結びつきを乗っ取ります。DAI（動的 ARP 検査）は、スヌーピングの表を照合先にして ARP を検査します。","line":32,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_df21fc","type":"heading","depth":2,"markdown":"## 通信フロー","text":"通信フロー","line":34,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2e0a5e","type":"paragraph","markdown":"① 住所の無い PC-A が、宛先 255.255.255.255、送信元 0.0.0.0 で Discover を出します。宛先ポート番号は 67（UDP）です。","text":"① 住所の無い PC-A が、宛先 255.255.255.255、送信元 0.0.0.0 で Discover を出します。宛先ポート番号は 67（UDP）です。","line":36,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_5f32ec","type":"paragraph","markdown":"② スイッチ 1 は全員あてなので VLAN 10 の全ポートへ流します。図 2 と同じ動きで、ルータ 1 のインターフェースにも届きます。","text":"② スイッチ 1 は全員あてなので VLAN 10 の全ポートへ流します。図 2 と同じ動きで、ルータ 1 のインターフェースにも届きます。","line":38,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_488276","type":"paragraph","markdown":"③ 全員あてはルータを越えません。ip helper-address を書いたインターフェースでは、ルータが外側の IP と UDP を作り直し、サーバあての 1 対 1 のパケットにして送ります。","text":"③ 全員あてはルータを越えません。ip helper-address を書いたインターフェースでは、ルータが外側の IP と UDP を作り直し、サーバあての 1 対 1 のパケットにして送ります。","line":40,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ed4b2f","type":"paragraph","markdown":"④ ルータ 1 は DHCP のメッセージの中の giaddr に、受けたインターフェースの IP アドレスを書きます。サーバはそれを見てどのプールから配るかを決め、giaddr あてに Offer を返します。","text":"④ ルータ 1 は DHCP のメッセージの中の giaddr に、受けたインターフェースの IP アドレスを書きます。サーバはそれを見てどのプールから配るかを決め、giaddr あてに Offer を返します。","line":42,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_f8c149","type":"paragraph","markdown":"⑤ PC-A は Request を全員あてで出します。選ばなかったサーバにも「使わない」が伝わるからです。サーバの Ack で住所が決まります。ここまでで 4 つのメッセージ、2 往復です。端末は自分側のポート番号 68 を使い、サーバとリレーはポート番号 67 を使います。","text":"⑤ PC-A は Request を全員あてで出します。選ばなかったサーバにも「使わない」が伝わるからです。サーバの Ack で住所が決まります。ここまでで 4 つのメッセージ、2 往復です。端末は自分側のポート番号 68 を使い、サーバとリレーはポート番号 67 を使います。","line":44,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_2a4a99","type":"paragraph","markdown":"⑥ スイッチ 1 は通り道でこれを見ています。信頼する物理ポートから来た Offer と Ack だけを通し、決まった対応を表に書きます。その表と照らして合わない ARP を捨てるのが DAI です。","text":"⑥ スイッチ 1 は通り道でこれを見ています。信頼する物理ポートから来た Offer と Ack だけを通し、決まった対応を表に書きます。その表と照らして合わない ARP を捨てるのが DAI です。","line":46,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_0d5622","type":"paragraph","markdown":"リレーがやっているのは、包み直しではありません。DHCP のメッセージはそのままに、外側の IP と UDP を作り直して giaddr を足し、hops を 1 増やして 1 対 1 で送るだけです。別のパケットの中に入れる話は図 10 で出てきます。","text":"リレーがやっているのは、包み直しではありません。DHCP のメッセージはそのままに、外側の IP と UDP を作り直して giaddr を足し、hops を 1 増やして 1 対 1 で送るだけです。別のパケットの中に入れる話は図 10 で出てきます。","line":48,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_a9ac56","type":"paragraph","markdown":"偽の DHCP サーバが非信頼の物理ポートから Offer を返しても、スヌーピングが有効ならそこで捨てられ、どの表にも載りません。","text":"偽の DHCP サーバが非信頼の物理ポートから Offer を返しても、スヌーピングが有効ならそこで捨てられ、どの表にも載りません。","line":50,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_66faae","type":"heading","depth":2,"markdown":"## 図 17","text":"図 17","line":52,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_5542cb","type":"paragraph","markdown":"上が構成図、その下が 4 つのメッセージの並び、さらに下に守りの 2 つが並びます。いちばん下は各表の推移と、通信の中身の推移です。","text":"上が構成図、その下が 4 つのメッセージの並び、さらに下に守りの 2 つが並びます。いちばん下は各表の推移と、通信の中身の推移です。","line":54,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_ad9840","type":"html","markdown":"<svg viewBox=\"0 0 900 1866\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"DHCP の 4 つのメッセージ、リレー、DHCP スヌーピングと DAI\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1866\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" text-anchor=\"start\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">DHCP：住所を配る仕組みと、配り口を守る仕組み</text>\n  <text x=\"20\" y=\"50\" text-anchor=\"start\" font-size=\"11\" fill=\"#6b7280\">住所をもらう前の端末は、自分の住所も相手の住所も知らない。だから最初は「全員あて」で聞く。その同じ「全員あて」が、偽のサーバにも答える隙を与える</text>\n  <text x=\"20\" y=\"92\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">VLAN 10（192.168.10.0/24）</text>\n  <text x=\"620\" y=\"92\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">データセンター（192.168.3.0/24）</text>\n  <rect x=\"20\" y=\"160\" width=\"105\" height=\"64\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"72.5\" y=\"180\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"72.5\" y=\"198\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">住所はまだ無い</text>\n  <text x=\"72.5\" y=\"213\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">（0.0.0.0）</text>\n  <line x1=\"125\" y1=\"192\" x2=\"166\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"175\" y=\"140\" width=\"160\" height=\"104\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"255.0\" y=\"160\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1</text>\n  <text x=\"255.0\" y=\"178\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">VLAN 10</text>\n  <text x=\"255.0\" y=\"193\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">口 1 ＝ 非信頼の口</text>\n  <text x=\"255.0\" y=\"208\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">口 8 ＝ 信頼する口</text>\n  <rect x=\"166\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"175\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">口1</text>\n  <rect x=\"326\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"335\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">口8</text>\n  <line x1=\"344\" y1=\"192\" x2=\"386\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"395\" y=\"140\" width=\"165\" height=\"104\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"477.5\" y=\"160\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1</text>\n  <text x=\"477.5\" y=\"178\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0 192.168.10.1</text>\n  <text x=\"477.5\" y=\"193\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1 192.168.3.1</text>\n  <text x=\"477.5\" y=\"208\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">ip helper-address</text>\n  <text x=\"477.5\" y=\"223\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">192.168.3.200（手動）</text>\n  <rect x=\"386\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"395\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">Gi0</text>\n  <rect x=\"551\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"560\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">Gi1</text>\n  <line x1=\"569\" y1=\"192\" x2=\"700\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"700\" y=\"160\" width=\"180\" height=\"64\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"790.0\" y=\"180\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">DHCP サーバ</text>\n  <text x=\"790.0\" y=\"198\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">192.168.3.200</text>\n  <text x=\"790.0\" y=\"213\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">VLAN 10 用のプールを持つ</text>\n  <text x=\"477\" y=\"262\" text-anchor=\"middle\" font-size=\"10\" fill=\"#b45309\">全員あては、ここを越えない</text>\n  <text x=\"477\" y=\"277\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">ip helper-address があると、1 対 1 に直して送る</text>\n  <text x=\"20\" y=\"308\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">やり取りの並び（4 つのメッセージ＝2 往復）</text>\n  <text x=\"72\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">PC-A</text>\n  <line x1=\"72\" y1=\"338\" x2=\"72\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"255\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">スイッチ 1</text>\n  <line x1=\"255\" y1=\"338\" x2=\"255\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"477\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">ルータ 1</text>\n  <line x1=\"477\" y1=\"338\" x2=\"477\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"790\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">DHCP サーバ</text>\n  <line x1=\"790\" y1=\"338\" x2=\"790\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <line x1=\"78\" y1=\"360\" x2=\"462\" y2=\"360\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"461,355 461,365 470,360\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">① Discover（全員あて）</text>\n  <circle cx=\"120\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"120\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <circle cx=\"255\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"255\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <line x1=\"484\" y1=\"360\" x2=\"776\" y2=\"360\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"775,355 775,365 784,360\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">③ 1 対 1 に直してサーバへ</text>\n  <circle cx=\"560\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"560\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">3</text>\n  <line x1=\"470\" y1=\"400\" x2=\"86\" y2=\"400\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"87,395 87,405 78,400\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"388\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">ルータ 1 → PC-A</text>\n  <line x1=\"784\" y1=\"400\" x2=\"492\" y2=\"400\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"493,395 493,405 484,400\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"388\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">④ Offer（giaddr あてに返る）</text>\n  <circle cx=\"634\" cy=\"400\" r=\"9\" fill=\"#0a7aff\"/><text x=\"634\" y=\"404\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <line x1=\"78\" y1=\"440\" x2=\"462\" y2=\"440\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"461,435 461,445 470,440\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"428\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">⑤ Request（全員あて）</text>\n  <circle cx=\"160\" cy=\"440\" r=\"9\" fill=\"#0a7aff\"/><text x=\"160\" y=\"444\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">5</text>\n  <line x1=\"484\" y1=\"440\" x2=\"776\" y2=\"440\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"775,435 775,445 784,440\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"428\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">同じくリレーを通る</text>\n  <line x1=\"470\" y1=\"480\" x2=\"86\" y2=\"480\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"87,475 87,485 78,480\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"468\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">ルータ 1 → PC-A。ここで住所が決まる</text>\n  <line x1=\"784\" y1=\"480\" x2=\"492\" y2=\"480\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"493,475 493,485 484,480\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"468\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">Ack</text>\n  <text x=\"20\" y=\"534\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">Offer と Ack が全員あてで返るか 1 対 1 で返るかは、端末が立てる印（BROADCAST フラグ）で決まる（RFC 2131 §4.1）</text>\n  <text x=\"20\" y=\"550\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">全員あてなら宛先 MAC も全員あて、1 対 1 なら宛先 MAC は端末・宛先 IP は配る住所になる（下の帯の ④ は全員あての場合）</text>\n  <rect x=\"20\" y=\"562\" width=\"425\" height=\"118\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"32\" y=\"582\" text-anchor=\"start\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">⑥ 守り 1：DHCP スヌーピング</text>\n  <text x=\"32\" y=\"600\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">信頼する口（上流）から来た Offer・Ack だけを通す</text>\n  <text x=\"32\" y=\"615\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">非信頼の口（PC 側）から来た Offer は捨てる</text>\n  <text x=\"32\" y=\"630\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">　＝偽の DHCP サーバを止める</text>\n  <text x=\"32\" y=\"645\" text-anchor=\"start\" font-size=\"10\" fill=\"#0a7aff\">通り道で Ack を読み、MAC・IP・口・VLAN・残り時間の表を作る</text>\n  <rect x=\"455\" y=\"562\" width=\"425\" height=\"118\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"467\" y=\"582\" text-anchor=\"start\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">⑥ 守り 2：DAI（動的 ARP 検査）</text>\n  <text x=\"467\" y=\"600\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">非信頼の口に来た ARP を、左の表と照らして検査する</text>\n  <text x=\"467\" y=\"615\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">口・MAC・IP の対応が表と合わない ARP は捨てる</text>\n  <text x=\"467\" y=\"630\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">　＝偽の ARP 応答を止める</text>\n  <text x=\"467\" y=\"645\" text-anchor=\"start\" font-size=\"10\" fill=\"#0a7aff\">図 2 の ARP は受け取った側も覚えるので、嘘は表を汚す</text>\n  <text x=\"20\" y=\"710\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">フロー</text>\n  <text x=\"20\" y=\"730\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">① 住所の無い PC-A は、宛先 255.255.255.255（全員あて）・送信元 0.0.0.0 で Discover を出す。宛先ポート番号は 67（UDP）</text>\n  <text x=\"20\" y=\"748\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">② スイッチ 1 は全員あてなので VLAN 10 の全ポートへ流す（図 2 と同じ）。ルータ 1 の口にも届く</text>\n  <text x=\"20\" y=\"766\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">③ 全員あてはルータを越えない。ip helper-address（手動）を書いた口では、ルータが外側の IP・UDP を作り直し、サーバあての 1 対 1 のパケットにして送る</text>\n  <text x=\"20\" y=\"784\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">④ ルータ 1 は DHCP のメッセージの中の giaddr に、受けた口の IP を書く。サーバはそれを見てどのプールから配るかを決め、giaddr あてに Offer を返す</text>\n  <text x=\"20\" y=\"802\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">⑤ PC-A は Request を全員あてで出す（選ばなかったサーバにも「使わない」が伝わる）。サーバの Ack で住所が決まる</text>\n  <text x=\"20\" y=\"820\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">⑥ スイッチ 1 は通り道でこれを見ている。信頼する口から来た Offer・Ack だけを通し、決まった対応を表に書く。その表と照らして偽の ARP を捨てるのが DAI</text>\n  <text x=\"20\" y=\"848\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">3 層で見ると</text>\n  <text x=\"20\" y=\"868\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">もの：貸出の台帳（論理・サーバが持つ）／スヌーピングの表（論理・スイッチが持つ）／口ごとの「信頼する」の印（論理）</text>\n  <text x=\"20\" y=\"886\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">結びつき：MAC ⇄ IP は自動（貸出で決まり、期限が切れると消える）。信頼する口の印と ip helper-address は手動</text>\n  <text x=\"20\" y=\"904\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">フロー：図 2 の「全員あて」がそのまま使われる。越えられないルータの区間だけリレーが肩代わりし、通り道のスイッチが表を育てる</text>\n  <text x=\"20\" y=\"922\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">ポートセキュリティ（口に MAC を覚えさせて 1 台だけ許す）も同じ「口を守る」だが、許す相手を人が決め打ちする。サーバに聞いて決める方法は図 18</text>\n<line x1=\"20\" y1=\"938\" x2=\"880\" y2=\"938\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"960\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n  <rect x=\"20\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: MAC アドレステーブル（VLAN 10）</text>\n  <text x=\"30\" y=\"1004\" font-size=\"10\" fill=\"#0a7aff\">① 追加: MAC A → 口 1（Discover が入った時）</text>\n  <text x=\"30\" y=\"1019\" font-size=\"10\" fill=\"#0a7aff\">④ 追加: MAC R1-Gi0 → 口 8（Offer が入った時）</text>\n  <rect x=\"310\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: DHCP スヌーピングの表</text>\n  <text x=\"320\" y=\"1004\" font-size=\"10\" fill=\"#0a7aff\">⑤ 追加: MAC A・192.168.10.100・口 1・VLAN 10</text>\n  <text x=\"320\" y=\"1019\" font-size=\"10\" fill=\"#374151\">　＋貸出の残り時間（Ack を読んで自動で書く）</text>\n  <rect x=\"600\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1: ルーティングテーブル</text>\n  <text x=\"610\" y=\"1004\" font-size=\"10\" fill=\"#374151\">192.168.10.0/24 → Gi0（自動）</text>\n  <text x=\"610\" y=\"1019\" font-size=\"10\" fill=\"#374151\">192.168.3.0/24 → Gi1（自動）</text>\n  <rect x=\"20\" y=\"1042\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">DHCP サーバ: 貸出の台帳</text>\n  <text x=\"30\" y=\"1074\" font-size=\"10\" fill=\"#0a7aff\">④ 仮押さえ: 192.168.10.100 を MAC A へ</text>\n  <text x=\"30\" y=\"1089\" font-size=\"10\" fill=\"#0a7aff\">⑤ Ack で確定。どのプールかは giaddr で決める</text>\n  <rect x=\"310\" y=\"1042\" width=\"280\" height=\"90\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: 自分の設定（もらった結果）</text>\n  <text x=\"320\" y=\"1074\" font-size=\"10\" fill=\"#374151\">前: 何も無い（0.0.0.0）</text>\n  <text x=\"320\" y=\"1089\" font-size=\"10\" fill=\"#0a7aff\">⑤ 後: 貸し出された 192.168.10.100 が入る</text>\n  <text x=\"320\" y=\"1104\" font-size=\"10\" fill=\"#374151\">　（マスク・GW・DNS も一緒に届く）</text>\n  <text x=\"320\" y=\"1119\" font-size=\"10\" fill=\"#374151\">図 1〜7 では手で 192.168.10.10 を入れていた</text>\n  <rect x=\"600\" y=\"1042\" width=\"280\" height=\"75\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: 人が手で決めたこと</text>\n  <text x=\"610\" y=\"1074\" font-size=\"10\" fill=\"#374151\">スヌーピングを有効にする（既定は無効）</text>\n  <text x=\"610\" y=\"1089\" font-size=\"10\" fill=\"#374151\">口 8 ＝ 信頼する（既定は非信頼）</text>\n  <text x=\"610\" y=\"1104\" font-size=\"10\" fill=\"#374151\">表は手で書かない。通信を見て育つ</text>\n<text x=\"20\" y=\"1182\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"1232\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① PC-A → 全員あて：Discover</text>\n  <rect x=\"20\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">0.0.0.0</text>\n  <rect x=\"492\" y=\"1238\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1238\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Discover</text>\n  <line x1=\"20\" y1=\"1282\" x2=\"842\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"1278\" x2=\"20\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"842\" y1=\"1278\" x2=\"842\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"431.0\" y=\"1295\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"1224\" x2=\"842\" y2=\"1224\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"1224\" x2=\"256\" y2=\"1228\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"842\" y1=\"1224\" x2=\"842\" y2=\"1228\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"549.0\" y=\"1220\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"1328\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ ルータ 1 → サーバ：リレーが直したパケット（DHCP の中身は同じ）</text>\n  <rect x=\"20\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC SRV</text>\n  <rect x=\"138\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"256\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.200</text>\n  <rect x=\"374\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1 の IP</text>\n  <rect x=\"492\" y=\"1334\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1334\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Discover（giaddr 192.168.10.1）</text>\n<text x=\"20\" y=\"1380\" font-size=\"10\" fill=\"#6b7280\">全員あてが 1 対 1 になった。包み直した（中に入れた）のではなく、DHCP のメッセージはそのままに、外側の IP・UDP を作り直して giaddr を足しただけ。入れ子にする話は図 10</text>\n  <text x=\"20\" y=\"1398\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ サーバ → ルータ 1：Offer（giaddr あて）</text>\n  <rect x=\"20\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"138\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC SRV</text>\n  <rect x=\"256\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.1</text>\n  <rect x=\"374\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.200</text>\n  <rect x=\"492\" y=\"1404\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1404\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer（配る住所 192.168.10.100）</text>\n  <text x=\"20\" y=\"1458\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ ルータ 1 → PC-A：Offer を VLAN 10 側へ（全員あてで返す場合）</text>\n  <rect x=\"20\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"256\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.1</text>\n  <rect x=\"492\" y=\"1464\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">68</text>\n  <rect x=\"632\" y=\"1464\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer</text>\n  <text x=\"20\" y=\"1518\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑤ Request と Ack</text>\n  <text x=\"20\" y=\"1538\" font-size=\"10\" fill=\"#6b7280\">並びは ①③④ と同じ。Request を全員あてで出すので、選ばれなかったサーバにも「使わない」が伝わる。Ack で住所が確定する</text>\n  <text x=\"20\" y=\"1562\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑥ 偽の DHCP サーバが非信頼の口から返した Offer</text>\n  <rect x=\"20\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC 偽サーバ</text>\n  <rect x=\"256\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.50</text>\n  <rect x=\"492\" y=\"1568\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">68</text>\n  <rect x=\"632\" y=\"1568\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer（GW を自分にする）</text>\n<text x=\"20\" y=\"1614\" font-size=\"10\" fill=\"#6b7280\">スヌーピングが有効な口は既定で非信頼。ここから来た Offer・Ack は捨てられるので、この行はどの表にも載らない</text>\n<text x=\"20\" y=\"1632\" font-size=\"10\" fill=\"#6b7280\">端末は自分側のポート番号 68 を使い、サーバとリレーはポート番号 67 を使う（RFC 2131 §4.1）</text>\n<text x=\"20\" y=\"1648\" font-size=\"10\" fill=\"#6b7280\">リレーは giaddr を書くほかに、通ったリレーの数を数える hops も 1 増やす（RFC 2131 §4.1）</text>\n<text x=\"20\" y=\"1664\" font-size=\"10\" fill=\"#6b7280\">出典（4 つのメッセージ・ポート番号 67/68・giaddr・Request を全員あてで出す理由）: RFC 2131 §3.1・§4.1</text>\n<text x=\"20\" y=\"1680\" font-size=\"10\" fill=\"#6b7280\">　https://www.rfc-editor.org/rfc/rfc2131.html</text>\n<text x=\"20\" y=\"1696\" font-size=\"10\" fill=\"#6b7280\">出典（リレー：ip helper-address・giaddr に受けた口の IP を書く・サーバへは 1 対 1 で送る）: Cisco</text>\n<text x=\"20\" y=\"1712\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-s/dhcp-15-s-book/dhcp-relay-agent.html</text>\n<text x=\"20\" y=\"1728\" font-size=\"10\" fill=\"#6b7280\">出典（DHCP スヌーピング：非信頼の口では Offer・Ack を止める／表に載る中身／上流の口を信頼にする）: Cisco</text>\n<text x=\"20\" y=\"1744\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/support/docs/ip/dynamic-host-configuration-protocol-dhcp-dhcpv6/217055-operate-and-troubleshoot-dhcp-snooping.html</text>\n<text x=\"20\" y=\"1760\" font-size=\"10\" fill=\"#6b7280\">出典（スヌーピングは既定で無効。有効にしたあとも、口の信頼は既定で「非信頼」）: Cisco</text>\n<text x=\"20\" y=\"1776\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdhcp82.html</text>\n<text x=\"20\" y=\"1792\" font-size=\"10\" fill=\"#6b7280\">出典（DAI：スヌーピングの表で ARP を検査し、合わない ARP は記録して捨てる）: Cisco</text>\n<text x=\"20\" y=\"1808\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdynarp.html</text>\n<text x=\"20\" y=\"1824\" font-size=\"10\" fill=\"#6b7280\">未検証: リレーが送信元 IP にどちらの口の IP を使うかは機器・設定によるため「ルータ 1 の IP」とだけ書いた（giaddr が受けた口の IP であることは Cisco 公式で確認）</text>\n<text x=\"20\" y=\"1840\" font-size=\"10\" fill=\"#6b7280\">未検証: スヌーピングの表と DAI の動きは実機で見ていない（勉強会で実機で触ったのはポートセキュリティと認証まで）</text>\n</svg>\n## 図 2・図 3・図 5 との接続","text":"<svg viewBox=\"0 0 900 1866\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"DHCP の 4 つのメッセージ、リレー、DHCP スヌーピングと DAI\" style=\"max-width:100%;height:auto;font-family:sans-serif\">\n  <rect x=\"0\" y=\"0\" width=\"900\" height=\"1866\" fill=\"#fbfcfe\"/>\n  <text x=\"20\" y=\"30\" text-anchor=\"start\" font-size=\"14\" font-weight=\"700\" fill=\"#1f2937\">DHCP：住所を配る仕組みと、配り口を守る仕組み</text>\n  <text x=\"20\" y=\"50\" text-anchor=\"start\" font-size=\"11\" fill=\"#6b7280\">住所をもらう前の端末は、自分の住所も相手の住所も知らない。だから最初は「全員あて」で聞く。その同じ「全員あて」が、偽のサーバにも答える隙を与える</text>\n  <text x=\"20\" y=\"92\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">VLAN 10（192.168.10.0/24）</text>\n  <text x=\"620\" y=\"92\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">データセンター（192.168.3.0/24）</text>\n  <rect x=\"20\" y=\"160\" width=\"105\" height=\"64\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"72.5\" y=\"180\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">PC-A</text>\n  <text x=\"72.5\" y=\"198\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">住所はまだ無い</text>\n  <text x=\"72.5\" y=\"213\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">（0.0.0.0）</text>\n  <line x1=\"125\" y1=\"192\" x2=\"166\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"175\" y=\"140\" width=\"160\" height=\"104\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"255.0\" y=\"160\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1</text>\n  <text x=\"255.0\" y=\"178\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">VLAN 10</text>\n  <text x=\"255.0\" y=\"193\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">口 1 ＝ 非信頼の口</text>\n  <text x=\"255.0\" y=\"208\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">口 8 ＝ 信頼する口</text>\n  <rect x=\"166\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"175\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">口1</text>\n  <rect x=\"326\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"335\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">口8</text>\n  <line x1=\"344\" y1=\"192\" x2=\"386\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"395\" y=\"140\" width=\"165\" height=\"104\" rx=\"8\" fill=\"#f2f5f9\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"477.5\" y=\"160\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1</text>\n  <text x=\"477.5\" y=\"178\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi0 192.168.10.1</text>\n  <text x=\"477.5\" y=\"193\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">Gi1 192.168.3.1</text>\n  <text x=\"477.5\" y=\"208\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">ip helper-address</text>\n  <text x=\"477.5\" y=\"223\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">192.168.3.200（手動）</text>\n  <rect x=\"386\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"395\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">Gi0</text>\n  <rect x=\"551\" y=\"183\" width=\"18\" height=\"18\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1.5\"/><text x=\"560\" y=\"196\" text-anchor=\"middle\" font-size=\"8\" fill=\"#1f2937\">Gi1</text>\n  <line x1=\"569\" y1=\"192\" x2=\"700\" y2=\"192\" stroke=\"#374151\" stroke-width=\"2\"/>\n  <rect x=\"700\" y=\"160\" width=\"180\" height=\"64\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"790.0\" y=\"180\" text-anchor=\"middle\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">DHCP サーバ</text>\n  <text x=\"790.0\" y=\"198\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">192.168.3.200</text>\n  <text x=\"790.0\" y=\"213\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">VLAN 10 用のプールを持つ</text>\n  <text x=\"477\" y=\"262\" text-anchor=\"middle\" font-size=\"10\" fill=\"#b45309\">全員あては、ここを越えない</text>\n  <text x=\"477\" y=\"277\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">ip helper-address があると、1 対 1 に直して送る</text>\n  <text x=\"20\" y=\"308\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">やり取りの並び（4 つのメッセージ＝2 往復）</text>\n  <text x=\"72\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">PC-A</text>\n  <line x1=\"72\" y1=\"338\" x2=\"72\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"255\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">スイッチ 1</text>\n  <line x1=\"255\" y1=\"338\" x2=\"255\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"477\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">ルータ 1</text>\n  <line x1=\"477\" y1=\"338\" x2=\"477\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <text x=\"790\" y=\"330\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#6b7280\">DHCP サーバ</text>\n  <line x1=\"790\" y1=\"338\" x2=\"790\" y2=\"520\" stroke=\"#9aa7b5\" stroke-width=\"1\" stroke-dasharray=\"4 4\"/>\n  <line x1=\"78\" y1=\"360\" x2=\"462\" y2=\"360\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"461,355 461,365 470,360\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">① Discover（全員あて）</text>\n  <circle cx=\"120\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"120\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">1</text>\n  <circle cx=\"255\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"255\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">2</text>\n  <line x1=\"484\" y1=\"360\" x2=\"776\" y2=\"360\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"775,355 775,365 784,360\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">③ 1 対 1 に直してサーバへ</text>\n  <circle cx=\"560\" cy=\"360\" r=\"9\" fill=\"#0a7aff\"/><text x=\"560\" y=\"364\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">3</text>\n  <line x1=\"470\" y1=\"400\" x2=\"86\" y2=\"400\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"87,395 87,405 78,400\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"388\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">ルータ 1 → PC-A</text>\n  <line x1=\"784\" y1=\"400\" x2=\"492\" y2=\"400\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"493,395 493,405 484,400\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"388\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">④ Offer（giaddr あてに返る）</text>\n  <circle cx=\"634\" cy=\"400\" r=\"9\" fill=\"#0a7aff\"/><text x=\"634\" y=\"404\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">4</text>\n  <line x1=\"78\" y1=\"440\" x2=\"462\" y2=\"440\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"461,435 461,445 470,440\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"428\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">⑤ Request（全員あて）</text>\n  <circle cx=\"160\" cy=\"440\" r=\"9\" fill=\"#0a7aff\"/><text x=\"160\" y=\"444\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#ffffff\">5</text>\n  <line x1=\"484\" y1=\"440\" x2=\"776\" y2=\"440\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"775,435 775,445 784,440\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"428\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">同じくリレーを通る</text>\n  <line x1=\"470\" y1=\"480\" x2=\"86\" y2=\"480\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"87,475 87,485 78,480\" fill=\"#0a7aff\"/>\n  <text x=\"274\" y=\"468\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">ルータ 1 → PC-A。ここで住所が決まる</text>\n  <line x1=\"784\" y1=\"480\" x2=\"492\" y2=\"480\" stroke=\"#0a7aff\" stroke-width=\"2\"/><polygon points=\"493,475 493,485 484,480\" fill=\"#0a7aff\"/>\n  <text x=\"634\" y=\"468\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">Ack</text>\n  <text x=\"20\" y=\"534\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">Offer と Ack が全員あてで返るか 1 対 1 で返るかは、端末が立てる印（BROADCAST フラグ）で決まる（RFC 2131 §4.1）</text>\n  <text x=\"20\" y=\"550\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">全員あてなら宛先 MAC も全員あて、1 対 1 なら宛先 MAC は端末・宛先 IP は配る住所になる（下の帯の ④ は全員あての場合）</text>\n  <rect x=\"20\" y=\"562\" width=\"425\" height=\"118\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"32\" y=\"582\" text-anchor=\"start\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">⑥ 守り 1：DHCP スヌーピング</text>\n  <text x=\"32\" y=\"600\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">信頼する口（上流）から来た Offer・Ack だけを通す</text>\n  <text x=\"32\" y=\"615\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">非信頼の口（PC 側）から来た Offer は捨てる</text>\n  <text x=\"32\" y=\"630\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">　＝偽の DHCP サーバを止める</text>\n  <text x=\"32\" y=\"645\" text-anchor=\"start\" font-size=\"10\" fill=\"#0a7aff\">通り道で Ack を読み、MAC・IP・口・VLAN・残り時間の表を作る</text>\n  <rect x=\"455\" y=\"562\" width=\"425\" height=\"118\" rx=\"8\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"467\" y=\"582\" text-anchor=\"start\" font-size=\"13\" font-weight=\"700\" fill=\"#1f2937\">⑥ 守り 2：DAI（動的 ARP 検査）</text>\n  <text x=\"467\" y=\"600\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">非信頼の口に来た ARP を、左の表と照らして検査する</text>\n  <text x=\"467\" y=\"615\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">口・MAC・IP の対応が表と合わない ARP は捨てる</text>\n  <text x=\"467\" y=\"630\" text-anchor=\"start\" font-size=\"10\" fill=\"#374151\">　＝偽の ARP 応答を止める</text>\n  <text x=\"467\" y=\"645\" text-anchor=\"start\" font-size=\"10\" fill=\"#0a7aff\">図 2 の ARP は受け取った側も覚えるので、嘘は表を汚す</text>\n  <text x=\"20\" y=\"710\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">フロー</text>\n  <text x=\"20\" y=\"730\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">① 住所の無い PC-A は、宛先 255.255.255.255（全員あて）・送信元 0.0.0.0 で Discover を出す。宛先ポート番号は 67（UDP）</text>\n  <text x=\"20\" y=\"748\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">② スイッチ 1 は全員あてなので VLAN 10 の全ポートへ流す（図 2 と同じ）。ルータ 1 の口にも届く</text>\n  <text x=\"20\" y=\"766\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">③ 全員あてはルータを越えない。ip helper-address（手動）を書いた口では、ルータが外側の IP・UDP を作り直し、サーバあての 1 対 1 のパケットにして送る</text>\n  <text x=\"20\" y=\"784\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">④ ルータ 1 は DHCP のメッセージの中の giaddr に、受けた口の IP を書く。サーバはそれを見てどのプールから配るかを決め、giaddr あてに Offer を返す</text>\n  <text x=\"20\" y=\"802\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">⑤ PC-A は Request を全員あてで出す（選ばなかったサーバにも「使わない」が伝わる）。サーバの Ack で住所が決まる</text>\n  <text x=\"20\" y=\"820\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">⑥ スイッチ 1 は通り道でこれを見ている。信頼する口から来た Offer・Ack だけを通し、決まった対応を表に書く。その表と照らして偽の ARP を捨てるのが DAI</text>\n  <text x=\"20\" y=\"848\" text-anchor=\"start\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">3 層で見ると</text>\n  <text x=\"20\" y=\"868\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">もの：貸出の台帳（論理・サーバが持つ）／スヌーピングの表（論理・スイッチが持つ）／口ごとの「信頼する」の印（論理）</text>\n  <text x=\"20\" y=\"886\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">結びつき：MAC ⇄ IP は自動（貸出で決まり、期限が切れると消える）。信頼する口の印と ip helper-address は手動</text>\n  <text x=\"20\" y=\"904\" text-anchor=\"start\" font-size=\"11\" fill=\"#374151\">フロー：図 2 の「全員あて」がそのまま使われる。越えられないルータの区間だけリレーが肩代わりし、通り道のスイッチが表を育てる</text>\n  <text x=\"20\" y=\"922\" text-anchor=\"start\" font-size=\"10\" fill=\"#6b7280\">ポートセキュリティ（口に MAC を覚えさせて 1 台だけ許す）も同じ「口を守る」だが、許す相手を人が決め打ちする。サーバに聞いて決める方法は図 18</text>\n<line x1=\"20\" y1=\"938\" x2=\"880\" y2=\"938\" stroke=\"#d6dde5\" stroke-width=\"1\"/>\n<text x=\"20\" y=\"960\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">各テーブルの推移（○番のフローで追加された行。青字）</text>\n  <rect x=\"20\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: MAC アドレステーブル（VLAN 10）</text>\n  <text x=\"30\" y=\"1004\" font-size=\"10\" fill=\"#0a7aff\">① 追加: MAC A → 口 1（Discover が入った時）</text>\n  <text x=\"30\" y=\"1019\" font-size=\"10\" fill=\"#0a7aff\">④ 追加: MAC R1-Gi0 → 口 8（Offer が入った時）</text>\n  <rect x=\"310\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: DHCP スヌーピングの表</text>\n  <text x=\"320\" y=\"1004\" font-size=\"10\" fill=\"#0a7aff\">⑤ 追加: MAC A・192.168.10.100・口 1・VLAN 10</text>\n  <text x=\"320\" y=\"1019\" font-size=\"10\" fill=\"#374151\">　＋貸出の残り時間（Ack を読んで自動で書く）</text>\n  <rect x=\"600\" y=\"972\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"988\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1: ルーティングテーブル</text>\n  <text x=\"610\" y=\"1004\" font-size=\"10\" fill=\"#374151\">192.168.10.0/24 → Gi0（自動）</text>\n  <text x=\"610\" y=\"1019\" font-size=\"10\" fill=\"#374151\">192.168.3.0/24 → Gi1（自動）</text>\n  <rect x=\"20\" y=\"1042\" width=\"280\" height=\"60\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"30\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">DHCP サーバ: 貸出の台帳</text>\n  <text x=\"30\" y=\"1074\" font-size=\"10\" fill=\"#0a7aff\">④ 仮押さえ: 192.168.10.100 を MAC A へ</text>\n  <text x=\"30\" y=\"1089\" font-size=\"10\" fill=\"#0a7aff\">⑤ Ack で確定。どのプールかは giaddr で決める</text>\n  <rect x=\"310\" y=\"1042\" width=\"280\" height=\"90\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"320\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">PC-A: 自分の設定（もらった結果）</text>\n  <text x=\"320\" y=\"1074\" font-size=\"10\" fill=\"#374151\">前: 何も無い（0.0.0.0）</text>\n  <text x=\"320\" y=\"1089\" font-size=\"10\" fill=\"#0a7aff\">⑤ 後: 貸し出された 192.168.10.100 が入る</text>\n  <text x=\"320\" y=\"1104\" font-size=\"10\" fill=\"#374151\">　（マスク・GW・DNS も一緒に届く）</text>\n  <text x=\"320\" y=\"1119\" font-size=\"10\" fill=\"#374151\">図 1〜7 では手で 192.168.10.10 を入れていた</text>\n  <rect x=\"600\" y=\"1042\" width=\"280\" height=\"75\" rx=\"6\" fill=\"#ffffff\" stroke=\"#b9c4d0\" stroke-width=\"1.5\"/>\n  <text x=\"610\" y=\"1058\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">スイッチ 1: 人が手で決めたこと</text>\n  <text x=\"610\" y=\"1074\" font-size=\"10\" fill=\"#374151\">スヌーピングを有効にする（既定は無効）</text>\n  <text x=\"610\" y=\"1089\" font-size=\"10\" fill=\"#374151\">口 8 ＝ 信頼する（既定は非信頼）</text>\n  <text x=\"610\" y=\"1104\" font-size=\"10\" fill=\"#374151\">表は手で書かない。通信を見て育つ</text>\n<text x=\"20\" y=\"1182\" font-size=\"12\" font-weight=\"700\" fill=\"#1f2937\">通信の中身の推移（フローごとのフレーム／パケット）</text>\n  <text x=\"20\" y=\"1232\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">① PC-A → 全員あて：Discover</text>\n  <rect x=\"20\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC A</text>\n  <rect x=\"256\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1238\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">0.0.0.0</text>\n  <rect x=\"492\" y=\"1238\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1238\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1252\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1267\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Discover</text>\n  <line x1=\"20\" y1=\"1282\" x2=\"842\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"20\" y1=\"1278\" x2=\"20\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/><line x1=\"842\" y1=\"1278\" x2=\"842\" y2=\"1282\" stroke=\"#374151\" stroke-width=\"1.5\"/>\n  <text x=\"431.0\" y=\"1295\" text-anchor=\"middle\" font-size=\"10\" fill=\"#374151\">フレーム＝全部。ただしスイッチが見るのは MAC とタグの部分だけ</text>\n  <line x1=\"256\" y1=\"1224\" x2=\"842\" y2=\"1224\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"256\" y1=\"1224\" x2=\"256\" y2=\"1228\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/><line x1=\"842\" y1=\"1224\" x2=\"842\" y2=\"1228\" stroke=\"#0a7aff\" stroke-width=\"1.5\"/>\n  <text x=\"549.0\" y=\"1220\" text-anchor=\"middle\" font-size=\"10\" fill=\"#0a7aff\">パケット＝この部分。ルータはここ（IP）を見る</text>\n  <text x=\"20\" y=\"1328\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">③ ルータ 1 → サーバ：リレーが直したパケット（DHCP の中身は同じ）</text>\n  <rect x=\"20\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC SRV</text>\n  <rect x=\"138\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"256\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.200</text>\n  <rect x=\"374\" y=\"1334\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ルータ 1 の IP</text>\n  <rect x=\"492\" y=\"1334\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1334\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1348\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1363\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Discover（giaddr 192.168.10.1）</text>\n<text x=\"20\" y=\"1380\" font-size=\"10\" fill=\"#6b7280\">全員あてが 1 対 1 になった。包み直した（中に入れた）のではなく、DHCP のメッセージはそのままに、外側の IP・UDP を作り直して giaddr を足しただけ。入れ子にする話は図 10</text>\n  <text x=\"20\" y=\"1398\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ サーバ → ルータ 1：Offer（giaddr あて）</text>\n  <rect x=\"20\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi1</text>\n  <rect x=\"138\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC SRV</text>\n  <rect x=\"256\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.1</text>\n  <rect x=\"374\" y=\"1404\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.3.200</text>\n  <rect x=\"492\" y=\"1404\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">67</text>\n  <rect x=\"632\" y=\"1404\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1418\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1433\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer（配る住所 192.168.10.100）</text>\n  <text x=\"20\" y=\"1458\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">④ ルータ 1 → PC-A：Offer を VLAN 10 側へ（全員あてで返す場合）</text>\n  <rect x=\"20\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC R1-Gi0</text>\n  <rect x=\"256\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1464\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.1</text>\n  <rect x=\"492\" y=\"1464\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">68</text>\n  <rect x=\"632\" y=\"1464\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1478\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1493\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer</text>\n  <text x=\"20\" y=\"1518\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑤ Request と Ack</text>\n  <text x=\"20\" y=\"1538\" font-size=\"10\" fill=\"#6b7280\">並びは ①③④ と同じ。Request を全員あてで出すので、選ばれなかったサーバにも「使わない」が伝わる。Ack で住所が確定する</text>\n  <text x=\"20\" y=\"1562\" font-size=\"11\" font-weight=\"700\" fill=\"#1f2937\">⑥ 偽の DHCP サーバが非信頼の口から返した Offer</text>\n  <rect x=\"20\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"79.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 MAC</text>\n  <text x=\"79.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">ff:ff:ff:ff:ff:ff（全員）</text>\n  <rect x=\"138\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#f2f5f9\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"197.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 MAC</text>\n  <text x=\"197.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">MAC 偽サーバ</text>\n  <rect x=\"256\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"315.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先 IP</text>\n  <text x=\"315.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">255.255.255.255</text>\n  <rect x=\"374\" y=\"1568\" width=\"118\" height=\"36\" fill=\"#e6f0ff\" stroke=\"#0a7aff\" stroke-width=\"1\"/>\n  <text x=\"433.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">送信元 IP</text>\n  <text x=\"433.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">192.168.10.50</text>\n  <rect x=\"492\" y=\"1568\" width=\"140\" height=\"36\" fill=\"#ffffff\" stroke=\"#6b7280\" stroke-width=\"1\"/>\n  <text x=\"562.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">宛先ポート番号（UDP）</text>\n  <text x=\"562.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">68</text>\n  <rect x=\"632\" y=\"1568\" width=\"210\" height=\"36\" fill=\"#ffffff\" stroke=\"#9aa7b5\" stroke-width=\"1\"/>\n  <text x=\"737.0\" y=\"1582\" text-anchor=\"middle\" font-size=\"9\" fill=\"#6b7280\">DHCP のメッセージ</text>\n  <text x=\"737.0\" y=\"1597\" text-anchor=\"middle\" font-size=\"10\" font-weight=\"700\" fill=\"#1f2937\">Offer（GW を自分にする）</text>\n<text x=\"20\" y=\"1614\" font-size=\"10\" fill=\"#6b7280\">スヌーピングが有効な口は既定で非信頼。ここから来た Offer・Ack は捨てられるので、この行はどの表にも載らない</text>\n<text x=\"20\" y=\"1632\" font-size=\"10\" fill=\"#6b7280\">端末は自分側のポート番号 68 を使い、サーバとリレーはポート番号 67 を使う（RFC 2131 §4.1）</text>\n<text x=\"20\" y=\"1648\" font-size=\"10\" fill=\"#6b7280\">リレーは giaddr を書くほかに、通ったリレーの数を数える hops も 1 増やす（RFC 2131 §4.1）</text>\n<text x=\"20\" y=\"1664\" font-size=\"10\" fill=\"#6b7280\">出典（4 つのメッセージ・ポート番号 67/68・giaddr・Request を全員あてで出す理由）: RFC 2131 §3.1・§4.1</text>\n<text x=\"20\" y=\"1680\" font-size=\"10\" fill=\"#6b7280\">　https://www.rfc-editor.org/rfc/rfc2131.html</text>\n<text x=\"20\" y=\"1696\" font-size=\"10\" fill=\"#6b7280\">出典（リレー：ip helper-address・giaddr に受けた口の IP を書く・サーバへは 1 対 1 で送る）: Cisco</text>\n<text x=\"20\" y=\"1712\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-s/dhcp-15-s-book/dhcp-relay-agent.html</text>\n<text x=\"20\" y=\"1728\" font-size=\"10\" fill=\"#6b7280\">出典（DHCP スヌーピング：非信頼の口では Offer・Ack を止める／表に載る中身／上流の口を信頼にする）: Cisco</text>\n<text x=\"20\" y=\"1744\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/support/docs/ip/dynamic-host-configuration-protocol-dhcp-dhcpv6/217055-operate-and-troubleshoot-dhcp-snooping.html</text>\n<text x=\"20\" y=\"1760\" font-size=\"10\" fill=\"#6b7280\">出典（スヌーピングは既定で無効。有効にしたあとも、口の信頼は既定で「非信頼」）: Cisco</text>\n<text x=\"20\" y=\"1776\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdhcp82.html</text>\n<text x=\"20\" y=\"1792\" font-size=\"10\" fill=\"#6b7280\">出典（DAI：スヌーピングの表で ARP を検査し、合わない ARP は記録して捨てる）: Cisco</text>\n<text x=\"20\" y=\"1808\" font-size=\"10\" fill=\"#6b7280\">　https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdynarp.html</text>\n<text x=\"20\" y=\"1824\" font-size=\"10\" fill=\"#6b7280\">未検証: リレーが送信元 IP にどちらの口の IP を使うかは機器・設定によるため「ルータ 1 の IP」とだけ書いた（giaddr が受けた口の IP であることは Cisco 公式で確認）</text>\n<text x=\"20\" y=\"1840\" font-size=\"10\" fill=\"#6b7280\">未検証: スヌーピングの表と DAI の動きは実機で見ていない（勉強会で実機で触ったのはポートセキュリティと認証まで）</text>\n</svg>\n## 図 2・図 3・図 5 との接続","line":56,"sources":["src_1","src_2","src_3","src_4","src_5"],"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_179bcf","type":"paragraph","markdown":"図 2 の ARP 要求と同じ全員あてを、ここでは住所そのものを聞くために使います。ARP は IP アドレスを知っていて MAC アドレスを知らない状態、DHCP は IP アドレスすら持っていない状態から始まります。","text":"図 2 の ARP 要求と同じ全員あてを、ここでは住所そのものを聞くために使います。ARP は IP アドレスを知っていて MAC アドレスを知らない状態、DHCP は IP アドレスすら持っていない状態から始まります。","line":296,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_41541c","type":"paragraph","markdown":"図 3 で見たとおり、全員あてが届く範囲は VLAN の中だけです。その制約のままなら DHCP サーバは VLAN ごとに要ることになりますが、リレーがルータの区間を肩代わりして制約を外します。図 5 の PC-A が持っていた IP アドレスとデフォルトゲートウェイは、この ⑤ で決まった値です。","text":"図 3 で見たとおり、全員あてが届く範囲は VLAN の中だけです。その制約のままなら DHCP サーバは VLAN ごとに要ることになりますが、リレーがルータの区間を肩代わりして制約を外します。図 5 の PC-A が持っていた IP アドレスとデフォルトゲートウェイは、この ⑤ で決まった値です。","line":298,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_695491","type":"paragraph","markdown":"配り口を人が決め打ちで守る方法が、勉強会で実機に入れたポートセキュリティです。物理ポートに MAC アドレスを覚えさせて 1 台だけを許します。許す相手をサーバ 1 か所に集める方法が次の図 18 になります。","text":"配り口を人が決め打ちで守る方法が、勉強会で実機に入れたポートセキュリティです。物理ポートに MAC アドレスを覚えさせて 1 台だけを許します。許す相手をサーバ 1 か所に集める方法が次の図 18 になります。","line":300,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_703626","type":"heading","depth":2,"markdown":"## 未検証・注意","text":"未検証・注意","line":302,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_6f3dd1","type":"list","markdown":"- リレーが送信元 IP アドレスにどちらのインターフェースの IP アドレスを使うかは機器と設定によるため、「ルータ 1 の IP アドレス」とだけ書いています。giaddr が受けたインターフェースの IP アドレスであることは Cisco の公式ドキュメントで確認しました。\n- スヌーピングと DAI の動きは実機で見ていません。勉強会で実機に入れたのはポートセキュリティと認証までで、図の表の中身は公式ドキュメントの記述に合わせています。\n- ip helper-address が既定で中継する UDP のポート番号の一覧（67 と 68 以外）は確認していないため、書いていません。\n- 貸出時間の更新（残り時間が半分になったところで延長を頼む動き）は、1 枚に入れると焦点がぼけるため省いています。\n- Offer と Ack が全員あてで返るか 1 対 1 で返るかは、端末が立てる BROADCAST フラグで決まります（RFC 2131 §4.1）。図の帯の ④ と ⑥ は全員あてで返す場合で、1 対 1 なら宛先 MAC アドレスが端末のもの、宛先 IP アドレスが配る住所になります。\n- リレーの細かい動き（hops の上限や、返ってきたメッセージを端末へ渡すときの宛先の決め方）は RFC 1542 が正本ですが、本文を読んでいません。RFC 2131 §4.1 で確認できた範囲だけを書いています。\n- 図に出した 192.168.10.100 と 192.168.3.200 は説明用の値で、勉強会の資料の値とは関係ありません。","text":"リレーが送信元 IP アドレスにどちらのインターフェースの IP アドレスを使うかは機器と設定によるため、「ルータ 1 の IP アドレス」とだけ書いています。giaddr が受けたインターフェースの IP アドレスであることは Cisco の公式ドキュメントで確認しました。スヌーピングと DAI の動きは実機で見ていません。勉強会で実機に入れたのはポートセキュリティと認証までで、図の表の中身は公式ドキュメントの記述に合わせています。ip helper-address が既定で中継する UDP のポート番号の一覧（67 と 68 以外）は確認していないため、書いていません。貸出時間の更新（残り時間が半分になったところで延長を頼む動き）は、1 枚に入れると焦点がぼけるため省いています。Offer と Ack が全員あてで返るか 1 対 1 で返るかは、端末が立てる BROADCAST フラグで決まります（RFC 2131 §4.1）。図の帯の ④ と ⑥ は全員あてで返す場合で、1 対 1 なら宛先 MAC アドレスが端末のもの、宛先 IP アドレスが配る住所になります。リレーの細かい動き（hops の上限や、返ってきたメッセージを端末へ渡すときの宛先の決め方）は RFC 1542 が正本ですが、本文を読んでいません。RFC 2131 §4.1 で確認できた範囲だけを書いています。図に出した 192.168.10.100 と 192.168.3.200 は説明用の値で、勉強会の資料の値とは関係ありません。","line":304,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_240080","type":"heading","depth":2,"markdown":"## 出典","text":"出典","line":312,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_c02365","type":"list","markdown":"- 勉強会での本人の観察。2026-09-13 の実機ハンズオン（資料は非公開）。本記事で観察が支えるのは、配り口を守る設定としてポートセキュリティを実機に入れたことだけで、DHCP の動きとスヌーピングと DAI は以下の文書による\n- [RFC 2131 Dynamic Host Configuration Protocol](https://www.rfc-editor.org/rfc/rfc2131.html) — 4 つのメッセージ、ポート番号 67 と 68 の使い分け（§4.1）、Request を全員あてで出す理由（§3.1）、giaddr が 0 でなければリレーのポート番号 67 あてに返すこと、BROADCAST フラグ（§4.1）\n- [Cisco IOS DHCP Relay Agent](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-s/dhcp-15-s-book/dhcp-relay-agent.html) — ip helper-address を書いたインターフェースの IP アドレスを giaddr に入れること、全員あてを 1 対 1 でサーバへ送ること\n- [Cisco Operate and Troubleshoot DHCP Snooping](https://www.cisco.com/c/en/us/support/docs/ip/dynamic-host-configuration-protocol-dhcp-dhcpv6/217055-operate-and-troubleshoot-dhcp-snooping.html) — 非信頼のインターフェースでサーバ側のメッセージを止めること、表に載る項目、上流を信頼にして利用者側を非信頼にすること\n- [Cisco Catalyst 2960 Configuring DHCP Features](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdhcp82.html) — 既定値の表。スヌーピングは無効、インターフェースの信頼は非信頼\n- [Cisco Catalyst 2960 Configuring Dynamic ARP Inspection](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdynarp.html) — DHCP スヌーピングの表を照合先にして ARP を検査すること、信頼と非信頼で扱いが変わること","text":"勉強会での本人の観察。2026-09-13 の実機ハンズオン（資料は非公開）。本記事で観察が支えるのは、配り口を守る設定としてポートセキュリティを実機に入れたことだけで、DHCP の動きとスヌーピングと DAI は以下の文書によるRFC 2131 Dynamic Host Configuration Protocol — 4 つのメッセージ、ポート番号 67 と 68 の使い分け（§4.1）、Request を全員あてで出す理由（§3.1）、giaddr が 0 でなければリレーのポート番号 67 あてに返すこと、BROADCAST フラグ（§4.1）Cisco IOS DHCP Relay Agent — ip helper-address を書いたインターフェースの IP アドレスを giaddr に入れること、全員あてを 1 対 1 でサーバへ送ることCisco Operate and Troubleshoot DHCP Snooping — 非信頼のインターフェースでサーバ側のメッセージを止めること、表に載る項目、上流を信頼にして利用者側を非信頼にすることCisco Catalyst 2960 Configuring DHCP Features — 既定値の表。スヌーピングは無効、インターフェースの信頼は非信頼Cisco Catalyst 2960 Configuring Dynamic ARP Inspection — DHCP スヌーピングの表を照合先にして ARP を検査すること、信頼と非信頼で扱いが変わること","line":314,"sources":["src_1","src_2","src_3","src_4","src_5"],"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_1f7c1f","type":"heading","depth":2,"markdown":"## 関連","text":"関連","line":321,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}},{"id":"blk_36b085","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- 前の記事（図 16）: [ネットワーク\\_16\\_VRRP](/notes/nw-basics-16-vrrp)（`/notes/nw-basics-16-vrrp`）\n\n- 次の記事（図 18）: [ネットワーク\\_18\\_MABとRADIUS](/notes/nw-basics-18-mab-radius)（`/notes/nw-basics-18-mab-radius`）\n\n- ここで使う全員あてと ARP の元: [ネットワーク\\_02\\_同じネットワークの中](/notes/nw-basics-02-same-network)（`/notes/nw-basics-02-same-network`）\n\n- 全員あてが届く範囲: [ネットワーク\\_03\\_VLAN](/notes/nw-basics-03-vlan)（`/notes/nw-basics-03-vlan`）\n\n- PC が持っている IP アドレスとデフォルトゲートウェイの使われ方: [ネットワーク\\_05\\_行きと帰り](/notes/nw-basics-05-static-route)（`/notes/nw-basics-05-static-route`）","text":"ネットワーク_INDEX — 連載の目次連載の入口: ネットワーク_00_3層で言葉を置く（/notes/nw-basics-00-three-layers）前の記事（図 16）: ネットワーク_16_VRRP（/notes/nw-basics-16-vrrp）次の記事（図 18）: ネットワーク_18_MABとRADIUS（/notes/nw-basics-18-mab-radius）ここで使う全員あてと ARP の元: ネットワーク_02_同じネットワークの中（/notes/nw-basics-02-same-network）全員あてが届く範囲: ネットワーク_03_VLAN（/notes/nw-basics-03-vlan）PC が持っている IP アドレスとデフォルトゲートウェイの使われ方: ネットワーク_05_行きと帰り（/notes/nw-basics-05-static-route）","line":323,"lineage":[],"authoredBy":{"kind":"human","id":"owner","label":"ぴぐお"}}]}