hbugs001 发表于 昨天 18:25

实验案例:H3C MSR36 分布式 EVPN 网关

<h1>1 实验案例:H3C MSR36 分布式 EVPN 网关——8 节点、双 VXLAN、L3VNI 承载数据</h1>
<blockquote>
<p>4 台 MSR36 路由器 + 2 台 MSR36 模拟主机 + 2 台 VPCS 组成的 EVPN 分布式网关 fabric: RTA/RTB 做 anycast 网关(<code>local-proxy-arp</code> + <code>arp suppression</code>),RTC 是边界网关,RTD 是 BGP EVPN 的 RR。 VM1/VM3 属 VXLAN 10,VM2/VM4 属 VXLAN 20,同 VXLAN 二层互通、跨 VXLAN 三层互通。 <strong>本案例的重点不是配置,是「五条数据流各自长什么样」</strong>——每一条都用 <code>reset arp</code> + ping + 实时截图固定下来, 13 条 traffic filter 的命中数会给出一个反直觉的结论:<strong>同网段流量也走 L3VNI,不走 L2VNI</strong>。 实测环境:EVE-NG + eve-iac agent 0.9.1;H3C MSR36(<code>msr36_hcl-7.1.064-EmulatedLab</code>)、VPCS。</p>
</blockquote>
<p><img src="data/attachment/forum/202611/09/182343t5w7urw02h7wv88x.png" alt="拓扑" /></p>
<h2>1.1 0. 实测结果</h2>
<table>
<thead>
<tr>
<th>项</th>
<th>实测结果</th>
</tr>
</thead>
<tbody>
<tr>
<td>规模</td>
<td>8 节点 / 7 链路 / 13 条 traffic filter</td>
</tr>
<tr>
<td>Underlay</td>
<td>OSPF 1 / area 0,RTA/RTB/RTC ↔ RTD 邻居 <code>FULL</code></td>
</tr>
<tr>
<td>Overlay</td>
<td>iBGP AS 200,RTA ↔ RTD(4.4.4.4)<code>Established</code>,<code>PrefRcv 5</code></td>
</tr>
<tr>
<td>VSI</td>
<td><code>vpna</code>1 up(<code>display l2vpn vsi name vpna</code>)</td>
</tr>
<tr>
<td>数据流验证</td>
<td>5 条全部通过:同 VXLAN ×2、跨 VXLAN ×2、广域网 ×1</td>
</tr>
<tr>
<td>封装路径</td>
<td><strong>全部走 L3VNI 1000</strong>,VNI-10/20 恒为 0</td>
</tr>
<tr>
<td>部署耗时</td>
<td>replace 13.4 秒;plan 4.4 秒</td>
</tr>
</tbody>
</table>
<h2>1.2 1. 这个实验解决什么</h2>
<p>单独看 VXLAN 只验证「二层能通」,单独看 EVPN 又碰不到数据面。这个案例把两者接起来,并用 filter 把<strong>控制面、二层泛洪、三层数据</strong>拆开观察:</p>
<ul>
<li><strong>两个 VXLAN 两个子网</strong>:VM1/VM3 → 10.1.1.0/24(VXLAN 10),VM2/VM4 → 10.1.2.0/24(VXLAN 20)。</li>
<li><strong>分布式网关</strong>:RTA/RTB 的 <code>Vsi-interface1/2</code> 配 anycast 网关(10.1.1.1 / 10.1.2.1,共享 MAC <code>0001-0001-0001</code> / <code>0002-0002-0002</code>)。</li>
<li><strong>L3VNI 承载三层</strong>:<code>Vsi-interface3</code> 配 <code>l3-vni 1000</code>,跨 VTEP 三层报文统一用 VNI 1000 封装。</li>
<li><strong>五条数据流逐条留证</strong>:每条都有截图和命中数,不靠 <code>show</code> 命令&quot;应该通&quot;。</li>
</ul>
<p><strong>边界</strong>:实验拓扑,不是生产设计——没有 ESI 多归属、没有 BFD、没有 SR-TE。</p>
<h2>1.3 2. 镜像与规格</h2>
<table>
<thead>
<tr>
<th>节点</th>
<th>型号</th>
<th>EVE 模板</th>
<th>镜像</th>
<th>vCPU / RAM</th>
<th>网口</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTA / RTB / RTC / RTD</td>
<td>MSR36-20</td>
<td><code>msr36_hcl</code></td>
<td><code>msr36_hcl-7.1.064-EmulatedLab</code></td>
<td>2 / 512 MB</td>
<td>11</td>
</tr>
<tr>
<td>VM1 / VM2</td>
<td>MSR36-20</td>
<td><code>msr36_hcl</code></td>
<td>同上</td>
<td>2 / 512 MB</td>
<td>11</td>
</tr>
<tr>
<td>VM3 / VM4</td>
<td>VPCS</td>
<td><code>vpcs</code></td>
<td>EVE 自带</td>
<td>—</td>
<td><code>eth0</code></td>
</tr>
</tbody>
</table>
<h2>1.4 3. 拓扑与地址</h2>
<table>
<thead>
<tr>
<th>端点 A</th>
<th>端点 B</th>
<th>网段</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTD <code>GE0/0</code></td>
<td>RTA <code>GE0/0</code></td>
<td>11.1.1.0/30</td>
</tr>
<tr>
<td>RTD <code>GE0/1</code></td>
<td>RTB <code>GE0/0</code></td>
<td>12.1.1.0/30</td>
</tr>
<tr>
<td>RTD <code>GE0/2</code></td>
<td>RTC <code>GE0/0</code></td>
<td>13.1.1.0/30</td>
</tr>
<tr>
<td>RTA <code>GE0/1</code></td>
<td>VM1 <code>GE0/0</code></td>
<td>VXLAN 10 接入</td>
</tr>
<tr>
<td>RTA <code>GE0/2</code></td>
<td>VM2 <code>GE0/0</code></td>
<td>VXLAN 20 接入</td>
</tr>
<tr>
<td>RTB <code>GE0/1</code></td>
<td>VM3 <code>eth0</code></td>
<td>VXLAN 10 接入</td>
</tr>
<tr>
<td>RTB <code>GE0/2</code></td>
<td>VM4 <code>eth0</code></td>
<td>VXLAN 20 接入</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>设备</th>
<th>地址</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTA / RTB / RTC / RTD LoopBack0</td>
<td>1.1.1.1 / 2.2.2.2 / 3.3.3.3 / 4.4.4.4(/32)</td>
</tr>
<tr>
<td>RTC LoopBack1(vpn1)</td>
<td>20.1.1.1/32(广域网对端)</td>
</tr>
<tr>
<td>分布式网关</td>
<td>10.1.1.1(Vsi-if1)、10.1.2.1(Vsi-if2)、l3-vni 1000(Vsi-if3)</td>
</tr>
<tr>
<td>主机</td>
<td>VM1 10.1.1.10、VM3 10.1.1.20、VM2 10.1.2.10、VM4 10.1.2.20</td>
</tr>
</tbody>
</table>
<h2>1.5 4. 关键设计</h2>
<ol>
<li>IP 地址 + OSPF 打通到 Loopback</li>
<li>创建 VXLAN 与 VSI,VSI 下配 EVPN 实例</li>
<li>BGP L2VPN EVPN 与 RR 建邻居</li>
<li>接口关联 VSI(<code>xconnect vsi vpna/vpnb</code>)</li>
<li>分布式网关:anycast IP + 相同 MAC + <code>local-proxy-arp</code> + <code>distributed-gateway local</code></li>
<li>L3VNI:<code>Vsi-interface3</code> 配 <code>l3-vni 1000</code></li>
</ol>
<h2>1.6 5. 核心配置</h2>
<p>完整预配见 <code>configs/default/n_*.cfg</code>(8 份)。RTA 关键片段:</p>
<pre><code class="language-text">vsi vpna
gateway vsi-interface 1
arp suppression enable
vxlan 10
evpn encapsulation vxlan
   route-distinguisher auto
   vpn-target auto export-extcommunity
   vpn-target auto import-extcommunity
