示例:使用 MX 路由器作为主干配置 EVPN-VXLAN 集中路由的桥接交换矩阵
此示例演示如何在 IP 交换矩阵上配置 EVPN 和 VXLAN,以支持以太网帧的最佳转发、提供大规模网络分段、实现基于控制平面的 MAC 学习以及许多其他优势。此示例基于 5 级 Clos 交换矩阵中的集中路由与桥接 (CRB) EVPN 架构。
在 CRB 架构中,IRB 接口提供与属于不同 VLAN 和网络的服务器和 VMS 的第 3 层连接。这些 IRB 接口可用作交换矩阵内 VLAN 间流量的默认网关,也可用作交换矩阵远程目标的默认网关,例如在数据中心互连 (DCI) 的情况下。在 CRB 设计中,您只能定义主干设备上的 IRB 接口。因此,这种设计称为集中路由,因为所有路由都发生在主干上。
有关边缘路由桥接 (ERB) 设计的示例,请参阅 示例:使用任播网关配置 EVPN-VXLAN 边缘路由桥接交换矩阵
有关 EVPN-VXLAN 技术和受支持架构的背景信息,请参阅 EVPN 入门。
要求
原始示例使用了以下硬件和软件组件:
-
两台瞻博网络 MX 系列路由器,用作 EVPN 叠加网络的 IP 网关
-
四台瞻博网络QFX5100交换机。其中两台交换机充当 EVPN 拓扑中的 PE 设备,另外两台交换机用作底层的纯 IP 传输。
-
Junos OS 16.1 或更高版本。
- 使用 Junos OS 21.3R1.9 版进行更新和重新验证
-
从 Junos OS 17.3R1 版开始,EX9200 交换机也支持 EVPN-VXLAN。以前,仅支持 MPLS 封装。在此示例中,EX9200 交换机将用作 EVPN 叠加网络的 IP 网关。MX 系列路由器和 EX9200 交换机之间存在一些配置差异。本主题后面的配置部分将详细介绍特定于 EX9200 的配置。
- 有关受支持平台的列表,请参阅 硬件摘要 。
概述
通过以太网 VPN (EVPN),您可以使用第 2 层虚拟网桥连接分散的客户站点组,通过虚拟可扩展 LAN (VXLAN),您可以将第 2 层连接延伸至介于中间的第 3 层网络,同时提供 VLAN 等网络分段,但不会限制传统 VLAN 的扩展。使用 VXLAN 封装的 EVPN 以云服务提供商所需的规模处理第 2 层连接,并替代 STP 等限制协议,从而释放第 3 层网络,以使用更强大的路由协议。
此示例配置说明如何使用 VXLAN 封装配置 EVPN。在此示例中,MX 系列路由器分别命名为 Core-1 和 Core-2。QFX5100交换机分别命名为 Leaf-1、Leaf-2、Spine-1 和 Spine-2。核心路由器充当 EVPN 叠加网络的 IP 网关,叶式交换机在 EVPN 拓扑中充当 PE 设备,主干交换机充当底层(也称为“精简主干”)的纯 IP 传输。
拓扑学

