示例:使用虚拟网关地址配置 EVPN-VXLAN 部署
此示例说明如何使用虚拟网关地址配置以太网 VPN (EVPN)-虚拟可扩展 LAN (VXLAN) 部署。
要求
此示例使用以下硬件和软件组件:
两个 MX960 3D 通用边缘路由器网关
两台架顶式 (ToR) QFX5100交换机
三个终端主机设备
Junos OS 版本 14.2 R6 或更高版本(适用于 MX960 路由器)Junos OS 版本 14.1X53-D30 或更高版本(适用于 QFX5100 交换机)
概述和拓扑
图 1 显示了在 EVPN-VXLAN 部署中配置虚拟网关地址的拓扑示例。图中显示了两台 QFX 系列交换机(192.168.0.122 和 192.168.0.125)(充当 ToR 或叶设备)提供第 2 层网关功能,以及两台 MX 系列路由器(192.168.0.212 和 192.168.0.210)用作主干设备并提供第 3 层默认网关功能。
此拓扑示例假定底层已配置且未显示在图中。
目前不支持向虚拟网关 IP 地址发送 ping。
对于两台 MX 系列路由器,请配置以下信息:
IRB 接口、虚拟网关地址和环路逻辑接口。
主干和叶设备之间的多协议内部 BGP (MP-IBGP) 叠加,使用 BGP 路由反射和 EVPN 作为信令协议。
允许特定路由进入虚拟交换机表的路由策略。
每个虚拟网络的路由实例(第 3 层 VRF),包括唯一的路由识别符和 vrf 目标值。
每个虚拟网络的虚拟交换机实例(第 2 层 MAC-VRF)、VTEP 源接口(始终为 lo0.0)、路由识别器和 vrf 导入策略。
每个虚拟交换机的 EVPN 协议、封装方法、VNI 列表和 BUM 流量转发方法。
每个虚拟交换机内的桥接域,用于将 VNID 映射到 VLAN ID、IRB(第 3 层)接口和 BUM 转发方法。
对于两台 QFX 系列交换机 (ToR),请配置以下信息:
带有 VLAN、VLAN ID 和环路逻辑接口的面向主机的接口。
支持链路聚合控制协议 (LACP) 的链路聚合组 (LAG)、以太网分段 ID (ESI) 和全活动模式。
叶设备和主干设备之间的多协议内部 BGP (MP-IBGP) 叠加,EVPN 作为信令协议。
以 VXLAN 为封装方法、扩展 VNI 列表、组播模式以及每个 VNI 的路由目标的 EVPN。
Vrf-imp 策略、vtep 源接口、路由识别符以及 vrf 导入和目标信息。
VLAN,其 VLAN ID 映射到全球重要 VNI 和 VXLAN 入口节点复制。
您可以将虚拟网关地址设置为终端主机(虚拟机或服务器)的默认 IPv4 或 IPv6 网关地址。
配置
本节提供使用虚拟网关地址的 EVPN-VXLAN 部署的完整配置的分步说明:
为 MX1 配置路由实例和桥接域
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到层次结构级别的 CLI [edit]
中,然后从配置模式进入 commit
。
set interfaces irb unit 50 family inet address 10.10.0.101/24 virtual-gateway-address 10.10.0.151 set interfaces irb unit 51 family inet address 10.20.0.101/24 virtual-gateway-address 10.20.0.251 set interfaces lo0 unit 0 family inet address 192.168.0.212/32 set interfaces lo0.50 family inet address 192.168.50.213/32 set interfaces lo0.51 family inet address 192.198.51.214/32 set protocols bgp group overlay-evpn-rr description "Leaf/ToR1 and Leaf/ToR2" set protocols bgp group overlay-evpn-rr type internal set protocols bgp group overlay-evpn-rr local-address 192.168.0.212 set protocols bgp group overlay-evpn-rr family evpn signaling set protocols bgp group overlay-evpn-rr cluster 10.10.10.10 set protocols bgp group overlay-evpn-rr local-as 65200 set protocols bgp group overlay-evpn-rr multipath set protocols bgp group overlay-evpn-rr neighbor 192.168.0.122 set protocols bgp group overlay-evpn-rr neighbor 192.168.0.125 set protocols bgp group overlay-evpn description "to MX2/Spine2" set protocols bgp group overlay-evpn type internal set protocols bgp group overlay-evpn local-address 192.168.0.212 set protocols bgp group overlay-evpn family evpn signaling set protocols bgp group overlay-evpn local-as 65200 set protocols bgp group overlay-evpn multipath set protocols bgp group overlay-evpn neighbor 192.168.0.210 set policy-options policy-statement VS_VLAN50_IMP term ESI from community comm-leaf_esi set policy-options policy-statement VS_VLAN50_IMP term ESI then accept set policy-options policy-statement VS_VLAN50_IMP term VS_VLAN50 from community comm-VS_VLAN50 set policy-options policy-statement VS_VLAN50_IMP term VS_VLAN50 then accept set policy-options policy-statement VS_VLAN51_IMP term ESI from community comm-leaf_esi set policy-options policy-statement VS_VLAN51_IMP term ESI then accept set policy-options policy-statement VS_VLAN51_IMP term VS_VLAN51 from community comm-VS_VLAN51 set policy-options policy-statement VS_VLAN51_IMP term VS_VLAN51 then accept set policy-options community comm-VS_VLAN50 members target:1:50 set policy-options community comm-VS_VLAN51 members target:1:51 set policy-options community comm-leaf_esi members target:9999:9999 set routing-instances VRF_50 instance-type vrf set routing-instances VRF_50 interface lo0.50 set routing-instances VRF_50 interface irb.50 set routing-instances VRF_50 route-distinguisher 192.168.0.212:500 set routing-instances VRF_50 vrf-target target:10:500 set routing-instances VRF_51 instance-type vrf set routing-instances VRF_51 interface lo0.51 set routing-instances VRF_51 interface irb.51 set routing-instances VRF_51 route-distinguisher 192.168.0.212:510 set routing-instances VRF_51 vrf-target target:10:510 set routing-instances VS_VLAN50 instance-type virtual-switch set routing-instances VS_VLAN50 vtep-source-interface lo0.0 set routing-instances VS_VLAN50 route-distinguisher 192.168.0.212:50 set routing-instances VS_VLAN50 vrf-import VS_VLAN50_IMP set routing-instances VS_VLAN50 vrf-target target:1:50 set routing-instances VS_VLAN50 protocols evpn encapsulation vxlan set routing-instances VS_VLAN50 protocols evpn extended-vni-list 50 set routing-instances VS_VLAN50 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN50 protocols evpn default-gateway no-gateway-community set routing-instances VS_VLAN50 bridge-domains bd50 vlan-id 50 set routing-instances VS_VLAN50 bridge-domains bd50 routing-interface irb.50 set routing-instances VS_VLAN50 bridge-domains bd50 vxlan vni 50 set routing-instances VS_VLAN50 bridge-domains bd50 vxlan ingress-node-replication set routing-instances VS_VLAN51 instance-type virtual-switch set routing-instances VS_VLAN51 vtep-source-interface lo0.0 set routing-instances VS_VLAN51 route-distinguisher 192.168.0.212:51 set routing-instances VS_VLAN51 vrf-import VS_VLAN51_IMP set routing-instances VS_VLAN51 vrf-target target:1:51 set routing-instances VS_VLAN51 protocols evpn encapsulation vxlan set routing-instances VS_VLAN51 protocols evpn extended-vni-list 51 set routing-instances VS_VLAN51 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN51 protocols evpn default-gateway no-gateway-community set routing-instances VS_VLAN51 bridge-domains bd51 vlan-id 51 set routing-instances VS_VLAN51 bridge-domains bd51 routing-interface irb.51 set routing-instances VS_VLAN51 bridge-domains bd51 vxlan vni 51 set routing-instances VS_VLAN51 bridge-domains bd51 vxlan ingress-node-replication
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
为两个虚拟网络 (VN) 配置一个集成路由和桥接 (IRB) 接口,包括一个虚拟网关地址,以充当两个 MX 系列(主干)设备上的通用 MAC 地址和 IP 地址。
[edit interfaces] user@MX1# set irb unit 50 family inet address 10.10.0.101/24 virtual-gateway-address 10.10.0.151 user@MX1# set irb unit 51 family inet address 10.20.0.101/24 virtual-gateway-address 10.20.0.251
配置环路接口。
[edit interfaces] user@MX1# set lo0 unit 0 family inet address 192.168.0.212/32 user@MX1# set lo0.50 family inet address 192.168.50.213/32 user@MX1# set lo0.51 family inet address 192.198.51.214/32
使用 BGP 路由反射在主干和叶设备之间配置多协议内部 BGP (MP-IBGP) 叠加网络,并将 EVPN 设置为信令协议。
[edit protocols] user@MX1# set bgp group overlay-evpn-rr description "to Leaf/ToR1 and Leaf/ToR2" user@MX1# set bgp group overlay-evpn-rr type internal user@MX1# set bgp group overlay-evpn-rr local-address 192.168.0.212 user@MX1# set bgp group overlay-evpn-rr family evpn signaling user@MX1# set bgp group overlay-evpn-rr cluster 10.10.10.10 user@MX1# set bgp group overlay-evpn-rr local-as 65200 user@MX1# set bgp group overlay-evpn-rr multipath user@MX1# set bgp group overlay-evpn-rr neighbor 192.168.0.122 user@MX1# set bgp group overlay-evpn-rr neighbor 192.168.0.125
配置第二个 MP-IBGP 叠加网络,以使用 EVPN 信令将主干设备相互连接。
[edit protocols] user@MX1# set bgp group overlay-evpn description "to MX2/Spine2" user@MX1# set bgp group overlay-evpn type internal user@MX1# set bgp group overlay-evpn local-address 192.168.0.212 user@MX1# set bgp group overlay-evpn family evpn signaling user@MX1# set bgp group overlay-evpn local-as 65200 user@MX1# set bgp group overlay-evpn multipath user@MX1# set bgp group overlay-evpn neighbor 192.168.0.210
配置路由策略以允许特定路由进入虚拟交换机表。确保策略包括目标 9999:9999,以便虚拟交换机从 ToR/叶设备导入 1 类以太网分段 ID (ESI) 路由。
[edit policy-options] user@MX1# set policy-statement VS_VLAN50_IMP term ESI from community comm-leaf_esi user@MX1# set policy-statement VS_VLAN50_IMP term ESI then accept user@MX1# set policy-statement VS_VLAN50_IMP term VS_VLAN50 from community comm-VS_VLAN50 user@MX1# set policy-statement VS_VLAN50_IMP term VS_VLAN50 then accept user@MX1# set policy-statement VS_VLAN51_IMP term ESI from community comm-leaf_esi user@MX1# set policy-statement VS_VLAN51_IMP term ESI then accept user@MX1# set policy-statement VS_VLAN51_IMP term VS_VLAN51 from community comm-VS_VLAN51 user@MX1# set policy-statement VS_VLAN51_IMP term VS_VLAN51 then accept user@MX1# set community comm-VS_VLAN50 members target:1:50 user@MX1# set community comm-VS_VLAN51 members target:1:51 user@MX1# set community comm-leaf_esi members target:9999:9999
为每个虚拟网络配置路由实例(第 3 层 VRF)。为每个路由实例分配一个唯一的路由识别符,关联相应的 IRB 接口,并分配一个 vrf 目标值。
[edit routing-instances] user@MX1# set VRF_50 instance-type vrf user@MX1# set VRF_50 interface lo0.50 user@MX1# set VRF_50 interface irb.50 user@MX1# set VRF_50 route-distinguisher 192.168.0.212:500 user@MX1# set VRF_50 vrf-target target:10:500 user@MX1# set VRF_51 instance-type vrf user@MX1# set VRF_51 interface lo0.51 user@MX1# set VRF_51 interface irb.51 user@MX1# set VRF_51 route-distinguisher 192.168.0.212:510 user@MX1# set VRF_51 vrf-target target:10:510
为每个虚拟网络配置虚拟交换机实例(第 2 层 MAC-VRF)。定义 VTEP 源接口(始终为 lo0.0)、路由识别符(用于识别和通告 EVPN 路由)、vrf 导入策略(定义要导入到虚拟交换机的 EVPN 表中的路由目标)和 vrf 目标(使用定义的路由目标导出并标记该本地 VRF 的所有路由)。然后,为每个虚拟交换机配置 EVPN 协议、封装方法、VNI 列表和 BUM 流量转发方法。最后,为每个将 VNID 映射到 VLAN ID 的虚拟交换机配置一个桥接域,关联一个 IRB(第 3 层)接口,并确定 BUM 转发方法。
[edit routing-instances] user@MX1# set VS_VLAN50 instance-type virtual-switch user@MX1# set VS_VLAN50 vtep-source-interface lo0.0 user@MX1# set VS_VLAN50 route-distinguisher 192.168.0.212:50 user@MX1# set VS_VLAN50 vrf-import VS_VLAN50_IMP user@MX1# set VS_VLAN50 vrf-target target:1:50 user@MX1# set VS_VLAN50 protocols evpn encapsulation vxlan user@MX1# set VS_VLAN50 protocols evpn extended-vni-list 50 user@MX1# set VS_VLAN50 protocols evpn multicast-mode ingress-replication user@MX1# set VS_VLAN50 protocols evpn default-gateway no-gateway-community user@MX1# set VS_VLAN50 bridge-domains bd50 vlan-id 50 user@MX1# set VS_VLAN50 bridge-domains bd50 routing-interface irb.50 user@MX1# set VS_VLAN50 bridge-domains bd50 vxlan vni 50 user@MX1# set VS_VLAN50 bridge-domains bd50 vxlan ingress-node-replication user@MX1# set VS_VLAN51 instance-type virtual-switch user@MX1# set VS_VLAN51 vtep-source-interface lo0.0 user@MX1# set VS_VLAN51 route-distinguisher 192.168.0.212:51 user@MX1# set VS_VLAN51 vrf-import VS_VLAN51_IMP user@MX1# set VS_VLAN51 vrf-target target:1:51 user@MX1# set VS_VLAN51 protocols evpn encapsulation vxlan user@MX1# set VS_VLAN51 protocols evpn extended-vni-list 51 user@MX1# set VS_VLAN51 protocols evpn multicast-mode ingress-replication user@MX1# set VS_VLAN51 protocols evpn default-gateway no-gateway-community user@MX1# set VS_VLAN51 bridge-domains bd51 vlan-id 51 user@MX1# set VS_VLAN51 bridge-domains bd51 routing-interface irb.51 user@MX1# set VS_VLAN51 bridge-domains bd51 vxlan vni 51 user@MX1# set VS_VLAN51 bridge-domains bd51 vxlan ingress-node-replication
为 MX2 配置路由实例和桥接域
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到层次结构级别的 CLI [edit]
中,然后从配置模式进入 commit
。
set interfaces irb unit 50 family inet address 10.10.0.104/24 virtual-gateway-address 10.10.0.151 set interfaces irb unit 51 family inet address 10.20.0.104/24 virtual-gateway-address 10.20.0.251 set interfaces lo0 unit 0 family inet address 192.168.0.210/32 set interfaces lo0.50 family inet address 192.168.50.208/32 set interfaces lo0.51 family inet address 192.168.51.209/32 set protocols bgp group overlay-evpn-rr description "to Leaf/ToR1 and Leaf/ToR2" set protocols bgp group overlay-evpn-rr type internal set protocols bgp group overlay-evpn-rr local-address 192.168.0.210 set protocols bgp group overlay-evpn-rr family evpn signaling set protocols bgp group overlay-evpn-rr cluster 10.10.10.10 set protocols bgp group overlay-evpn-rr local-as 65200 set protocols bgp group overlay-evpn-rr multipath set protocols bgp group overlay-evpn-rr neighbor 192.168.0.122 set protocols bgp group overlay-evpn-rr neighbor 192.168.0.125 set protocols bgp group overlay-evpn description "to MX1/Spine1" set protocols bgp group overlay-evpn type internal set protocols bgp group overlay-evpn local-address 192.168.0.210 set protocols bgp group overlay-evpn family evpn signaling set protocols bgp group overlay-evpn local-as 65200 set protocols bgp group overlay-evpn multipath set protocols bgp group overlay-evpn neighbor 192.168.0.212 set policy-options policy-statement VS_VLAN50_IMP term ESI from community comm-leaf_esi set policy-options policy-statement VS_VLAN50_IMP term ESI then accept set policy-options policy-statement VS_VLAN50_IMP term VS_VLAN50 from community comm-VS_VLAN50 set policy-options policy-statement VS_VLAN50_IMP term VS_VLAN50 then accept set policy-options policy-statement VS_VLAN51_IMP term ESI from community comm-leaf_esi set policy-options policy-statement VS_VLAN51_IMP term ESI then accept set policy-options policy-statement VS_VLAN51_IMP term VS_VLAN51 from community comm-VS_VLAN51 set policy-options policy-statement VS_VLAN51_IMP term VS_VLAN51 then accept set policy-options community comm-VS_VLAN50 members target:1:50 set policy-options community comm-VS_VLAN51 members target:1:51 set policy-options community comm-leaf_esi members target:9999:9999 set routing-instances VRF_50 instance-type vrf set routing-instances VRF_50 interface lo0.50 set routing-instances VRF_50 interface irb.50 set routing-instances VRF_50 route-distinguisher 192.168.0.210:500 set routing-instances VRF_50 vrf-target target:10:500 set routing-instances VRF_51 instance-type vrf set routing-instances VRF_51 interface lo0.51 set routing-instances VRF_51 interface irb.51 set routing-instances VRF_51 route-distinguisher 192.168.0.210:510 set routing-instances VRF_51 vrf-target target:10:510 set routing-instances VS_VLAN50 instance-type virtual-switch set routing-instances VS_VLAN50 vtep-source-interface lo0.0 set routing-instances VS_VLAN50 route-distinguisher 192.168.0.210:50 set routing-instances VS_VLAN50 vrf-import VS_VLAN50_IMP set routing-instances VS_VLAN50 vrf-target target:1:50 set routing-instances VS_VLAN50 protocols evpn encapsulation vxlan set routing-instances VS_VLAN50 protocols evpn extended-vni-list 50 set routing-instances VS_VLAN50 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN50 protocols evpn default-gateway no-gateway-community set routing-instances VS_VLAN50 bridge-domains bd50 vlan-id 50 set routing-instances VS_VLAN50 bridge-domains bd50 routing-interface irb.50 set routing-instances VS_VLAN50 bridge-domains bd50 vxlan vni 50 set routing-instances VS_VLAN50 bridge-domains bd50 vxlan ingress-node-replication set routing-instances VS_VLAN51 instance-type virtual-switch set routing-instances VS_VLAN51 vtep-source-interface lo0.0 set routing-instances VS_VLAN51 route-distinguisher 192.168.0.210:51 set routing-instances VS_VLAN51 vrf-import VS_VLAN51_IMP set routing-instances VS_VLAN51 vrf-target target:1:51 set routing-instances VS_VLAN51 protocols evpn encapsulation vxlan set routing-instances VS_VLAN51 protocols evpn extended-vni-list 51 set routing-instances VS_VLAN51 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN51 protocols evpn default-gateway no-gateway-community set routing-instances VS_VLAN51 bridge-domains bd51 vlan-id 51 set routing-instances VS_VLAN51 bridge-domains bd51 routing-interface irb.51 set routing-instances VS_VLAN51 bridge-domains bd51 vxlan vni 51 set routing-instances VS_VLAN51 bridge-domains bd51 vxlan ingress-node-replication
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
为两个虚拟网络 (VN) 配置一个集成路由和桥接 (IRB) 接口,包括一个虚拟网关地址,以充当两个 MX 系列(主干)设备上的通用 MAC 地址和 IP 地址。
[edit interfaces] user@MX2# set irb unit 50 family inet address 10.10.0.104/24 virtual-gateway-address 10.10.0.151 user@MX2# set irb unit 51 family inet address 10.20.0.104/24 virtual-gateway-address 10.20.0.251
配置环路接口。
[edit interfaces] user@MX2# set lo0 unit 0 family inet address 192.168.0.210/32 user@MX2# set lo0.50 family inet address 192.168.50.208/32 user@MX2# set lo0.51 family inet address 192.168.51.209/32
使用 BGP 路由反射在主干和叶设备之间配置多协议内部 BGP (MP-IBGP) 叠加网络,并将 EVPN 设置为信令协议。
[edit protocols] user@MX2# set bgp group overlay-evpn-rr description "to Leaf/ToR1 and Leaf/ToR2" user@MX2# set bgp group overlay-evpn-rr type internal user@MX2# set bgp group overlay-evpn-rr local-address 192.168.0.210 user@MX2# set bgp group overlay-evpn-rr family evpn signaling user@MX2# set bgp group overlay-evpn-rr cluster 10.10.10.10 user@MX2# set bgp group overlay-evpn-rr local-as 65200 user@MX2# set bgp group overlay-evpn-rr multipath user@MX2# set bgp group overlay-evpn-rr neighbor 192.168.0.122 user@MX2# set bgp group overlay-evpn-rr neighbor 192.168.0.125
配置第二个 MP-IBGP 叠加网络,以使用 EVPN 信令将主干设备相互连接。
[edit protocols] user@MX2# set bgp group overlay-evpn description "to MX1/Spine1" user@MX2# set bgp group overlay-evpn type internal user@MX2# set bgp group overlay-evpn local-address 192.168.0.210 user@MX2# set bgp group overlay-evpn family evpn signaling user@MX2# set bgp group overlay-evpn local-as 65200 user@MX2# set bgp group overlay-evpn multipath user@MX2# set bgp group overlay-evpn neighbor 192.168.0.212
配置路由策略以允许特定路由进入虚拟交换机表。确保策略包括目标 9999:9999,以便虚拟交换机从 ToR/叶设备导入 1 类以太网分段 ID (ESI) 路由。
[edit policy-options] user@MX2# set policy-statement VS_VLAN50_IMP term ESI from community comm-leaf_esi user@MX2# set policy-statement VS_VLAN50_IMP term ESI then accept user@MX2# set policy-statement VS_VLAN50_IMP term VS_VLAN50 from community comm-VS_VLAN50 user@MX2# set policy-statement VS_VLAN50_IMP term VS_VLAN50 then accept user@MX2# set policy-statement VS_VLAN51_IMP term ESI from community comm-leaf_esi user@MX2# set policy-statement VS_VLAN51_IMP term ESI then accept user@MX2# set policy-statement VS_VLAN51_IMP term VS_VLAN51 from community comm-VS_VLAN51 user@MX2# set policy-statement VS_VLAN51_IMP term VS_VLAN51 then accept user@MX2# set community comm-VS_VLAN50 members target:1:50 user@MX2# set community comm-VS_VLAN51 members target:1:51 user@MX2# set community comm-leaf_esi members target:9999:9999
为每个虚拟网络配置路由实例(第 3 层 VRF)。为每个路由实例分配一个唯一的路由识别符,关联相应的 IRB 接口,并分配一个 vrf 目标值。
[edit routing-instances] user@MX2# set VRF_50 instance-type vrf user@MX2# set VRF_50 interface lo0.50 user@MX2# set VRF_50 interface irb.50 user@MX2# set VRF_50 route-distinguisher 192.168.0.210:500 user@MX2# set VRF_50 vrf-target target:10:500 user@MX2# set VRF_51 instance-type vrf user@MX2# set VRF_51 interface lo0.51 user@MX2# set VRF_51 interface irb.51 user@MX2# set VRF_51 route-distinguisher 192.168.0.210:510 user@MX2# set VRF_51 vrf-target target:10:510
为每个虚拟网络配置虚拟交换机实例(第 2 层 MAC-VRF)。定义 VTEP 源接口(始终为 lo0.0)、路由识别符(用于识别和通告 EVPN 路由)、vrf 导入策略(定义要导入到虚拟交换机的 EVPN 表中的路由目标)和 vrf 目标(使用定义的路由目标导出并标记该本地 VRF 的所有路由)。然后,为每个虚拟交换机配置 EVPN 协议、封装方法、VNI 列表和 BUM 流量转发方法。最后,为每个将 VNID 映射到 VLAN ID 的虚拟交换机配置一个桥接域,关联一个 IRB(第 3 层)接口,并确定 BUM 转发方法。
[edit routing-instances] user@MX2# set VS_VLAN50 instance-type virtual-switch user@MX2# set VS_VLAN50 vtep-source-interface lo0.0 user@MX2# set VS_VLAN50 route-distinguisher 192.168.0.210:50 user@MX2# set VS_VLAN50 vrf-import VS_VLAN50_IMP user@MX2# set VS_VLAN50 vrf-target target:1:50 user@MX2# set VS_VLAN50 protocols evpn encapsulation vxlan user@MX2# set VS_VLAN50 protocols evpn extended-vni-list 50 user@MX2# set VS_VLAN50 protocols evpn multicast-mode ingress-replication user@MX2# set VS_VLAN50 protocols evpn default-gateway no-gateway-community user@MX2# set VS_VLAN50 bridge-domains bd50 vlan-id 50 user@MX2# set VS_VLAN50 bridge-domains bd50 routing-interface irb.50 user@MX2# set VS_VLAN50 bridge-domains bd50 vxlan vni 50 user@MX2# set VS_VLAN50 bridge-domains bd50 vxlan ingress-node-replication user@MX2# set VS_VLAN51 instance-type virtual-switch user@MX2# set VS_VLAN51 vtep-source-interface lo0.0 user@MX2# set VS_VLAN51 route-distinguisher 192.168.0.210:51 user@MX2# set VS_VLAN51 vrf-import VS_VLAN51_IMP user@MX2# set VS_VLAN51 vrf-target target:1:51 user@MX2# set VS_VLAN51 protocols evpn encapsulation vxlan user@MX2# set VS_VLAN51 protocols evpn extended-vni-list 51 user@MX2# set VS_VLAN51 protocols evpn multicast-mode ingress-replication user@MX2# set VS_VLAN51 protocols evpn default-gateway no-gateway-community user@MX2# set VS_VLAN51 bridge-domains bd51 vlan-id 51 user@MX2# set VS_VLAN51 bridge-domains bd51 routing-interface irb.51 user@MX2# set VS_VLAN51 bridge-domains bd51 vxlan vni 51 user@MX2# set VS_VLAN51 bridge-domains bd51 vxlan ingress-node-replication
为 ToR1 配置接口和 VLAN
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到层次结构级别的 CLI [edit]
中,然后从配置模式进入 commit
。
set interfaces ge-1/1/0 description "to CE2" set interfaces ge-1/1/0 unit 0 family ethernet-switching vlan members v50 set interfaces ge-1/1/2 description "to CE25" set interfaces ge-1/1/2 ether-options 802.3ad ae0 set interfaces ae0 esi 00:25:00:00:00:00:00:00:00:01 set interfaces ae0 esi all-active set interfaces ae0 aggregated-ether-options lacp active set interfaces ae0 aggregated-ether-options lacp system-id 00:00:00:01:01:01 set interfaces ae0 unit 0 family ethernet-switching vlan members v51 set interfaces lo0 unit 0 family inet address 192.168.0.122/32 set protocols bgp group overlay-evpn description "to MX1/Spine1 and MX2/Spine2" set protocols bgp group overlay-evpn type internal set protocols bgp group overlay-evpn local-address 192.168.0.122 set protocols bgp group overlay-evpn family evpn signaling set protocols bgp group overlay-evpn local-as 65200 set protocols bgp group overlay-evpn multipath set protocols bgp group overlay-evpn neighbor 192.168.0.212 set protocols bgp group overlay-evpn neighbor 192.168.0.210 set protocols evpn encapsulation vxlan set protocols evpn extended-vni-list 50 set protocols evpn extended-vni-list 51 set protocols evpn multicast-mode ingress-replication set protocols evpn vni-options vni 50 vrf-target export target:1:50 set protocols evpn vni-options vni 51 vrf-target export target:1:51 set policy-options policy-statement vrf-imp term t1 from community comm-leaf_esi set policy-options policy-statement vrf-imp term t1 then accept set policy-options policy-statement vrf-imp term t2 from community com50 set policy-options policy-statement vrf-imp term t2 then accept set policy-options policy-statement vrf-imp term t3 from community com51 set policy-options policy-statement vrf-imp term t3 then accept set policy-options policy-statement vrf-imp term t4 then reject set policy-options community comm-leaf_esi members target:9999:9999 set policy-options community com50 members target:1:50 set policy-options community com51 members target:1:51 set switch-options vtep-source-interface lo0.0 set switch-options route-distinguisher 192.168.0.122:1 set switch-options vrf-import vrf-imp set switch-options vrf-target target:9999:9999 set vlans v50 vlan-id 50 set vlans v50 vxlan vni 50 set vlans v50 vxlan ingress-node-replication set vlans v51 vlan-id 51 set vlans v51 vxlan vni 51 set vlans v51 vxlan ingress-node-replication
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
创建并配置面向 CE2 终端主机设备的面向主机的接口,并配置其 VLAN 信息。
[edit interfaces] user@ToR1# set ge-1/1/0 description "to CE2" user@ToR1# set ge-1/1/0 unit 0 family ethernet-switching vlan members v50
创建并配置面向 CE25 终端主机设备的面向主机的接口,并将其配置为聚合以太网捆绑包 ae0 的成员。
[edit interfaces] user@ToR1# set ge-1/1/2 description "to CE25" user@ToR1# set ge-1/1/2 ether-options 802.3ad ae0
配置面向 CE25 终端主机设备的链路聚合控制协议 (LACP) 链路聚合组 (LAG) 接口。以太网分段 ID (ESI) 在整个 EVPN 域中是全局唯一的。全活动配置使 ToR1 和 ToR2 能够将流量转发到 CE25 终端主机设备或从 CE25 终端主机设备转发流量。
[edit interfaces] user@ToR1# set ae0 esi 00:25:00:00:00:00:00:00:00:01 user@ToR1# set ae0 esi all-active user@ToR1# set ae0 aggregated-ether-options lacp active user@ToR1# set ae0 aggregated-ether-options lacp system-id 00:00:00:01:01:01 user@ToR1# set ae0 unit 0 family ethernet-switching vlan members v51
配置环路接口。
[edit interfaces] user@ToR1# set lo0 unit 0 family inet address 192.168.0.122/32
在叶设备和主干设备之间配置多协议内部 BGP (MP-IBGP) 叠加网络,并将 EVPN 配置为信令协议。
[edit protocols] user@ToR1# set bgp group overlay-evpn description "to MX1/Spine1 and MX2/Spine2" user@ToR1# set bgp group overlay-evpn type internal user@ToR1# set bgp group overlay-evpn local-address 192.168.0.122 user@ToR1# set bgp group overlay-evpn family evpn signaling user@ToR1# set bgp group overlay-evpn local-as 65200 user@ToR1# set bgp group overlay-evpn multipath user@ToR1# set bgp group overlay-evpn neighbor 192.168.0.212 user@ToR1# set bgp group overlay-evpn neighbor 192.168.0.210
使用 VXLAN 作为封装方法配置 EVPN,配置扩展 VNI 列表以确定哪些 VNI 属于 EVPN-VXLAN MP-BGP 域,将组播模式设置为使用入口复制(而不是使用组播底层网络),然后在 VNI 选项下为每个 VNI 配置路由目标。
[edit protocols] user@ToR1# set evpn encapsulation vxlan user@ToR1# set evpn extended-vni-list 50 user@ToR1# set evpn extended-vni-list 51 user@ToR1# set evpn multicast-mode ingress-replication user@ToR1# set evpn vni-options vni 50 vrf-target export target:1:50 user@ToR1# set evpn vni-options vni 51 vrf-target export target:1:51
配置 vrf-imp 策略以识别并允许将目标社区从 bgp.evpn.0 导入到 default-switch.evpn.0 实例中。
[edit policy-options] user@ToR1# set policy-statement vrf-imp term t1 from community comm-leaf_esi user@ToR1# set policy-statement vrf-imp term t1 then accept user@ToR1# set policy-statement vrf-imp term t2 from community com50 user@ToR1# set policy-statement vrf-imp term t2 then accept user@ToR1# set policy-statement vrf-imp term t3 from community com51 user@ToR1# set policy-statement vrf-imp term t3 then accept user@ToR1# set policy-statement vrf-imp term t4 then reject user@ToR1# set community comm-leaf_esi members target:9999:9999 user@ToR1# set community com50 members target:1:50 user@ToR1# set community com51 members target:1:51
配置 vtep 源接口(始终设置为 lo0.0)、路由识别符以及 vrf 导入和目标信息。
注意:路由识别符必须在网络范围内跨所有交换机是唯一的,以确保 MP-BGP 中的所有路由通告都是全局唯一的。vrf 目标标记交换机的出站路由信息,包括(至少)所有 ESI(类型 1)路由。该
vrf-import
语句引用 vrf-imp 策略以允许来自远程设备的入站路由信息。[edit switch-options] user@ToR1# set vtep-source-interface lo0.0 user@ToR1# set route-distinguisher 192.168.0.122:1 user@ToR1# set vrf-import vrf-imp user@ToR1# set vrf-target target:9999:9999
定义 VLAN,将本地重要 VLAN ID 映射到全球重要 VNI,并设置 VXLAN 入口节点复制。
[edit vlans] user@ToR1# set v50 vlan-id 50 user@ToR1# set v50 vxlan vni 50 user@ToR1# set v50 vxlan ingress-node-replication user@ToR1# set v51 vlan-id 51 user@ToR1# set v51 vxlan vni 51 user@ToR1# set v51 vxlan ingress-node-replication
为 ToR2 配置接口和 VLAN
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到层次结构级别的 CLI [edit]
中,然后从配置模式进入 commit
。
set interfaces ge-1/1/0 description "to CE5" set interfaces ge-1/1/0 unit 0 family ethernet-switching vlan members v50 set interfaces ge-1/1/2 description "to CE25" set interfaces ge-1/1/2 ether-options 802.3ad ae0 set interfaces ae0 esi 00:25:00:00:00:00:00:00:00:01 set interfaces ae0 esi all-active set interfaces ae0 aggregated-ether-options lacp active set interfaces ae0 aggregated-ether-options lacp system-id 00:00:00:01:01:01 set interfaces ae0 unit 0 family ethernet-switching vlan members v51 set interfaces lo0 unit 0 family inet address 192.168.0.125/32 set protocols bgp group overlay-evpn description "to MX1/Spine1 and MX2/Spine2" set protocols bgp group overlay-evpn type internal set protocols bgp group overlay-evpn local-address 192.168.0.125 set protocols bgp group overlay-evpn family evpn signaling set protocols bgp group overlay-evpn local-as 65200 set protocols bgp group overlay-evpn multipath set protocols bgp group overlay-evpn neighbor 192.168.0.212 set protocols bgp group overlay-evpn neighbor 192.168.0.210 set protocols evpn encapsulation vxlan set protocols evpn extended-vni-list 50 set protocols evpn extended-vni-list 51 set protocols evpn multicast-mode ingress-replication set protocols evpn vni-options vni 50 vrf-target export target:1:50 set protocols evpn vni-options vni 51 vrf-target export target:1:51 set policy-options policy-statement vrf-imp term t1 from community comm-leaf_esi set policy-options policy-statement vrf-imp term t1 then accept set policy-options policy-statement vrf-imp term t2 from community com50 set policy-options policy-statement vrf-imp term t2 then accept set policy-options policy-statement vrf-imp term t3 from community com51 set policy-options policy-statement vrf-imp term t3 then accept set policy-options policy-statement vrf-imp term t4 then reject set policy-options community comm-leaf_esi members target:9999:9999 set policy-options community com50 members target:1:50 set policy-options community com50 members target:1:50 set policy-options community com51 members target:1:51 set switch-options vtep-source-interface lo0.0 set switch-options route-distinguisher 192.168.0.125:1 set switch-options vrf-import vrf-imp set switch-options vrf-target target:9999:9999 set vlans v50 vlan-id 50 set vlans v50 vxlan vni 50 set vlans v50 vxlan ingress-node-replication set vlans v51 vlan-id 51 set vlans v51 vxlan vni 51 set vlans v51 vxlan ingress-node-replication
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
创建并配置面向 CE5 终端主机设备的面向主机的接口,并配置其 VLAN 信息。
[edit interfaces] user@ToR2# set ge-1/1/0 description "to CE5" user@ToR2# set ge-1/1/0 unit 0 family ethernet-switching vlan members v50
创建并配置面向 CE25 终端主机设备的面向主机的接口,并将其配置为聚合以太网捆绑包 ae0 的成员。
[edit interfaces] user@ToR2# set ge-1/1/2 description "to CE25" user@ToR2# set ge-1/1/2 ether-options 802.3ad ae0
配置面向 CE25 终端主机设备的链路聚合控制协议 (LACP) 链路聚合组 (LAG) 接口。以太网分段 ID (ESI) 在整个 EVPN 域中是全局唯一的。全活动配置使 ToR1 和 ToR2 能够将流量转发到 CE25 终端主机设备或从 CE25 终端主机设备转发流量。
[edit interfaces] user@ToR2# set ae0 esi 00:25:00:00:00:00:00:00:00:01 user@ToR2# set ae0 esi all-active user@ToR2# set ae0 aggregated-ether-options lacp active user@ToR2# set ae0 aggregated-ether-options lacp system-id 00:00:00:01:01:01 user@ToR2# set ae0 unit 0 family ethernet-switching vlan members v51
配置环路接口。
[edit interfaces] user@ToR2# set lo0 unit 0 family inet address 192.168.0.125/32
在叶设备和主干设备之间配置多协议内部 BGP (MP-IBGP) 叠加网络,并将 EVPN 配置为信令协议。
[edit protocols] user@ToR2# set bgp group overlay-evpn description "to MX1/Spine1 and MX2/Spine2" user@ToR2# set bgp group overlay-evpn type internal user@ToR2# set bgp group overlay-evpn local-address 192.168.0.125 user@ToR2# set bgp group overlay-evpn family evpn signaling user@ToR2# set bgp group overlay-evpn local-as 65200 user@ToR2# set bgp group overlay-evpn multipath user@ToR2# set bgp group overlay-evpn neighbor 192.168.0.212 user@ToR2# set bgp group overlay-evpn neighbor 192.168.0.210
使用 VXLAN 作为封装方法配置 EVPN,配置扩展 VNI 列表以确定哪些 VNI 属于 EVPN-VXLAN MP-BGP 域,将组播模式设置为使用入口复制(而不是使用组播底层网络),然后在 VNI 选项下为每个 VNI 配置路由目标。
[edit protocols] user@ToR2# set evpn encapsulation vxlan user@ToR2# set evpn extended-vni-list 50 user@ToR2# set evpn extended-vni-list 51 user@ToR2# set evpn multicast-mode ingress-replication user@ToR2# set evpn vni-options vni 50 vrf-target export target:1:50 user@ToR2# set evpn vni-options vni 51 vrf-target export target:1:51
配置 vrf-imp 策略以识别并允许将目标社区从 bgp.evpn.0 导入到 default-switch.evpn.0 实例中。
[edit policy-options] user@ToR2# set policy-statement vrf-imp term t1 from community comm-leaf_esi user@ToR2# set policy-statement vrf-imp term t1 then accept user@ToR2# set policy-statement vrf-imp term t2 from community com50 user@ToR2# set policy-statement vrf-imp term t2 then accept user@ToR2# set policy-statement vrf-imp term t3 from community com51 user@ToR2# set policy-statement vrf-imp term t3 then accept user@ToR2# set policy-statement vrf-imp term t4 then reject user@ToR2# set community comm-leaf_esi members target:9999:9999 user@ToR2# set community com50 members target:1:50 user@ToR2# set community com51 members target:1:51
配置 vtep 源接口(始终设置为 lo0.0)、路由识别符以及 vrf 导入和目标信息。
注意:路由识别符必须在网络范围内跨所有交换机是唯一的,以确保 MP-BGP 中的所有路由通告都是全局唯一的。vrf 目标标记交换机的出站路由信息,包括(至少)所有 ESI(类型 1)路由。该
vrf-import
语句引用 vrf-imp 策略以允许来自远程设备的入站路由信息。[edit switch-options] user@ToR2# set vtep-source-interface lo0.0 user@ToR2# set route-distinguisher 192.168.0.125:1 user@ToR2# set vrf-import vrf-imp user@ToR2# set vrf-target target:9999:9999
定义 VLAN,将本地重要 VLAN ID 映射到全球重要 VNI,并设置 VXLAN 入口节点复制。
[edit vlans] user@ToR2# set v50 vlan-id 50 user@ToR2# set v50 vxlan vni 50 user@ToR2# set v50 vxlan ingress-node-replication user@ToR2# set v51 vlan-id 51 user@ToR2# set v51 vxlan vni 51 user@ToR2# set v51 vxlan ingress-node-replication
验证
确认配置工作正常。
- 验证从 MX1 到终端主机设备的连接
- 验证从 MX2 到终端主机设备的连接
- 验证 ToR1 上的 IRB 虚拟(任播)网关可访问性
- 验证 ToR1 上的虚拟网关地址 VLAN 映射
- 验证最终主机设备之间的子网内和子网间流量连接
验证从 MX1 到终端主机设备的连接
目的
验证 MX1 路由器网关是否可以对 CE2、CE5 和 CE25 终端主机设备执行 ping 操作。
行动
输入命令以 run ping 10.10.0.2 routing-instance VS_VLAN50
ping CE2 终端主机设备。
user@MX1# run ping 10.10.0.2 routing-instance VS_VLAN50 PING 10.10.0.2 (10.10.0.2): 56 data bytes 64 bytes from 10.10.0.2: icmp_seq=0 ttl=64 time=1.699 ms 64 bytes from 10.10.0.2: icmp_seq=1 ttl=64 time=0.842 ms 64 bytes from 10.10.0.2: icmp_seq=2 ttl=64 time=0.802 ms ^C --- 10.10.0.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.802/1.114/1.699/0.414 ms
输入命令以 run ping 10.10.0.5 routing-instance VS_VLAN50
ping CE5 终端主机设备。
user@MX1# run ping 10.10.0.5 routing-instance VS_VLAN50 PING 10.10.0.5 (10.10.0.5): 56 data bytes 64 bytes from 10.10.0.5: icmp_seq=0 ttl=64 time=1.674 ms 64 bytes from 10.10.0.5: icmp_seq=1 ttl=64 time=0.797 ms 64 bytes from 10.10.0.5: icmp_seq=2 ttl=64 time=0.778 ms ^C --- 10.10.0.5 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.778/1.083/1.674/0.418 ms
输入命令以 run ping 10.20.0.25 routing-instance VS_VLAN51
ping CE25 终端主机设备。
user@MX1# run ping 10.20.0.25 routing-instance VS_VLAN51 PING 10.20.0.25 (10.20.0.25): 56 data bytes 64 bytes from 10.20.0.25: icmp_seq=0 ttl=64 time=1.754 ms 64 bytes from 10.20.0.25: icmp_seq=1 ttl=64 time=0.742 ms ^C --- 10.20.0.25 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.742/1.248/1.754/0.506 ms
意义
成功从 MX1 路由器网关到 CE2、CE5 和 CE25 终端主机设备执行 ping 操作。
从 MX 系列路由器网关发送 ping 时,网关使用 IRB IP 地址的唯一部分作为其源,从而可以在该地址上接收 ICMP 响应,从而成功实现 ping。IRB IP 地址的任播部分用于网关冗余。
验证从 MX2 到终端主机设备的连接
目的
验证 MX2 路由器网关是否可以 ping CE2、CE5 和 CE25 终端主机设备。
行动
输入命令以 run ping 10.10.0.2 routing-instance VS_VLAN50
ping CE2 终端主机设备。
user@MX2# run ping 10.10.0.2 routing-instance VS_VLAN50 PING 10.10.0.2 (10.10.0.2): 56 data bytes 64 bytes from 10.10.0.2: icmp_seq=0 ttl=64 time=2.063 ms 64 bytes from 10.10.0.2: icmp_seq=1 ttl=64 time=0.790 ms 64 bytes from 10.10.0.2: icmp_seq=2 ttl=64 time=0.888 ms ^C --- 10.10.0.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.790/1.247/2.063/0.578 ms
输入命令以 run ping 10.10.0.5 routing-instance VS_VLAN50
ping CE5 终端主机设备。
user@MX2# run ping 10.10.0.5 routing-instance VS_VLAN50 PING 10.10.0.5 (10.10.0.5): 56 data bytes 64 bytes from 10.10.0.5: icmp_seq=0 ttl=64 time=0.780 ms 64 bytes from 10.10.0.5: icmp_seq=1 ttl=64 time=0.803 ms 64 bytes from 10.10.0.5: icmp_seq=2 ttl=64 time=0.758 ms ^C --- 10.10.0.5 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.758/0.780/0.803/0.018 ms
输入命令以 run ping 10.20.0.25 routing-instance VS_VLAN51
ping CE25 终端主机设备。
user@MX2# run ping 10.20.0.25 routing-instance VS_VLAN51 PING 10.20.0.25 (10.20.0.25): 56 data bytes 64 bytes from 10.20.0.25: icmp_seq=0 ttl=64 time=0.889 ms 64 bytes from 10.20.0.25: icmp_seq=1 ttl=64 time=0.859 ms 64 bytes from 10.20.0.25: icmp_seq=2 ttl=64 time=0.824 ms ^C --- 10.20.0.25 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.824/0.857/0.889/0.027 ms
意义
成功从 MX2 路由器网关到 CE2、CE5 和 CE25 终端主机设备执行 ping 操作。
从 MX 系列路由器网关发送 ping 时,网关使用 IRB IP 地址的唯一部分作为其源,从而可以在该地址上接收 ICMP 响应,从而成功实现 ping。IRB IP 地址的任播部分用于网关冗余。
验证 ToR1 上的 IRB 虚拟(任播)网关可访问性
目的
验证叶设备(ToR 设备)是否可以访问 VNI 50 和 VNI 51 的 IRB 虚拟网关,以及是否正在从 MX1 和 MX2 设备接收 ESI 信息。
行动
输入命令以
show route receive-protocol bgp 192.168.0.212
显示从 MX1 收到的 EVPN 路由。user@ToR1> show route receive-protocol bgp 192.168.0.212 inet.0: 13 destinations, 18 routes (13 active, 0 holddown, 0 hidden) :vxlan.inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) bgp.evpn.0: 75 destinations, 123 routes (75 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path 1:192.168.0.212:0::050000ff780000067d00::FFFF:FFFF/304 * 192.168.0.212 I 1:192.168.0.212:0::050000ff78000001c400::FFFF:FFFF/304 * 192.168.0.212 I 2:192.168.0.212:50::50::00:00:5e:00:53:01/304 * 192.168.0.212 I 2:192.168.0.212:50::50::00:00:5e:00:53:f0/304 * 192.168.0.212 I 2:192.168.0.212:51::51::00:00:5e:00:53:01/304 * 192.168.0.212 I 2:192.168.0.212:51::51::00:00:5e:00:53:f0/304 * 192.168.0.212 I 2:192.168.0.212:50::50::00:00:5e:00:53:01::10.10.0.151/304 * 192.168.0.212 I 2:192.168.0.212:50::50::00:00:5e:00:53:f0::10.10.0.101/304 * 192.168.0.212 I 2:192.168.0.212:51::51::00:00:5e:00:53:01::10.20.0.251/304 * 192.168.0.212 I 2:192.168.0.212:51::51::00:00:5e:00:53:f0::10.20.0.101/304 * 192.168.0.212 I <output omitted>
输入命令以
show route table default-switch.evpn.0 evpn-esi-value 05:00:00:ff:78:00:00:06:7d:00
在 default-switch.evpn.0 表中显示 VNI 50 的 1 类 ESI 路由。user@ToR1> show route table default-switch.evpn.0 evpn-esi-value 05:00:00:ff:78:00:00:06:7d:00 default-switch.evpn.0: 66 destinations, 114 routes (66 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:192.168.0.212:0::050000ff780000067d00::FFFF:FFFF/304 *[BGP/170] 00:10:15, localpref 100, from 192.168.0.212 AS path: I, validation-state: unverified > to 192.0.2.8 via ge-0/0/2.0 ## Underlay addressing to 192.0.2.12 via ge-0/0/4.0 ## Underlay addressing 1:192.168.0.210:0::050000ff780000067d00::FFFF:FFFF/304 *[BGP/170] 00:12:07, localpref 100, from 192.168.0.210 AS path: I, validation-state: unverified to 192.0.2.8 via ge-0/0/2.0 ## Underlay addressing > to 192.0.2.12 via ge-0/0/4.0 ## Underlay addressing
意义
从命令的示例 show route receive-protocol bgp 192.168.0.212
输出中,ToR1 正在为 MX1 上的 IRB 任播网关接收自动生成的 ESI 的 1 类通告。它还显示 IRB 任播 MAC 和 IP 地址(00:00:5e:00:53:01/10.10.0.151 和 00:00:5e:00:53:01/10.20.0.251)以及 IRB 物理 MAC 和 IP 地址(00:00:5e:00:53:f0/10.10.0.101 和 00:00:5e:00:53:f0/10.20.0.201)的类型 2 通告。
ToR1 从 MX2 接收类似的路由通告。
从命令的示例 show route table default-switch.evpn.0 evpn-esi-value 05:00:00:ff:78:00:00:06:7d:00
输出中,ToR1 将从 MX1 (192.168.0.212) 和 MX2 (192.168.0.210) 收到的 ESI 通告安装到默认交换机表中。
验证 ToR1 上的虚拟网关地址 VLAN 映射
目的
验证 VNI 50 和 VNI 51 的 IRB 虚拟网关是否正确映射到叶 (ToR) 设备上的相关 VLAN,以便终端主机到达其指定的默认网关。
行动
输入命令以 show ethernet-switching table vlan-id 50
显示 VLAN 50 的成员。
user@ToR1> show ethernet-switching table vlan-id 50 MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC) Ethernet switching table : 3 entries, 3 learned Routing instance : default-switch Vlan MAC MAC Logical Active name address flags interface source v50 00:00:5e:00:53:01 DR,SD esi.1724 05:00:00:ff:78:00:00:06:7d:00 v50 00:00:5e:00:53:62 DL ge-1/1/0.0 v50 00:00:5e:00:53:f0 D vtep.32769 192.168.0.212 v50 00:00:5e:00:53:e0 D vtep.32770 192.168.0.210
输入命令以 show ethernet-switching table vlan-id 51
显示 VLAN 51 的成员。
user@@ToR1> show ethernet-switching table vlan-id 51 MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC) Ethernet switching table : 3 entries, 3 learned Routing instance : default-switch Vlan MAC MAC Logical Active name address flags interface source v51 00:00:5e:00:53:01 DR,SD esi.1725 05:00:00:ff:78:00:00:01:c4:00 v51 00:00:5e:00:53:63 DL ae0.0 v51 00:00:5e:00:53:f0 D vtep.32769 192.168.0.212 v51 00:00:5e:00:53:e0 D vtep.32770 192.168.0.210
意义
输出显示 IRB 任播网关的 MAC 地址和自动生成的 ESI。这意味着网关被正确映射到其各自的 VLAN。
此配置示例中,ToR (QFX5100) 设备上使用的 Junos OS 版本按 VNI 对任播网关进行负载平衡。对于给定的 VNI,交换机会将流量转发到单个 VTEP。
验证最终主机设备之间的子网内和子网间流量连接
目的
验证最终主机设备(CE2、CE5 和 CE25)之间是否存在子网内和子网间流量连接。
行动
输入命令以 run ping 10.10.0.2
ping 从 CE5 终端主机设备到 CE2 终端主机设备,以验证子网内流量。
user@CE5# run ping 10.10.0.2 PING 10.10.0.2 (10.10.0.2): 56 data bytes 64 bytes from 10.10.0.2: icmp_seq=0 ttl=64 time=2.063 ms 64 bytes from 10.10.0.2: icmp_seq=1 ttl=64 time=0.790 ms 64 bytes from 10.10.0.2: icmp_seq=2 ttl=64 time=0.888 ms ^C --- 10.10.0.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.790/1.247/2.063/0.578 ms
输入命令以 run ping 10.20.0.25
ping 从 CE5 终端主机设备 ping 到 CE25 终端主机设备,以验证子网间流量。
user@CE5# run ping 10.20.0.25 PING 10.20.0.25 (10.20.0.25): 56 data bytes 64 bytes from 10.20.0.25: icmp_seq=0 ttl=63 time=1.029 ms 64 bytes from 10.20.0.25: icmp_seq=1 ttl=63 time=0.928 ms 64 bytes from 10.20.0.25: icmp_seq=2 ttl=63 time=0.946 ms 64 bytes from 10.20.0.25: icmp_seq=3 ttl=63 time=2.750 ms ^C --- 10.20.0.25 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.928/1.413/2.750/0.773 ms
意义
子网内(从 CE5 终端主机设备到 CE2 终端主机设备)和子网间(从 CE5 终端主机设备到 CE25 终端主机设备)流量连接正常运行。