interface Vsi-interface1
ip binding vpn-instance vpn1
ip address 10.1.1.1 255.255.255.0
mac-address 0001-0001-0001
local-proxy-arp enable
distributed-gateway local
interface Vsi-interface3
ip binding vpn-instance vpn1
l3-vni 1000
</code></pre>
<h2>1.7 6. 复现步骤</h2>
<pre><code class="language-text">eve_iac_deploylab=evpn_1   # 约 13 秒
eve_iac_start   lab=evpn_1   # 约 70 秒到 CLI
eve_iac_inspect lab=evpn_1   # 确认 8/8 running
</code></pre>
<p>配置由 H3C configscript 三遍下发(<code>PUT_PASSES=3</code>),预期 <code>pass 3</code> 后 <code>diff</code> 为空。</p>
<h2>1.8 7. 五条数据流的验证(逐条留证)</h2>
<h3>1.8.1 7.1 验证方法</h3>
<p>每条流都走同一套流程,保证可比:</p>
<pre><code class="language-bash"># 1) 清 ARP 动态表项,强制下一次 ping 重新学习
&lt;RTA&gt; reset arp dynamic
&lt;RTB&gt; reset arp dynamic

# 2) 从指定主机 ping(5~10 包即可,包数过多会被判为洪泛而拒绝)
VPCS&gt; ping &lt;target&gt; 10