在我们的示例拓扑中,我们演示了使用未标记和中继(标记)接口的服务器访问。中继接口使用显式 VLAN 标记。服务器 A 和 C 均配置为中继,而服务器 B 对两个分叶使用未标记的访问接口。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit]
级的 CLI 中。
叶-1
set system host-name leaf-1 set chassis aggregated-devices ethernet device-count 2 set interfaces xe-0/0/0 unit 0 family inet address 10.1.111.2/30 set interfaces xe-0/0/1 unit 0 family inet address 10.1.121.2/30 set interfaces xe-0/0/2 ether-options 802.3ad ae0 set interfaces xe-0/0/3 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/3 unit 0 family ethernet-switching vlan members v101 set interfaces ae0 esi 00:01:01:01:01:01:01:01:01: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 interface-mode access set interfaces ae0 unit 0 family ethernet-switching vlan members v102 set interfaces lo0 unit 0 family inet address 10.1.255.111/32 set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set policy-options policy-statement vrf-imp term t1 from community com101 set policy-options policy-statement vrf-imp term t1 then accept set policy-options policy-statement vrf-imp term t2 from community com102 set policy-options policy-statement vrf-imp term t2 then accept set policy-options policy-statement vrf-imp term t3 from community com103 set policy-options policy-statement vrf-imp term t3 then accept set policy-options policy-statement vrf-imp term t5 then reject set policy-options community com101 members target:65000:101 set policy-options community com102 members target:65000:102 set policy-options community com103 members target:65000:103 set routing-options router-id 10.1.255.111 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65111 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.111.1 peer-as 65011 set protocols bgp group underlay neighbor 10.1.121.1 peer-as 65012 set protocols bgp group EVPN_VXLAN_CORE type internal set protocols bgp group EVPN_VXLAN_CORE local-address 10.1.255.111 set protocols bgp group EVPN_VXLAN_CORE family evpn signaling set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.1 set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.2 set protocols evpn encapsulation vxlan set protocols evpn multicast-mode ingress-replication set protocols evpn vni-options vni 101 vrf-target target:65000:101 set protocols evpn vni-options vni 102 vrf-target target:65000:102 set protocols evpn extended-vni-list 101 set protocols evpn extended-vni-list 102 set switch-options vtep-source-interface lo0.0 set switch-options route-distinguisher 10.1.255.111:1 set switch-options vrf-import vrf-imp set switch-options vrf-target target:65000:1 set vlans v101 vlan-id 101 set vlans v101 vxlan vni 101 set vlans v102 vlan-id 102 set vlans v102 vxlan vni 102
叶-2
set system host-name leaf-2 set chassis aggregated-devices ethernet device-count 2 set interfaces xe-0/0/0 unit 0 family inet address 10.1.112.2/30 set interfaces xe-0/0/1 unit 0 family inet address 10.1.122.2/30 set interfaces xe-0/0/2 ether-options 802.3ad ae0 set interfaces xe-0/0/3 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/3 unit 0 family ethernet-switching vlan members v103 set interfaces ae0 esi 00:01:01:01:01:01:01:01:01: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 interface-mode access set interfaces ae0 unit 0 family ethernet-switching vlan members v102 set interfaces lo0 unit 0 family inet address 10.1.255.112/32 set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set policy-options policy-statement vrf-imp term t1 from community com101 set policy-options policy-statement vrf-imp term t1 then accept set policy-options policy-statement vrf-imp term t2 from community com102 set policy-options policy-statement vrf-imp term t2 then accept set policy-options policy-statement vrf-imp term t3 from community com103 set policy-options policy-statement vrf-imp term t3 then accept set policy-options policy-statement vrf-imp term t5 then reject set policy-options community com101 members target:65000:101 set policy-options community com102 members target:65000:102 set policy-options community com103 members target:65000:103 set routing-options router-id 10.1.255.112 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65112 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.112.1 peer-as 65011 set protocols bgp group underlay neighbor 10.1.122.1 peer-as 65012 set protocols bgp group EVPN_VXLAN_CORE type internal set protocols bgp group EVPN_VXLAN_CORE local-address 10.1.255.112 set protocols bgp group EVPN_VXLAN_CORE family evpn signaling set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.1 set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.2 set protocols evpn encapsulation vxlan set protocols evpn multicast-mode ingress-replication set protocols evpn vni-options vni 102 vrf-target target:65000:102 set protocols evpn vni-options vni 103 vrf-target target:65000:103 set protocols evpn extended-vni-list 102 set protocols evpn extended-vni-list 103 set switch-options vtep-source-interface lo0.0 set switch-options route-distinguisher 10.1.255.112:1 set switch-options vrf-import vrf-imp set switch-options vrf-target target:65000:1 set vlans v102 vlan-id 102 set vlans v102 vxlan vni 102 set vlans v103 vlan-id 103 set vlans v103 vxlan vni 103
主干-1
set system host-name spine-1 set interfaces xe-0/0/0 unit 0 family inet address 10.1.11.2/30 set interfaces xe-0/0/1 unit 0 family inet address 10.1.21.2/30 set interfaces xe-0/0/2 unit 0 family inet address 10.1.111.1/30 set interfaces xe-0/0/3 unit 0 family inet address 10.1.112.1/30 set interfaces lo0 unit 0 family inet address 10.1.255.11/32 set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set routing-options router-id 10.1.255.11 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65011 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.11.1 peer-as 65001 set protocols bgp group underlay neighbor 10.1.21.1 peer-as 65002 set protocols bgp group underlay neighbor 10.1.111.2 peer-as 65111 set protocols bgp group underlay neighbor 10.1.112.2 peer-as 65112
主干-2
set system host-name spine-2 set interfaces xe-0/0/0 unit 0 family inet address 10.1.12.2/30 set interfaces xe-0/0/1 unit 0 family inet address 10.1.22.2/30 set interfaces xe-0/0/2 unit 0 family inet address 10.1.121.1/30 set interfaces xe-0/0/3 unit 0 family inet address 10.1.122.1/30 set interfaces lo0 unit 0 family inet address 10.1.255.12/32 set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set routing-options router-id 10.1.255.12 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65012 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.12.1 peer-as 65001 set protocols bgp group underlay neighbor 10.1.22.1 peer-as 65002 set protocols bgp group underlay neighbor 10.1.121.2 peer-as 65111 set protocols bgp group underlay neighbor 10.1.122.2 peer-as 65112
核心-1
set system host-name core-1 set interfaces xe-0/2/0 unit 0 family inet address 10.1.11.1/30 set interfaces xe-0/2/1 unit 0 family inet address 10.1.12.1/30 set interfaces irb unit 101 virtual-gateway-accept-data set interfaces irb unit 101 family inet address 10.1.101.1/24 virtual-gateway-address 10.1.101.254 set interfaces irb unit 102 virtual-gateway-accept-data set interfaces irb unit 102 family inet address 10.1.102.1/24 virtual-gateway-address 10.1.102.254 set interfaces irb unit 103 virtual-gateway-accept-data set interfaces irb unit 103 family inet address 10.1.103.1/24 virtual-gateway-address 10.1.103.254 set interfaces lo0 unit 0 family inet address 10.1.255.1/32 set policy-options policy-statement VS_VLAN101_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN101_IMP term ESI then accept set policy-options policy-statement VS_VLAN101_IMP term VS_VLAN101 from community comm-VS_VLAN101 set policy-options policy-statement VS_VLAN101_IMP term VS_VLAN101 then accept set policy-options policy-statement VS_VLAN102_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN102_IMP term ESI then accept set policy-options policy-statement VS_VLAN102_IMP term VS_VLAN102 from community comm-VS_VLAN102 set policy-options policy-statement VS_VLAN102_IMP term VS_VLAN102 then accept set policy-options policy-statement VS_VLAN103_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN103_IMP term ESI then accept set policy-options policy-statement VS_VLAN103_IMP term VS_VLAN103 from community comm-VS_VLAN103 set policy-options policy-statement VS_VLAN103_IMP term VS_VLAN103 then accept set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set policy-options community comm-VS_VLAN101 members target:65000:101 set policy-options community comm-VS_VLAN102 members target:65000:102 set policy-options community comm-VS_VLAN103 members target:65000:103 set policy-options community comm-leaf members target:65000:1 set routing-instances VRF_Tenant_A instance-type vrf set routing-instances VRF_Tenant_A interface irb.101 set routing-instances VRF_Tenant_A route-distinguisher 10.1.255.1:1010 set routing-instances VRF_Tenant_A vrf-target target:65000:101 set routing-instances VRF_Tenant_B instance-type vrf set routing-instances VRF_Tenant_B interface irb.102 set routing-instances VRF_Tenant_B route-distinguisher 10.1.255.1:1020 set routing-instances VRF_Tenant_B vrf-target target:65000:102 set routing-instances VRF_Tenant_C instance-type vrf set routing-instances VRF_Tenant_C interface irb.103 set routing-instances VRF_Tenant_C route-distinguisher 10.1.255.1:1030 set routing-instances VRF_Tenant_C vrf-target target:65000:103 set routing-instances VS_VLAN101 instance-type virtual-switch set routing-instances VS_VLAN101 protocols evpn encapsulation vxlan set routing-instances VS_VLAN101 protocols evpn extended-vni-list 101 set routing-instances VS_VLAN101 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN101 vtep-source-interface lo0.0 set routing-instances VS_VLAN101 bridge-domains bd101 vlan-id 101 set routing-instances VS_VLAN101 bridge-domains bd101 routing-interface irb.101 set routing-instances VS_VLAN101 bridge-domains bd101 vxlan vni 101 set routing-instances VS_VLAN101 route-distinguisher 10.1.255.1:101 set routing-instances VS_VLAN101 vrf-import VS_VLAN101_IMP set routing-instances VS_VLAN101 vrf-target target:65000:101 set routing-instances VS_VLAN102 instance-type virtual-switch set routing-instances VS_VLAN102 protocols evpn encapsulation vxlan set routing-instances VS_VLAN102 protocols evpn extended-vni-list 102 set routing-instances VS_VLAN102 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN102 vtep-source-interface lo0.0 set routing-instances VS_VLAN102 bridge-domains bd102 vlan-id 102 set routing-instances VS_VLAN102 bridge-domains bd102 routing-interface irb.102 set routing-instances VS_VLAN102 bridge-domains bd102 vxlan vni 102 set routing-instances VS_VLAN102 route-distinguisher 10.1.255.1:102 set routing-instances VS_VLAN102 vrf-import VS_VLAN102_IMP set routing-instances VS_VLAN102 vrf-target target:65000:102 set routing-instances VS_VLAN103 instance-type virtual-switch set routing-instances VS_VLAN103 protocols evpn encapsulation vxlan set routing-instances VS_VLAN103 protocols evpn extended-vni-list 103 set routing-instances VS_VLAN103 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN103 vtep-source-interface lo0.0 set routing-instances VS_VLAN103 bridge-domains bd103 vlan-id 103 set routing-instances VS_VLAN103 bridge-domains bd103 routing-interface irb.103 set routing-instances VS_VLAN103 bridge-domains bd103 vxlan vni 103 set routing-instances VS_VLAN103 route-distinguisher 10.1.255.1:103 set routing-instances VS_VLAN103 vrf-import VS_VLAN103_IMP set routing-instances VS_VLAN103 vrf-target target:65000:103 set routing-options router-id 10.1.255.1 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65001 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.11.2 peer-as 65011 set protocols bgp group underlay neighbor 10.1.12.2 peer-as 65012 set protocols bgp group EVPN_VXLAN type internal set protocols bgp group EVPN_VXLAN local-address 10.1.255.1 set protocols bgp group EVPN_VXLAN family evpn signaling set protocols bgp group EVPN_VXLAN cluster 10.1.1.1 set protocols bgp group EVPN_VXLAN multipath set protocols bgp group EVPN_VXLAN neighbor 10.1.255.111 set protocols bgp group EVPN_VXLAN neighbor 10.1.255.112 set protocols bgp group EVPN_VXLAN neighbor 10.1.255.2
Core-2
set system host-name core-2 set interfaces xe-0/2/0 unit 0 family inet address 10.1.21.1/30 set interfaces xe-0/2/1 unit 0 family inet address 10.1.22.1/30 set interfaces irb unit 101 virtual-gateway-accept-data set interfaces irb unit 101 family inet address 10.1.101.2/24 virtual-gateway-address 10.1.101.254 set interfaces irb unit 102 virtual-gateway-accept-data set interfaces irb unit 102 family inet address 10.1.102.2/24 virtual-gateway-address 10.1.102.254 set interfaces irb unit 103 virtual-gateway-accept-data set interfaces irb unit 103 family inet address 10.1.103.2/24 virtual-gateway-address 10.1.103.254 set interfaces lo0 unit 0 family inet address 10.1.255.2/32 set policy-options policy-statement VS_VLAN101_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN101_IMP term ESI then accept set policy-options policy-statement VS_VLAN101_IMP term VS_VLAN101 from community comm-VS_VLAN101 set policy-options policy-statement VS_VLAN101_IMP term VS_VLAN101 then accept set policy-options policy-statement VS_VLAN102_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN102_IMP term ESI then accept set policy-options policy-statement VS_VLAN102_IMP term VS_VLAN102 from community comm-VS_VLAN102 set policy-options policy-statement VS_VLAN102_IMP term VS_VLAN102 then accept set policy-options policy-statement VS_VLAN103_IMP term ESI from community comm-leaf set policy-options policy-statement VS_VLAN103_IMP term ESI then accept set policy-options policy-statement VS_VLAN103_IMP term VS_VLAN103 from community comm-VS_VLAN103 set policy-options policy-statement VS_VLAN103_IMP term VS_VLAN103 then accept set policy-options policy-statement lo0 from family inet set policy-options policy-statement lo0 from protocol direct set policy-options policy-statement lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 set policy-options policy-statement lo0 then accept set policy-options policy-statement load-balance term 1 then load-balance per-packet set policy-options community comm-VS_VLAN101 members target:65000:101 set policy-options community comm-VS_VLAN102 members target:65000:102 set policy-options community comm-VS_VLAN103 members target:65000:103 set policy-options community comm-leaf members target:65000:1 set routing-instances VRF_Tenant_A instance-type vrf set routing-instances VRF_Tenant_A interface irb.101 set routing-instances VRF_Tenant_A route-distinguisher 10.1.255.2:1010 set routing-instances VRF_Tenant_A vrf-target target:65000:101 set routing-instances VRF_Tenant_B instance-type vrf set routing-instances VRF_Tenant_B interface irb.102 set routing-instances VRF_Tenant_B route-distinguisher 10.1.255.2:1020 set routing-instances VRF_Tenant_B vrf-target target:65000:102 set routing-instances VRF_Tenant_C instance-type vrf set routing-instances VRF_Tenant_C interface irb.103 set routing-instances VRF_Tenant_C route-distinguisher 10.1.255.2:1030 set routing-instances VRF_Tenant_C vrf-target target:65000:103 set routing-instances VS_VLAN101 instance-type virtual-switch set routing-instances VS_VLAN101 protocols evpn encapsulation vxlan set routing-instances VS_VLAN101 protocols evpn extended-vni-list 101 set routing-instances VS_VLAN101 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN101 vtep-source-interface lo0.0 set routing-instances VS_VLAN101 bridge-domains bd101 vlan-id 101 set routing-instances VS_VLAN101 bridge-domains bd101 routing-interface irb.101 set routing-instances VS_VLAN101 bridge-domains bd101 vxlan vni 101 set routing-instances VS_VLAN101 route-distinguisher 10.1.255.2:101 set routing-instances VS_VLAN101 vrf-import VS_VLAN101_IMP set routing-instances VS_VLAN101 vrf-target target:65000:101 set routing-instances VS_VLAN102 instance-type virtual-switch set routing-instances VS_VLAN102 protocols evpn encapsulation vxlan set routing-instances VS_VLAN102 protocols evpn extended-vni-list 102 set routing-instances VS_VLAN102 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN102 vtep-source-interface lo0.0 set routing-instances VS_VLAN102 bridge-domains bd102 vlan-id 102 set routing-instances VS_VLAN102 bridge-domains bd102 routing-interface irb.102 set routing-instances VS_VLAN102 bridge-domains bd102 vxlan vni 102 set routing-instances VS_VLAN102 route-distinguisher 10.1.255.2:102 set routing-instances VS_VLAN102 vrf-import VS_VLAN102_IMP set routing-instances VS_VLAN102 vrf-target target:65000:102 set routing-instances VS_VLAN103 instance-type virtual-switch set routing-instances VS_VLAN103 protocols evpn encapsulation vxlan set routing-instances VS_VLAN103 protocols evpn extended-vni-list 103 set routing-instances VS_VLAN103 protocols evpn multicast-mode ingress-replication set routing-instances VS_VLAN103 vtep-source-interface lo0.0 set routing-instances VS_VLAN103 bridge-domains bd103 vlan-id 103 set routing-instances VS_VLAN103 bridge-domains bd103 routing-interface irb.103 set routing-instances VS_VLAN103 bridge-domains bd103 vxlan vni 103 set routing-instances VS_VLAN103 route-distinguisher 10.1.255.2:103 set routing-instances VS_VLAN103 vrf-import VS_VLAN103_IMP set routing-instances VS_VLAN103 vrf-target target:65000:103 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options forwarding-table export load-balance set routing-options forwarding-table ecmp-fast-reroute set protocols bgp group underlay type external set protocols bgp group underlay export lo0 set protocols bgp group underlay local-as 65002 set protocols bgp group underlay multipath multiple-as set protocols bgp group underlay neighbor 10.1.21.2 peer-as 65011 set protocols bgp group underlay neighbor 10.1.22.2 peer-as 65012 set protocols bgp group EVPN_VXLAN type internal set protocols bgp group EVPN_VXLAN local-address 10.1.255.2 set protocols bgp group EVPN_VXLAN family evpn signaling set protocols bgp group EVPN_VXLAN cluster 10.2.2.2 set protocols bgp group EVPN_VXLAN multipath set protocols bgp group EVPN_VXLAN neighbor 10.1.255.111 set protocols bgp group EVPN_VXLAN neighbor 10.1.255.112 set protocols bgp group EVPN_VXLAN neighbor 10.1.255.1
EX9200 配置
在 EX9200 交换机上,使用语 vlans
句代替 bridge-domains
,并且使用语 l3-interface
句代替 routing-interface
。
以下示例说明如何配置这些语句。此示例中为 MX 系列路由器显示的所有其他配置也适用于 EX9200 交换机。
set routing-instances VS_VLAN300 vlans vlan1300 vlan-id 300 set routing-instances VS_VLAN300 vlans vlan1300 l3-inteface irb.1300
在此示例中,无论在哪里 bridge-domains
使用 或 routing-interface
语句,要在 EX9200 交换机上进行配置,请改用 vlans
和 l3-interface
。
配置叶 1
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
配置 Leaf-2 的步骤与 Leaf-1 类似,因此我们将仅显示 Leaf-1 的分步过程。
要配置 Leaf-1,请执行以下操作:
-
设置系统主机名。
[edit] user@leaf-1# set system host-name leaf-1
-
配置路由选项。 load-balance 导出策略将在下一步中配置。
[edit] user@leaf-1# set routing-options router-id 10.1.255.111 user@leaf-1# set routing-options autonomous-system 65000 user@leaf-1# set routing-options forwarding-table export load-balance user@leaf-1# set routing-options forwarding-table ecmp-fast-reroute
-
配置负载平衡策略。
[edit policy-options policy-statement load-balance] user@leaf-1# set term 1 then load-balance per-packet
-
将底层 EBGP 配置到主干设备。 lo0 导出策略将在下一步中配置。
[edit] user@leaf-1# set protocols bgp group underlay type external user@leaf-1# set protocols bgp group underlay export lo0 user@leaf-1# set protocols bgp group underlay local-as 65111 user@leaf-1# set protocols bgp group underlay multipath multiple-as user@leaf-1# set protocols bgp group underlay neighbor 10.1.111.1 peer-as 65011 user@leaf-1# set protocols bgp group underlay neighbor 10.1.121.1 peer-as 65012
-
配置策略以将环路地址播发到底层。在此示例中,您通过仅匹配前缀长度为 /32 的直接路由,编写与环路地址无关的可移植策略。其结果是一个与任何环路地址匹配且可在拓扑中的所有设备中重复使用的策略。
[edit policy-options policy-statement lo0] user@leaf-1# set from family inet user@leaf-1# set from protocol direct user@leaf-1# set from route-filter 0.0.0.0/0 prefix-length-range /32-/32 user@leaf-1# set then accept
-
配置交换机选项 虚拟隧道端点接口为 lo0.0,必须可通过底层路由协议访问。路由识别符必须在网络中的所有交换机中是唯一的,以确保 MP-BGP 叠加网络中的所有路由通告都是全局唯一的。QFX 系列交换机上的 VRF 表目标至少是交换机发送到所有 ESI(Type-1)路由的社区。该
vrf-import vrf-imp
语句定义目标社区列表,该列表从表导入到实例中bgp.evpn.0
default-switch.evpn.0
。[edit] user@leaf-1# set switch-options vtep-source-interface lo0.0 user@leaf-1# set switch-options route-distinguisher 10.1.255.111:1 user@leaf-1# set switch-options vrf-import vrf-imp user@leaf-1# set switch-options vrf-target target:65000:1
-
配置 VRF 表导入策略。
[edit] user@leaf-1# set policy-options policy-statement vrf-imp term t1 from community com101 user@leaf-1# set policy-options policy-statement vrf-imp term t1 then accept user@leaf-1# set policy-options policy-statement vrf-imp term t2 from community com102 user@leaf-1# set policy-options policy-statement vrf-imp term t2 then accept user@leaf-1# set policy-options policy-statement vrf-imp term t3 from community com103 user@leaf-1# set policy-options policy-statement vrf-imp term t3 then accept user@leaf-1# set policy-options policy-statement vrf-imp term t5 then reject
-
配置相关社区。
[edit] user@leaf-1# set policy-options community com101 members target:65000:101 user@leaf-1# set policy-options community com102 members target:65000:102 user@leaf-1# set policy-options community com103 members target:65000:103
-
配置扩展虚拟网络标识符 (VNI) 列表以建立要成为 EVPN 域一部分的 VNI。您还可以配置入口复制;在 EVPN-VXLAN 中,入口复制用于处理组播,而无需支持组播的底层。在
vni-routing-options
下为每个 VXLAN 网络标识符实例指定了不同的路由目标。[edit] user@leaf-1# set protocols evpn encapsulation vxlan user@leaf-1# set protocols evpn multicast-mode ingress-replication user@leaf-1# set protocols evpn vni-options vni 101 vrf-target target:65000:101 user@leaf-1# set protocols evpn vni-options vni 102 vrf-target target:65000:102 user@leaf-1# set protocols evpn extended-vni-list 101 user@leaf-1# set protocols evpn extended-vni-list 102
-
将本地显著的 VLAN ID 映射到具有全局意义的 VXLAN 网络标识符。
[edit] user@leaf-1# set vlans v101 vlan-id 101 user@leaf-1# set vlans v101 vxlan vni 101 user@leaf-1# set vlans v102 vlan-id 102 user@leaf-1# set vlans v102 vxlan vni 102
-
配置支持 EVPN 的 IBGP 叠加会话。
[edit] user@leaf-1# set protocols bgp group EVPN_VXLAN_CORE type internal user@leaf-1# set protocols bgp group EVPN_VXLAN_CORE local-address 10.1.255.111 user@leaf-1# set protocols bgp group EVPN_VXLAN_CORE family evpn signaling user@leaf-1# set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.1 user@leaf-1# set protocols bgp group EVPN_VXLAN_CORE neighbor 10.1.255.2
注意:某些 IP 交换矩阵使用基于 EBGP 的 EVPN-VXLAN 叠加。有关同时将 EBGP 用于底层和叠加层的 IP 交换矩阵的示例,请参阅 示例:使用任播网关配置 EVPN-VXLAN 边缘路由桥接交换矩阵。请注意,叠加选择 EBGP 与 IBGP 不会影响交换矩阵架构。CRB 和边缘路由桥接 (ERB) 设计均支持任一叠加类型。
-
配置交换矩阵接口。
[edit] user@leaf-1# set interfaces xe-0/0/0 unit 0 family inet address 10.1.111.2/30 user@leaf-1# set interfaces xe-0/0/1 unit 0 family inet address 10.1.121.2/30
-
配置接入接口。再次注意,我们演示了用于服务器连接的接入接口和中继接口的混合。
[edit] user@leaf-1# set interfaces xe-0/0/2 ether-options 802.3ad ae0 user@leaf-1# set interfaces xe-0/0/3 unit 0 family ethernet-switching interface-mode trunk user@leaf-1# set interfaces xe-0/0/3 unit 0 family ethernet-switching vlan members v101
-
配置支持 LACP 的 LAG 接口。ESI 值在整个 EVPN 域中是全局唯一的。该
all-active
配置语句可确保此多宿主租户连接到的所有 PE 路由器都可以转发来自 CE 设备的流量,从而将主动使用所有 CE 链路。[edit] user@leaf-1# set interfaces ae0 esi 00:01:01:01:01:01:01:01:01:01 user@leaf-1# set interfaces ae0 esi all-active user@leaf-1# set interfaces ae0 aggregated-ether-options lacp active user@leaf-1# set interfaces ae0 aggregated-ether-options lacp system-id 00:00:00:01:01:01 user@leaf-1# set interfaces ae0 unit 0 family ethernet-switching interface-mode access user@leaf-1# set interfaces ae0 unit 0 family ethernet-switching vlan members v102
-
配置环路接口地址。
[edit] user@leaf-1# set interfaces lo0 unit 0 family inet address 10.1.255.111/32
配置主干-1
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
配置主干 2 的步骤与主干 1 类似,因此我们将只显示主干 1 的分步过程。
要配置主干 1,请执行以下操作:
-
设置系统主机名。
[edit] user@spine-1# set system host-name spine-1
-
配置路由选项。
[edit] user@spine-1# set routing-options router-id 10.1.255.11 user@spine-1# set routing-options autonomous-system 65000 user@spine-1# set routing-options forwarding-table export load-balance user@spine-1# set routing-options forwarding-table ecmp-fast-reroute
-
配置负载平衡策略。
[edit policy-options policy-statement load-balance] user@spine-1# set term 1 then load-balance per-packet
-
使用与叶设备和核心设备对等互连来配置 EBGP 底层。 lo0 在此步骤中应用播发 lo0 地址的策略;策略本身的配置将在下一步中显示。
[edit] user@spine-1# set protocols bgp group underlay type external user@spine-1# set protocols bgp group underlay export lo0 user@spine-1# set protocols bgp group underlay local-as 65011 user@spine-1# set protocols bgp group underlay multipath multiple-as user@spine-1# set protocols bgp group underlay neighbor 10.1.11.1 peer-as 65001 user@spine-1# set protocols bgp group underlay neighbor 10.1.21.1 peer-as 65002 user@spine-1# set protocols bgp group underlay neighbor 10.1.111.2 peer-as 65111 user@spine-1# set protocols bgp group underlay neighbor 10.1.112.2 peer-as 65112
-
配置名为 lo0 播发 /32 路由的策略。策略在环路地址上匹配,不指定任何特定 IP。这样,同一策略即可在任何交换矩阵设备上重复使用。
[edit policy-options policy-statement lo0] user@spine-1# set from family inet user@spine-1# set from protocol direct user@spine-1# set from route-filter 0.0.0.0/0 prefix-length-range /32-/32 user@spine-1# set then accept
配置 Core-1
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
配置 Core-2 的步骤与 Core-1 类似,因此我们只会显示 Core-1 的分步过程。
要配置 Core-1:
-
设置系统主机名。
[edit] user@core-1# set system host-name core-1
-
配置路由选项。 load-balance 在此步骤中应用策略。在下一步中创建策略
[edit] user@core-1# set routing-options router-id 10.1.255.1 user@core-1# set routing-options autonomous-system 65000 user@core-1# set routing-options forwarding-table export load-balance user@core-1# set routing-options forwarding-table ecmp-fast-reroute
-
配置名为 load-balance的负载平衡策略。
[edit policy-options policy-statement load-balance] user@core-1# set term 1 then load-balance per-packet
-
配置 BGP 底层对等互连。 lo0 在此步骤中应用播发环路地址的策略。您将在下一步中配置此策略。
[edit] user@core-1# set protocols bgp group underlay type external user@core-1# set protocols bgp group underlay export lo0 user@core-1# set protocols bgp group underlay local-as 65001 user@core-1# set protocols bgp group underlay multipath multiple-as user@core-1# set protocols bgp group underlay neighbor 10.1.11.2 peer-as 65011 user@core-1# set protocols bgp group underlay neighbor 10.1.12.2 peer-as 65012
-
配置名为
lo0
以通告环路由的策略。[edit policy-options policy-statement lo0] user@core-1# set from family inet user@core-1# set from protocol direct user@core-1# set lo0 from route-filter 0.0.0.0/0 prefix-length-range /32-/32 user@core-1# set lo0 then accept
-
Core-1 的很大一部分配置发生在层次结构中
[routing-instance]
。配置虚拟路由器,并为每个虚拟交换机配置唯一的 VRF 表导入策略。[edit] user@core-1# set routing-instances VRF_Tenant_A instance-type vrf user@core-1# set routing-instances VRF_Tenant_A interface irb.101 user@core-1# set routing-instances VRF_Tenant_A route-distinguisher 10.1.255.1:1010 user@core-1# set routing-instances VRF_Tenant_A vrf-target target:65000:101 user@core-1# set routing-instances VRF_Tenant_B instance-type vrf user@core-1# set routing-instances VRF_Tenant_B interface irb.102 user@core-1# set routing-instances VRF_Tenant_B route-distinguisher 10.1.255.1:1020 user@core-1# set routing-instances VRF_Tenant_B vrf-target target:65000:102 user@core-1# set routing-instances VRF_Tenant_C instance-type vrf user@core-1# set routing-instances VRF_Tenant_C interface irb.103 user@core-1# set routing-instances VRF_Tenant_C route-distinguisher 10.1.255.1:1030 user@core-1# set routing-instances VRF_Tenant_C vrf-target target:65000:103 user@core-1# set routing-instances VS_VLAN101 instance-type virtual-switch user@core-1# set routing-instances VS_VLAN101 protocols evpn encapsulation vxlan user@core-1# set routing-instances VS_VLAN101 protocols evpn extended-vni-list 101 user@core-1# set routing-instances VS_VLAN101 protocols evpn multicast-mode ingress-replication user@core-1# set routing-instances VS_VLAN101 vtep-source-interface lo0.0 user@core-1# set routing-instances VS_VLAN101 bridge-domains bd101 vlan-id 101 user@core-1# set routing-instances VS_VLAN101 bridge-domains bd101 routing-interface irb.101 user@core-1# set routing-instances VS_VLAN101 bridge-domains bd101 vxlan vni 101 user@core-1# set routing-instances VS_VLAN101 route-distinguisher 10.1.255.1:101 user@core-1# set routing-instances VS_VLAN101 vrf-import VS_VLAN101_IMP user@core-1# set routing-instances VS_VLAN101 vrf-target target:65000:101 user@core-1# set routing-instances VS_VLAN102 instance-type virtual-switch user@core-1# set routing-instances VS_VLAN102 protocols evpn encapsulation vxlan user@core-1# set routing-instances VS_VLAN102 protocols evpn extended-vni-list 102 user@core-1# set routing-instances VS_VLAN102 protocols evpn multicast-mode ingress-replication user@core-1# set routing-instances VS_VLAN102 vtep-source-interface lo0.0 user@core-1# set routing-instances VS_VLAN102 bridge-domains bd102 vlan-id 102 user@core-1# set routing-instances VS_VLAN102 bridge-domains bd102 routing-interface irb.102 user@core-1# set routing-instances VS_VLAN102 bridge-domains bd102 vxlan vni 102 user@core-1# set routing-instances VS_VLAN102 route-distinguisher 10.1.255.1:102 user@core-1# set routing-instances VS_VLAN102 vrf-import VS_VLAN102_IMP user@core-1# set routing-instances VS_VLAN102 vrf-target target:65000:102 user@core-1# set routing-instances VS_VLAN103 instance-type virtual-switch user@core-1# set routing-instances VS_VLAN103 protocols evpn encapsulation vxlan user@core-1# set routing-instances VS_VLAN103 protocols evpn extended-vni-list 103 user@core-1# set routing-instances VS_VLAN103 protocols evpn multicast-mode ingress-replication user@core-1# set routing-instances VS_VLAN103 vtep-source-interface lo0.0 user@core-1# set routing-instances VS_VLAN103 bridge-domains bd103 vlan-id 103 user@core-1# set routing-instances VS_VLAN103 bridge-domains bd103 routing-interface irb.103 user@core-1# set routing-instances VS_VLAN103 bridge-domains bd103 vxlan vni 103 user@core-1# set routing-instances VS_VLAN103 route-distinguisher 10.1.255.1:103 user@core-1# set routing-instances VS_VLAN103 vrf-import VS_VLAN103_IMP user@core-1# set routing-instances VS_VLAN103 vrf-target target:65000:103
-
为每个路由实例配置策略。
[edit policy-options] user@core-1# set policy-statement VS_VLAN101_IMP term ESI from community comm-leaf user@core-1# set policy-statement VS_VLAN101_IMP term ESI then accept user@core-1# set policy-statement VS_VLAN101_IMP term VS_VLAN101 from community comm-VS_VLAN101 user@core-1# set policy-statement VS_VLAN101_IMP term VS_VLAN101 then accept user@core-1# set policy-statement VS_VLAN102_IMP term ESI from community comm-leaf user@core-1# set policy-statement VS_VLAN102_IMP term ESI then accept user@core-1# set policy-statement VS_VLAN102_IMP term VS_VLAN102 from community comm-VS_VLAN102 user@core-1# set policy-statement VS_VLAN102_IMP term VS_VLAN102 then accept user@core-1# set policy-statement VS_VLAN103_IMP term ESI from community comm-leaf user@core-1# set policy-statement VS_VLAN103_IMP term ESI then accept user@core-1# set policy-statement VS_VLAN103_IMP term VS_VLAN103 from community comm-VS_VLAN103 user@core-1# set policy-statement VS_VLAN103_IMP term VS_VLAN103 then accept
-
配置社区。确保 comm-leaf 策略接受使用目标 65000:1 标记的路由。这可以确保所有虚拟交换机从所有叶导入 Type-1 ESI 路由。
[edit] user@core-1# set policy-options community comm-VS_VLAN101 members target:65000:101 user@core-1# set policy-options community comm-VS_VLAN102 members target:65000:102 user@core-1# set policy-options community comm-VS_VLAN103 members target:65000:103 user@core-1# set policy-options community comm-leaf members target:65000:1
-
配置 IRB 接口。每个 IRB 都有一个虚拟网关地址,这是核心 1 和核心 2 之间共享的 MAC 地址和 IP 地址。
[edit interfaces irb] user@core-1# set unit 101 virtual-gateway-accept-data user@core-1# set unit 101 family inet address 10.1.101.1/24 virtual-gateway-address 10.1.101.254 user@core-1# set unit 102 virtual-gateway-accept-data user@core-1# set unit 102 family inet address 10.1.102.1/24 virtual-gateway-address 10.1.102.254 user@core-1# set unit 103 virtual-gateway-accept-data user@core-1# set unit 103 family inet address 10.1.103.1/24 virtual-gateway-address 10.1.103.254
-
配置面向叶 1 和叶 2 的 IBGP 叠加会话。我们在核心设备之间提供了对等互连,以便在核心设备之间共享路由。
[edit] user@core-1# set protocols bgp group EVPN_VXLAN type internal user@core-1# set protocols bgp group EVPN_VXLAN local-address 10.1.255.1 user@core-1# set protocols bgp group EVPN_VXLAN family evpn signaling user@core-1# set protocols bgp group EVPN_VXLAN cluster 10.1.1.1 user@core-1# set protocols bgp group EVPN_VXLAN multipath user@core-1# set protocols bgp group EVPN_VXLAN neighbor 10.1.255.111 user@core-1# set protocols bgp group EVPN_VXLAN neighbor 10.1.255.112 user@core-1# set protocols bgp group EVPN_VXLAN neighbor 10.1.255.2
验证
- 验证单宿主 CE 设备的 MAC 可访问性(叶 1)
- 验证单宿主 CE 设备 (Type-2) 的 MAC 可访问性
- 验证导入的路由
- 验证第 2 层地址学习守护程序副本
- 验证内核级转发表
- 验证多宿主 CE 设备的 MAC 可访问性
- 验证多宿主 CE 设备的 EVPN、第 2 层地址学习守护程序和内核转发表
验证单宿主 CE 设备的 MAC 可访问性(叶 1)
目的
验证 MAC 对 Tenant_A 的可访问性。此用户单宿主到 Leaf-1。首先,验证是否在叶 1 上本地学习了 MAC 地址。叶 1 只有在学习了 MAC 地址后才会生成 2 类 EVPN 路由。
行动
验证是否在叶 1 上本地学习了 MAC 地址。
lab@leaf-1> show ethernet-switching table vlan-id 101 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 : 4 entries, 4 learned Routing instance : default-switch Vlan MAC MAC Logical SVLBNH/ Active name address flags interface VENH Index source v101 00:00:5e:00:01:01 DRP esi.1749 05:00:00:fd:e8:00:00:00:65:00 v101 2c:6b:f5:54:95:f0 DR vtep.32770 10.1.255.2 v101 2c:6b:f5:ef:73:f0 DR vtep.32769 10.1.255.1 v101 56:04:15:00:bb:02 D xe-0/0/3.0
意义
输出显示已成功从 Tenant_A CE 设备(即 xe-0/0/3.0 接口上的服务器 A)获知 MAC 56:04:15:00:bb:02。
验证单宿主 CE 设备 (Type-2) 的 MAC 可访问性
目的
验证单宿主 CE 设备 (Type-2) 的 MAC 可访问性
行动
验证生成到 Core-1 的 Type-2 路由。
lab@leaf-1> show route advertising-protocol bgp 10.1.255.1 evpn-mac-address 56:04:15:00:bb:02 bgp.evpn.0: 50 destinations, 91 routes (50 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path 2:10.1.255.111:1::101::56:04:15:00:bb:02/304 MAC/IP * Self 100 I 2:10.1.255.111:1::101::56:04:15:00:bb:02::10.1.101.101/304 MAC/IP * Self 100 I default-switch.evpn.0: 47 destinations, 87 routes (47 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path 2:10.1.255.111:1::101::56:04:15:00:bb:02/304 MAC/IP * Self 100 I 2:10.1.255.111:1::101::56:04:15:00:bb:02::10.1.101.101/304 MAC/IP * Self 100 I __default_evpn__.evpn.0: 3 destinations, 4 routes (3 active, 0 holddown, 0 hidden)
意义
输出显示正在播发 MAC 和 MAC/IP。
在 Core-1 上,接收 EVPN Type-2 路由 bgp.evpn.0
。
lab@core-1> show route receive-protocol bgp 10.1.255.111 evpn-mac-address 56:04:15:00:bb:02 extensive table bgp.evpn.0 bgp.evpn.0: 52 destinations, 68 routes (52 active, 0 holddown, 0 hidden) * 2:10.1.255.111:1::101::56:04:15:00:bb:02/304 MAC/IP (2 entries, 1 announced) Import Accepted Route Distinguisher: 10.1.255.111:1 Route Label: 101 ESI: 00:00:00:00:00:00:00:00:00:00 Nexthop: 10.1.255.111 Localpref: 100 AS path: I Communities: target:65000:101 encapsulation:vxlan(0x8) * 2:10.1.255.111:1::101::56:04:15:00:bb:02::10.1.101.101/304 MAC/IP (2 entries, 1 announced) Import Accepted Route Distinguisher: 10.1.255.111:1 Route Label: 101 ESI: 00:00:00:00:00:00:00:00:00:00 Nexthop: 10.1.255.111 Localpref: 100 AS path: I Communities: target:65000:101 encapsulation:vxlan(0x8)
输出显示 56:04:15:00:bb:02 的 Type-2 路由。路由区分符来自 Leaf-1,设置为 10.1.255.111:1。
验证导入的路由
目的
验证是否已导入 EVPN Type-2 路由。
行动
在 Core-1 上,验证 EVPN Type-2 路由是否已成功从 bgp.evpn.0
表导入到 EVPN 交换机实例中。
意义
输出显示,在 Tenant_A 的虚拟交换机中,EVPN Type-2 路由使用正确的目标 target:1:101 进行播发。 extensive
使用选项更详细地查看 Type-2 路由。
lab@core-1> show route table VS_VLAN101.evpn.0 evpn-mac-address 56:04:15:00:bb:02 VS_VLAN101.evpn.0: 18 destinations, 25 routes (18 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 2:10.1.255.111:1::101::56:04:15:00:bb:02/304 MAC/IP *[BGP/170] 1w1d 20:50:01, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 [BGP/170] 3d 02:56:43, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 2:10.1.255.111:1::101::56:04:15:00:bb:02::10.1.101.101/304 MAC/IP *[BGP/170] 1w1d 20:50:01, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 [BGP/170] 3d 02:56:43, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0
输出显示 Core-1 接收两个副本。第一个是来自 Leaf-1 的广告(来源:10.1.255.111)。第二个是来自 Core-2 的广告(来源:10.1.255.2)。
验证第 2 层地址学习守护程序副本
目的
验证第 2 层地址学习守护程序副本。
行动
输入 show bridge-mac table
命令,验证第 2 层地址学习守护程序副本。
意义
输出显示 56:04:15:00:bb:02 可通过叶 1 的 vtep.32771 逻辑接口访问。
lab@core-1> show bridge mac-table instance VS_VLAN101 MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC O -OVSDB MAC, SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC, P -Pinned MAC, FU - Fast Update) Routing instance : VS_VLAN101 Bridging domain : bd101, VLAN : 101 MAC MAC Logical Active address flags interface source 00:00:5e:00:01:01 DRP esi.722 05:00:00:fd:e8:00:00:00:65:00 2c:6b:f5:54:95:f0 DR vtep.32779 10.1.255.2 56:04:15:00:bb:02 DR vtep.32771 10.1.255.111
在 EX9200 交换机上,命令 show ethernet-switching table-instance instance-name
与 show bridge mac-table instance instance-name
此处用于 MX 系列路由器的命令相对应
验证内核级转发表
目的
验证内核级转转发表、下一跳标识符以及第 2 层 MAC 表和硬件。
行动
查询内核级转转发表,将索引下一跳标识符与正确的虚拟网络标识符相关联,并查看第 2 层 MAC 表和硬件。
意义
Tenant_A 的 MAC 56:04:15:00:bb:02 可通过索引 687 访问。
lab@core-1> show route forwarding-table family bridge vpn VS_VLAN101 Routing table: VS_VLAN101.evpn-vxlan VPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 664 1 vtep.32771 intf 0 comp 687 7 vtep.32774 intf 0 comp 691 4 vtep.32779 intf 0 comp 716 7 Routing table: VS_VLAN101.evpn-vxlan Bridging domain: bd101.evpn-vxlan VPLS: Enabled protocols: Bridging, ACKed by all peers, EVPN VXLAN, Destination Type RtRef Next hop Type Index NhRef Netif 00:00:5e:00:01:01/48 user 0 indr 1048579 2 comp 722 2 2c:6b:f5:54:95:f0/48 user 0 comp 716 7 56:04:15:00:bb:02/48 user 0 comp 687 7 0x30003/51 user 0 comp 705 2
将索引 687 (NH-ID) 与正确的虚拟网络标识符 101 和 10.1.255.111 的远程 VTEP-ID 相关联。
lab@core-1> show l2-learning vxlan-tunnel-end-point remote Logical System Name Id SVTEP-IP IFL L3-Idx SVTEP-Mode ELP-SVTEP-IP <default> 0 10.1.255.1 lo0.0 0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.2 VS_VLAN101 377 vtep.32779 716 RNVE VNID MC-Group-IP 101 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.111 VS_VLAN101 369 vtep.32771 687 RNVE VNID MC-Group-IP 101 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.112 VS_VLAN101 372 vtep.32774 691 RNVE 10.1.255.2 VS_VLAN102 376 vtep.32778 715 RNVE VNID MC-Group-IP 102 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.111 VS_VLAN102 370 vtep.32772 688 RNVE VNID MC-Group-IP 102 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.112 VS_VLAN102 373 vtep.32775 695 RNVE VNID MC-Group-IP 102 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.2 VS_VLAN103 375 vtep.32777 714 RNVE VNID MC-Group-IP 103 0.0.0.0 RVTEP-IP L2-RTT IFL-Idx Interface NH-Id RVTEP-Mode ELP-IP Flags 10.1.255.111 VS_VLAN103 371 vtep.32773 689 RNVE 10.1.255.112 VS_VLAN103 374 vtep.32776 692 RNVE VNID MC-Group-IP 103 0.0.0.0
在 EX9200 交换机上,命令 show ethernet-switching
与 show l2-learning
此处适用于 MX 系列路由器的命令 show 相对应。
验证多宿主 CE 设备的 MAC 可访问性
目的
验证叶 1 和叶 2 上多宿主 Tenant_B CE 设备的 MAC 可访问性。
行动
验证叶 1 和叶 2 是否正在向多宿主 CE 设备通告 Type-1 和 Type-2 可访问性。
lab@leaf-1> show ethernet-switching table vlan-id 102 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 : 4 entries, 4 learned Routing instance : default-switch Vlan MAC MAC Logical SVLBNH/ Active name address flags interface VENH Index source v102 00:00:5e:00:01:01 DR esi.1748 05:00:00:fd:e8:00:00:00:66:00 v102 2c:6b:f5:43:12:c0 DL ae0.0 v102 2c:6b:f5:54:95:f0 D vtep.32770 10.1.255.2 v102 2c:6b:f5:ef:73:f0 D vtep.32769 10.1.255.1 lab@leaf-2> show ethernet-switching table vlan-id 102 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 : 4 entries, 4 learned Routing instance : default-switch Vlan MAC MAC Logical SVLBNH/ Active name address flags interface VENH Index source v102 00:00:5e:00:01:01 DR esi.1749 05:00:00:fd:e8:00:00:00:66:00 v102 2c:6b:f5:43:12:c0 DR ae0.0 v102 2c:6b:f5:54:95:f0 D vtep.32769 10.1.255.2 v102 2c:6b:f5:ef:73:f0 D vtep.32770 10.1.255.1
意义
输出显示 2c:6b:f5:43:12:c0 表示连接到叶 1 和叶 2 的Tenant_B的 MAC。
验证多宿主 CE 设备的 EVPN、第 2 层地址学习守护程序和内核转发表
目的
验证租户 B 的 EVPN 表、核心 1 的第 2 层地址学习守护程序表和内核转发表。
行动
在 Core-1 中,显示租户 B 的 EVPN 表。
lab@core-1> show route table VS_VLAN102.evpn.0 VS_VLAN102.evpn.0: 20 destinations, 29 routes (20 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:10.1.255.2:0::050000fde80000006600::FFFF:FFFF/192 AD/ESI *[BGP/170] 2d 23:43:32, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 1:10.1.255.111:0::010101010101010101::FFFF:FFFF/192 AD/ESI *[BGP/170] 00:14:59, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:14:58, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 1:10.1.255.111:1::010101010101010101::0/192 AD/EVI *[BGP/170] 00:15:00, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:14:59, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 1:10.1.255.112:0::010101010101010101::FFFF:FFFF/192 AD/ESI *[BGP/170] 00:10:13, localpref 100, from 10.1.255.112 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:10:13, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 1:10.1.255.112:1::010101010101010101::0/192 AD/EVI *[BGP/170] 00:10:14, localpref 100, from 10.1.255.112 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:10:14, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.1:102::102::00:00:5e:00:01:01/304 MAC/IP *[EVPN/170] 2d 23:44:03 Indirect 2:10.1.255.1:102::102::2c:6b:f5:ef:73:f0/304 MAC/IP *[EVPN/170] 2d 23:44:03 Indirect 2:10.1.255.2:102::102::00:00:5e:00:01:01/304 MAC/IP *[BGP/170] 2d 23:43:32, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.2:102::102::2c:6b:f5:54:95:f0/304 MAC/IP *[BGP/170] 2d 23:43:32, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.111:1::102::2c:6b:f5:43:12:c0/304 MAC/IP *[BGP/170] 00:14:49, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:14:49, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified to 10.1.11.2 via xe-0/2/0.0 > to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.112:1::102::2c:6b:f5:43:12:c0/304 MAC/IP *[BGP/170] 00:09:24, localpref 100, from 10.1.255.112 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:09:24, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.1:102::102::00:00:5e:00:01:01::10.1.102.254/304 MAC/IP *[EVPN/170] 2d 23:44:03 Indirect 2:10.1.255.1:102::102::2c:6b:f5:ef:73:f0::10.1.102.1/304 MAC/IP *[EVPN/170] 2d 23:44:03 Indirect 2:10.1.255.2:102::102::00:00:5e:00:01:01::10.1.102.254/304 MAC/IP *[BGP/170] 2d 23:43:32, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.2:102::102::2c:6b:f5:54:95:f0::10.1.102.2/304 MAC/IP *[BGP/170] 2d 23:43:32, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 2:10.1.255.112:1::102::2c:6b:f5:43:12:c0::10.1.102.101/304 MAC/IP *[BGP/170] 00:06:19, localpref 100, from 10.1.255.112 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:06:18, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 3:10.1.255.1:102::102::10.1.255.1/248 IM *[EVPN/170] 2d 23:45:49 Indirect 3:10.1.255.2:102::102::10.1.255.2/248 IM *[BGP/170] 2d 23:44:03, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 3:10.1.255.111:1::102::10.1.255.111/248 IM *[BGP/170] 00:14:58, localpref 100, from 10.1.255.111 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:14:58, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 3:10.1.255.112:1::102::10.1.255.112/248 IM *[BGP/170] 00:10:17, localpref 100, from 10.1.255.112 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0 [BGP/170] 00:10:17, localpref 100, from 10.1.255.2 AS path: I, validation-state: unverified > to 10.1.11.2 via xe-0/2/0.0 to 10.1.12.2 via xe-0/2/1.0
显示 Core-1 的第 2 层地址学习守护程序表。
lab@core-1> show bridge mac-table instance VS_VLAN102 MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC O -OVSDB MAC, SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC, P -Pinned MAC, FU - Fast Update) Routing instance : VS_VLAN102 Bridging domain : bd102, VLAN : 102 MAC MAC Logical Active address flags interface source 00:00:5e:00:01:01 DRP esi.708 05:00:00:fd:e8:00:00:00:66:00 2c:6b:f5:43:12:c0 DR esi.719 00:01:01:01:01:01:01:01:01:01 2c:6b:f5:54:95:f0 DR vtep.32772 10.1.255.2
在 EX9200 交换机上,命令 show ethernet-switching table-instance instance-name
与此处适用于 MX 系列路由器的命令 show bridge mac-table instance instance-name
show 相对应
显示 Core-1 的内核转发表。
lab@core-1> show route forwarding-table vpn VS_VLAN102 Routing table: VS_VLAN102.evpn-vxlan VPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 544 1 vtep.32772 intf 0 comp 688 7 vtep.32775 intf 0 comp 716 5 vtep.32778 intf 0 comp 722 5 Routing table: VS_VLAN102.evpn-vxlan Bridging domain: bd102.evpn-vxlan VPLS: Enabled protocols: Bridging, ACKed by all peers, EVPN VXLAN, Destination Type RtRef Next hop Type Index NhRef Netif 00:00:5e:00:01:01/48 user 0 indr 1048574 2 comp 708 2 2c:6b:f5:43:12:c0/48 user 0 indr 1048578 3 comp 719 2 2c:6b:f5:54:95:f0/48 user 0 comp 688 7 0x30004/51 user 0 comp 702 2
意义
对于 Tenant_B CE 设备,ESI 列出了四种不同的路由: 00:01:01:01:01:01:01:01:01:
-
1:10.1.255.111:0::010101010101010101::FFFF:FFFF/192 AD/ESI
此每以太网分段 A-D Type-1 EVPN 路由源自叶 1。路由识别符是从全局级
routing-options
获得的。Core-1 接收源自 Leaf-1 的 Type-1 路由,该路由来自 Leaf-1 和 Leaf-2。 -
1:10.1.255.111:1::010101010101010101::0/192 AD/EVI
这是按 EVI A-D Type-1 EVPN 路由。路由识别符是从路由实例获取的,如果是 QFX5100,则为
switch-options
.Core-1 接收源自 Leaf-1 的 Type-1 路由,该路由来自 Leaf-1 和 Leaf-2。 -
1:10.1.255.112:0::010101010101010101::FFFF:FFFF/192 AD/ESI
这是源自叶 2 的每以太网段 A-D Type-1 EVPN 路由。路由识别符是从全局级
routing-options
获得的。Core-1 接收源自 Leaf-2 的 Type-1 路由,该路由来自 Leaf-2 和 Leaf-1。 -
1:10.1.255.112:1::010101010101010101::0/192 AD/EVI
这是按 EVI A-D Type-1 EVPN 路由。路由识别符是从路由实例获取的,如果是 QFX5100,
switch-options
则为 。Core-1 接收源自 Leaf-2 的 Type-1 路由,该路由来自 Leaf-2 和 Leaf-1。
与Tenant_B多宿主 CE 设备关联的两个物理 MAC 和一个虚拟 MAC 的 Type-2 路由按预期发出。
从输出中,我们还无法确定用于转发到 ESI 的 VTEP 00:01:01:01:01:01:01:01:01:01:01:01。要确定 VTEPS,请显示 VXLAN 隧道端点 ESI。
lab@core-1> show l2-learning vxlan-tunnel-end-point esi ESI RTT VLNBH INH ESI-IFL LOC-IFL #RVTEPs 00:01:01:01:01:01:01:01:01:01 VS_VLAN101 718 1048577 esi.718 2 Aliasing RVTEP-IP RVTEP-IFL VENH MASK-ID FLAGS MAC-COUNT 10.1.255.112 vtep.32779 723 1 2 0 10.1.255.111 vtep.32774 714 0 2 0 ...
在 EX9200 交换机上,命令 show ethernet-switching
与 show l2-learning
此处适用于 MX 系列路由器的命令 show 相对应。
输出显示了此 ESI 上 MAC 地址对叶 1 和叶 2 的 VTEP 接口上的主动负载平衡,这将验证叶 1 和叶 2 上的全活动配置。