<svg viewBox="0 0 960 420" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
.bg { fill: #0f172a; }
.card { fill: #1e293b; rx: 12; ry: 12; stroke: #334155; stroke-width: 1.5; }
.card-sub { fill: #0f172a; rx: 8; ry: 8; stroke: #334155; stroke-width: 1; }
.text-title { fill: #f8fafc; font-family: system-ui, sans-serif; font-weight: 700; font-size: 22px; }
.text-subtitle { fill: #94a3b8; font-family: system-ui, sans-serif; font-size: 14px; }
.text-header { fill: #38bdf8; font-family: system-ui, sans-serif; font-weight: 600; font-size: 16px; }
.text-body { fill: #e2e8f0; font-family: system-ui, sans-serif; font-size: 13px; }
.text-muted { fill: #64748b; font-family: system-ui, sans-serif; font-size: 12px; }
</style>
</defs>
<rect class="bg" height="420" width="960"></rect>
<text class="text-title" y="45" x="40">图 1.2：NAPT (网络地址与端口转换) 动态转换映射模型</text>
<text class="text-subtitle" y="70" x="40">展示私有 IP:Port 如何通过路由器映射表转换为公网 IP:Port</text>
<rect class="card" height="230" width="250" y="100" x="40"></rect>
<text class="text-header" y="130" x="60">💻 内网设备 (LAN)</text>
<rect class="card-sub" height="40" width="210" y="150" x="60"></rect>
<text class="text-body" y="175" x="75">192.168.1.100:50000</text>
<rect class="card-sub" height="40" width="210" y="200" x="60"></rect>
<text class="text-body" y="225" x="75">192.168.1.101:50000</text>
<text class="text-muted" y="280" x="60">私有地址不能直接在公网路由</text>
<rect stroke="#38bdf8" class="card" height="230" width="300" y="100" x="330"></rect>
<text fill="#38bdf8" class="text-header" y="130" x="350">🌐 NAPT 路由器 (转换引擎)</text>
<rect stroke="#38bdf8" class="card-sub" height="110" width="260" y="150" x="350"></rect>
<text fill="#38bdf8" class="text-body" y="175" x="360">📋 NAT 映射表 (NAT Table)</text>
<text class="text-muted" y="200" x="360">192.168.1.100:50000 ↔ 122.x.x.x:40001</text>
<text class="text-muted" y="225" x="360">192.168.1.101:50000 ↔ 122.x.x.x:40002</text>
<text class="text-body" y="290" x="350">公网出口 IP: 122.246.116.13</text>
<rect class="card" height="230" width="250" y="100" x="670"></rect>
<text class="text-header" y="130" x="690">☁️ 互联网目标 (WAN)</text>
<rect class="card-sub" height="40" width="210" y="150" x="690"></rect>
<text class="text-body" y="175" x="705">8.8.8.8:443 (Server A)</text>
<rect class="card-sub" height="40" width="210" y="200" x="690"></rect>
<text class="text-body" y="225" x="705">1.1.1.1:80 (Server B)</text>
<rect stroke="#334155" rx="6" fill="#1e293b" height="40" width="880" y="350" x="40"></rect>
<text fill="#94a3b8" class="text-body" y="375" x="60">💡 核心要点：NAPT 依靠“不同端口号”区分不同内网设备的连接，实现单公网 IP 承载全家上网。</text>
</svg>