# 3) ping 进行中,在 EVE 的 Traffic Filters 面板截图
#    (把 filter 的 timeout 临时调到 2000 ms,高亮才驻留得住)
</code></pre>
<blockquote>
<p><strong>为什么必须抢时间窗</strong>:10 个包约 5.6 秒,而 EVE 拓扑页首次加载约 20 秒。 务必先把拓扑页打开预热,再在 ping 进行中截图,否则截到的必然是「面板有计数、链路全暗」。</p>
</blockquote>
<h3>1.8.2 7.2 13 条 filter 一览</h3>
<p><img src="data/attachment/forum/202611/09/182343ugm1rbpggoyysoco.png" alt="Traffic Filters 面板:13 条过滤器与实时命中" /></p>
<table>
<thead>
<tr>
<th>#</th>
<th>过滤器</th>
<th>表达式</th>
<th>颜色</th>
<th>作用层</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><code>ARP-Request</code></td>
<td><code>(arp and arp = 1) or (vlan and arp and arp = 1)</code></td>
<td>红 <code>#e53935</code></td>
<td>接入 L2</td>
</tr>
<tr>
<td>2</td>
<td><code>ARP-Reply</code></td>
<td><code>(arp and arp = 2) or (vlan and arp and arp = 2)</code></td>
<td>绿 <code>#43a047</code></td>
<td>接入 L2</td>
</tr>
<tr>
<td>3</td>
<td><code>ICMP-Request</code></td>
<td><code>(icmp == 8 and icmp != 0xffff) or (vlan and …)</code></td>
<td>粉 <code>#d81b60</code></td>
<td>接入 L3</td>
</tr>
<tr>
<td>4</td>
<td><code>ICMP-Reply</code></td>
<td><code>(icmp == 0 and icmp != 0xffff) or (vlan and …)</code></td>
<td>黄 <code>#fdd835</code></td>
<td>接入 L3</td>
</tr>
<tr>
<td>5</td>
<td><code>VXLAN-All</code></td>
<td><code>udp port 4789</code></td>
<td>紫 <code>#8e24aa</code></td>
<td>VXLAN 总量</td>
</tr>
<tr>
<td>6</td>
<td><code>BGP-EVPN</code></td>
<td><code>tcp port 179</code></td>
<td>白 <code>#ffffff</code></td>
<td>控制面</td>
</tr>
<tr>
<td>7</td>
<td><code>OSPF</code></td>
<td><code>ip proto 89</code></td>
<td>银 <code>#e0e0e0</code></td>
<td>Underlay</td>
</tr>
<tr>
<td>8</td>
<td><code>VXLAN-VNI-10</code></td>
<td><code>udp port 4789 and udp = 0x0000 and udp = 0x0a</code></td>
<td>紫红 <code>#d500f9</code></td>
<td>L2 VNI</td>
</tr>
<tr>
<td>9</td>
<td><code>VXLAN-VNI-20</code></td>
<td><code>udp port 4789 and udp = 0x0000 and udp = 0x14</code></td>
<td>琥珀 <code>#ffab00</code></td>
<td>L2 VNI</td>
</tr>
<tr>
<td>10</td>
<td><code>VXLAN-Inner-ARP</code></td>
<td><code>udp port 4789 and udp = 0x0806</code></td>
<td>亮绿 <code>#76ff03</code></td>
<td>VXLAN 内层</td>
</tr>
<tr>
<td>11</td>
<td><code>VXLAN-Inner-ICMP</code></td>
<td><code>udp port 4789 and udp = 0x0800 and udp = 1</code></td>
<td>橙 <code>#ff6d00</code></td>
<td>VXLAN 内层</td>
</tr>
<tr>
<td>12</td>
<td><code>WAN-Gateway</code></td>
<td><code>ip host 20.1.1.1</code></td>
<td>琥珀 <code>#ffd600</code></td>
<td>广域网边界</td>
</tr>
<tr>
<td>13</td>
<td><code>VXLAN-L3VNI-1000</code></td>
<td><code>udp port 4789 and udp = 0x0003 and udp = 0xe8</code></td>
<td>红 <code>#ff1744</code></td>
<td><strong>L3 VNI(数据面)</strong></td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>VNI 必须拆成 <strong><strong><code>udp</code></strong></strong>(高 16 位)+</strong> <strong><code>udp</code>****(低 8 位)</strong>——<code>udp</code> 编译不过(BPF 只支持 1/2/4 字节读取)。 内层 ethertype 是 <code>udp</code>(8 UDP + 8 VXLAN + 12 内层 MAC),内层 IP proto 是 <code>udp</code>。</p>
</blockquote>
<h3>1.8.3 7.3 流 A:同 VXLAN 10(VM3 → VM1)</h3>
<p><img src="data/attachment/forum/202611/09/182343b28gurb82pag9r9e.png" alt="流A" /></p>
<table>
<thead>
<tr>
<th>过滤器</th>
<th>颜色</th>
<th>命中</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ARP-Request</code>/<code>ARP-Reply</code></td>
<td>红 <code>#e53935</code>/ 绿 <code>#43a047</code></td>
<td>6 / 6</td>
<td>两端接入链路学习 ARP</td>
</tr>
<tr>
<td><code>ICMP-Request</code></td>
<td>粉 <code>#d81b60</code></td>
<td>34</td>
<td>VM3 → VM1 的 echo 请求</td>
</tr>
<tr>
<td><code>ICMP-Reply</code></td>
<td>黄 <code>#fdd835</code></td>
<td>34</td>
<td>VM1 的 echo 应答</td>
</tr>
<tr>
<td><code>VXLAN-All</code></td>
<td>紫 <code>#8e24aa</code></td>
<td><strong>68</strong></td>
<td>核心链路上的 VXLAN 封装总量</td>
</tr>
<tr>
<td><code>VXLAN-Inner-ICMP</code></td>
<td>橙 <code>#ff6d00</code></td>
<td>68</td>
<td>解封装后的内层 ICMP</td>
</tr>
<tr>
<td><code>VXLAN-L3VNI-1000</code></td>
<td>红 <code>#ff1744</code></td>
<td><strong>68</strong></td>
<td><strong>实际承载数据的 VNI</strong></td>
</tr>
<tr>
<td><code>VXLAN-VNI-10</code>/<code>VNI-20</code></td>
<td>紫红 <code>#d500f9</code>/ 琥珀 <code>#ffab00</code></td>
<td><strong>0 / 0</strong></td>
<td>二层 VNI 未承载任何数据</td>
</tr>
<tr>
<td><code>WAN-Gateway</code></td>
<td>琥珀 <code>#ffd600</code></td>
<td>0</td>
<td>本流不涉及广域网</td>
</tr>
</tbody>
</table>
<p><strong>链路高亮</strong>:<code>RTA—VM1</code>、<code>RTB—VM3</code> 亮红黄(两端的接入链路),<code>RTA—VM2</code>、<code>RTB—VM4</code> 保持默认蓝。 <strong>读法</strong>:只有 VXLAN 10 的两台主机所在的接入链路亮,VXLAN 20 侧完全没动——说明流被正确限定在 VXLAN 10 内。</p>
<h3>1.8.4 7.4 流 B:同 VXLAN 20(VM4 → VM2)</h3>
<p><img src="data/attachment/forum/202611/09/182343q3birvhxhbv112cx.png" alt="流B" /></p>
<table>
<thead>
<tr>
<th>过滤器</th>
<th>颜色</th>
<th>命中</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ARP-Request</code>/<code>ARP-Reply</code></td>
<td>红 / 绿</td>
<td>7 / 7</td>
<td>VM4/VM2 侧 ARP</td>
</tr>
<tr>
<td><code>ICMP-Request</code></td>
<td>粉 <code>#d81b60</code></td>
<td>42</td>
<td>VM4 → VM2 的请求</td>
</tr>
<tr>
<td><code>ICMP-Reply</code></td>
<td>黄 <code>#fdd835</code></td>
<td>42</td>
<td>VM2 的应答</td>
</tr>
<tr>
<td><code>VXLAN-All</code></td>
<td>紫 <code>#8e24aa</code></td>
<td><strong>84</strong></td>
<td>封装总量</td>
</tr>
<tr>
<td><code>VXLAN-Inner-ICMP</code></td>
<td>橙 <code>#ff6d00</code></td>
<td>84</td>
<td>内层 ICMP</td>
</tr>
<tr>
<td><code>VXLAN-L3VNI-1000</code></td>
<td>红 <code>#ff1744</code></td>
<td><strong>84</strong></td>
<td><strong>承载 VNI</strong></td>
</tr>
<tr>
<td><code>VXLAN-VNI-10</code>/<code>VNI-20</code></td>
<td>紫红 / 琥珀</td>
<td><strong>0 / 0</strong></td>
<td>二层 VNI 未承载数据</td>
</tr>
</tbody>
</table>
<p><strong>链路高亮</strong>:<code>RTA—VM2</code>、<code>RTB—VM4</code> 亮,<code>VM1/VM3</code> 侧暗——与流 A 完全对称。</p>
<h3>1.8.5 7.5 流 C:跨 VXLAN 三层(VM3 → VM2)</h3>
<p><img src="data/attachment/forum/202611/09/182343nddam84h493plfrm.png" alt="流C" /></p>
<table>
<thead>
<tr>
<th>过滤器</th>
<th>颜色</th>
<th>命中</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ARP-Request</code>/<code>ARP-Reply</code></td>
<td>红 / 绿</td>
<td>7 / 7</td>
<td>跨 VXLAN 需先解析网关 MAC</td>
</tr>
<tr>
<td><code>ICMP-Request</code></td>
<td>粉 <code>#d81b60</code></td>
<td>54</td>
<td>VM3 → VM2(跨子网)</td>
</tr>
<tr>
<td><code>ICMP-Reply</code></td>
<td>黄 <code>#fdd835</code></td>
<td>54</td>
<td>VM2 的应答</td>
</tr>
<tr>
<td><code>VXLAN-All</code></td>
<td>紫 <code>#8e24aa</code></td>
<td><strong>108</strong></td>
<td>封装总量</td>
</tr>
<tr>
<td><code>VXLAN-Inner-ICMP</code></td>
<td>橙 <code>#ff6d00</code></td>
<td>108</td>
<td>内层 ICMP</td>
</tr>
<tr>
<td><code>VXLAN-L3VNI-1000</code></td>
<td>红 <code>#ff1744</code></td>
<td><strong>108</strong></td>
<td><strong>承载 VNI(跨 VXLAN 必走 L3VNI)</strong></td>
</tr>
<tr>
<td><code>VXLAN-VNI-10</code>/<code>VNI-20</code></td>
<td>紫红 / 琥珀</td>
<td><strong>0 / 0</strong></td>
<td>二层 VNI 仍未承载数据</td>
</tr>
</tbody>
</table>
<p><strong>链路高亮</strong>:<code>RTB—VM3</code>(源侧)→ <code>RTD—RTB</code> → <code>RTD—RTA</code> → <code>RTA—VM2</code>(目的侧),一条完整的跨 VTEP 路径。</p>
<p><strong>这是分布式网关的核心验证</strong>:源在 VXLAN 10、目的在 VXLAN 20,两台主机不同子网、不同 VTEP,靠 RTA/RTB 的 anycast 网关做三层转发,封装统一用 L3VNI 1000。</p>
<h3>1.8.6 7.6 流 D:跨 VXLAN 反向(VM4 → VM1)</h3>
<p><img src="data/attachment/forum/202611/09/182343sh2218h9c4jj41mp.png" alt="流D" /></p>
<p>路径与流 C 相反:<code>RTB—VM4</code> → <code>RTD—RTB</code> → <code>RTD—RTA</code> → <code>RTA—VM1</code>。 验证的是「网关在两个方向都对称」,而不是只有单向能通。</p>
<h3>1.8.7 7.7 流 E:VXLAN → 广域网(VM3 → 20.1.1.1)</h3>
<p><img src="data/attachment/forum/202611/09/182343ntcc8mj90jwj9c8q.png" alt="流E" /></p>
<table>
<thead>
<tr>
<th>过滤器</th>
<th>颜色</th>
<th>命中</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ICMP-Request</code></td>
<td>粉 <code>#d81b60</code></td>
<td>71</td>
<td>VM3 → 20.1.1.1</td>
</tr>
<tr>
<td><code>ICMP-Reply</code></td>
<td>黄 <code>#fdd835</code></td>
<td>71</td>
<td>RTC 的应答</td>
</tr>
<tr>
<td><code>VXLAN-All</code></td>
<td>紫 <code>#8e24aa</code></td>
<td><strong>144</strong></td>
<td>fabric 内封装总量</td>
</tr>
<tr>
<td><code>VXLAN-Inner-ICMP</code></td>
<td>橙 <code>#ff6d00</code></td>
<td>144</td>
<td>内层 ICMP</td>
</tr>
<tr>
<td><code>VXLAN-L3VNI-1000</code></td>
<td>红 <code>#ff1744</code></td>
<td><strong>144</strong></td>
<td>承载 VNI</td>
</tr>
<tr>
<td><strong><code>WAN-Gateway</code></strong></td>
<td>琥珀 <code>#ffd600</code></td>
<td><strong>2</strong></td>
<td><strong>出 fabric 的裸 IP(请求+应答)</strong></td>
</tr>
<tr>
<td><code>VXLAN-VNI-10</code>/<code>VNI-20</code></td>
<td>紫红 / 琥珀</td>
<td>0 / 0</td>
<td>仍未参与</td>
</tr>
</tbody>
</table>
<p><strong>链路高亮</strong>:<code>RTB—VM3</code> → <code>RTD—RTB</code> → <strong><code>RTD—RTC</code></strong>** 变黄绿**(平时这条链路始终是默认色)。</p>
<p><strong>这条流证明边界网关生效</strong>:VXLAN 内的主机访问 VXLAN 外部地址,报文从 RTB 进入 fabric、经 RTD 送到 RTC, 再由 RTC 的 vpn1 实例转发出去。<code>WAN-Gateway</code>(<code>ip host 20.1.1.1</code>)命中 2 次,正是请求和应答。</p>
<h3>1.8.8 7.8 五条流汇总</h3>
<table>
<thead>
<tr>
<th>流</th>
<th>源 → 目的</th>
<th>路径</th>
<th>L3VNI</th>
<th>关键证据</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>VM3 → VM1</td>
<td>RTA↔VM1、RTB↔VM3</td>
<td>68</td>
<td>VXLAN 20 侧全暗</td>
</tr>
<tr>
<td>B</td>
<td>VM4 → VM2</td>
<td>RTA↔VM2、RTB↔VM4</td>
<td>84</td>
<td>与 A 对称</td>
</tr>
<tr>
<td>C</td>
<td>VM3 → VM2</td>
<td>RTB→RTD→RTA</td>
<td>108</td>
<td>跨 VTEP 三层</td>
</tr>
<tr>
<td>D</td>
<td>VM4 → VM1</td>
<td>RTB→RTD→RTA</td>
<td>—</td>
<td>与 C 反向对称</td>
</tr>
<tr>
<td>E</td>
<td>VM3 → 20.1.1.1</td>
<td>RTB→RTD→RTC</td>
<td>144</td>
<td><code>RTD—RTC</code>变黄绿 +<code>WAN-Gateway=2</code></td>
</tr>
</tbody>
</table>
<p><strong>共同点</strong>:每一条流的 <code>VXLAN-All</code> 都<strong>等于</strong> <code>ICMP-Request + ICMP-Reply</code>,也<strong>等于</strong> <code>VXLAN-L3VNI-1000</code>。 三个数字咬合,说明<strong>没有一条数据走 L2VNI</strong>。</p>
<h3>1.8.9 7.9 反直觉结论:同网段也走 L3VNI</h3>
<p><strong>直觉</strong>:VM3 和 VM1 同在 <code>10.1.1.0/24</code>、同在 VXLAN 10,应该是二层转发,走 VNI 10。</p>
<p><strong>实测</strong>:<code>VXLAN-VNI-10</code> 恒为 0,<code>VXLAN-L3VNI-1000</code> 等于全部包数。原因有两条,都在配置里:</p>
<ol>
<li><strong><code>arp suppression enable</code></strong>(VSI 视图)——VTEP 本地代理 ARP,泛洪被抑制,不进 VXLAN;</li>
<li><strong><code>local-proxy-arp enable</code></strong>(Vsi-interface)——网关代理 ARP,主机看到的对端 MAC 是<strong>网关 MAC</strong>。</li>
</ol>
<p>验证:</p>
<p><img src="data/attachment/forum/202611/09/182343f4xq49er9ppr94py.png" alt="VM1 的 ARP 表:网关与对端 MAC 相同" /></p>
<pre><code class="language-text">&lt;VM1&gt; display arp
10.1.1.1    0001-0001-0001   GE0/0    ← 网关
10.1.1.20   0001-0001-0001   GE0/0    ← VM3,MAC 是网关的
</code></pre>
<p><code>0001-0001-0001</code> 是 RTA <code>Vsi-interface1</code> 的 MAC。<strong>对端 MAC 等于网关 MAC,说明流量被引导到网关做三层转发</strong>。</p>
<p><strong>判据</strong>:分布式网关场景下,先看 ARP 表里对端 MAC 是不是网关 MAC——是就说明走了三层,别去 VNI-10 里找数据。</p>
<h2>1.9 8. 踩坑清单</h2>
<ol>
<li><strong><code>display l2vpn vsi</code>****(不带 name)偶发空读</strong>——必须 <code>display l2vpn vsi name vpna</code>,否则误判「VSI 没建」。</li>
<li><strong><code>Vsi-interface</code></strong>** 必须先于 <strong><strong><code>vsi</code></strong></strong> 建**——HCL 允许预引用,EVE 镜像不允许,第一遍报 <code>% Wrong parameter</code>,靠三遍下发的第二遍补上。</li>
<li><strong>VPCS 的 ping 第二个参数不是包数</strong>——<code>ping 10.1.1.10 10000</code> 仍只跑 5 个包。</li>
<li><strong>单次 ping 包数别贪多</strong>——超出常规数量会被判为洪泛并拒绝,验收用 5~10 包即可。</li>
<li><strong>截图必须抢时间窗</strong>——10 个包只有 5.6 秒,必须先把拓扑页打开预热,再在 ping 进行中截;等 ping 结束再打开页面必然全 0。</li>
<li><strong><code>udp</code></strong>** 编译不过**——VNI 是 3 字节,BPF 只支持 1/2/4,必须拆 <code>udp</code> + <code>udp</code>。</li>
<li><strong>filter 计数是 2 秒窗口</strong>(本案例为截图调到 2000 ms,标准值是 500 ms)——零星报文会漏抓,发 5~10 次 ping 再观察。</li>
<li><strong><code>#00e5ff</code></strong>** 青色不能用**——深色画布上接近默认链路色,改 <code>#ff6d00</code> 橙。</li>
<li><strong>H3C 镜像上核心链路 ICMP 会亮</strong>——与 Cisco IOL 案例「内层不亮」相反,不要照抄别人的结论。</li>
<li><strong><code>reconcile</code></strong>** 紧跟 <strong><strong><code>edit</code></strong></strong> 会返回 ****<code>applied: None</code>**——<code>plan</code> 缓存没刷新,等 2~3 秒先跑一次 <code>plan</code> 再 reconcile。</li>
</ol>
<h2>1.10 9. 附件</h2>
<ul>
<li>
<p><code>topology.yml</code> — eve-iac 拓扑(含 13 条 traffic_filters)</p>
</li>
<li>
<p><code>configs/default/n_*.cfg</code> — 8 份启动配置</p>
</li>
<li>
<p><code>figures/</code> — 拓扑图 + 5 张数据流截图 + filter 面板截图</p>
<p><a href="forum.php?mod=attachment&amp;aid=3701" title="attachment"><img src="/source/plugin/zhanmishu_markdown/template/editor/images/upload.svg" alt="upload" /> 附件:evpn_1.zip</a></p>
</li>
</ul>
页: [1]
查看完整版本: 实验案例:H3C MSR36 分布式 EVPN 网关