EVPN-VXLAN 轻型叶到服务器环路检测
配置 EVPN-VXLAN 轻型叶到服务器环路检测,以快速检测和中断叶到服务器端口端下游的局域网 (LAN) 以太网环路。此功能可检测并断开环路:
-
交换矩阵组件的接线不准确。
-
第三方交换机到 EVPN 交换矩阵设备的接线不准确或配置错误(例如,在连接客户边缘 (CE) 交换机时)。
此功能有助于修复 EVPN 控制平面无法检测到的环路,而不必依赖 BGP EVPN 信令的状态。
配置此功能后,设备会将提供商边缘 (PE) 上的定期组播 PDU(基于连接故障管理 [CFM] PDU) 传输至 CE 接口,以便进行环路检测。然后,设备可以在接收这些自生成的 PDU 后阻止接口。当设备收到环路检测 PDU 时,它会通过阻止(操作上关闭)入口端口来中断环路。
设备在环路检测 (CFMD_LOOP_DETECTED) 和环路被清除时也会记录错误消息 (CFMD_LOOP_CLEARED)。
如果需要,中断并清除环路。要使接口重新联机,可以在层次结构级别使用 revert-interval seconds
语句 [edit protocols loop-detect interface name]
配置恢复间隔。恢复间隔到期后,设备会自动使接口重新联机。默认恢复间隔为 0 秒,这意味着间隔永不过期,接口不会自动恢复到先前状态。
如果未显式配置 0 以外的恢复间隔,则端口永远不会在环路检测事件和操作之前恢复到其状态。要手动使接口重新联机,必须使用命令清除状态 clear loop-detect enhanced interface name
。
我们支持此环路检测功能:
-
聚合以太网 (AE) 接口。
注意:在启用了链路聚合控制协议 (LACP) 的 AE 接口上,即使环路检测操作使逻辑接口关闭,LACP 状态也会保持运行(收集或分发中)。
-
中继和企业样式的接口配置,包括带有本机 VLAN ID 和其他 VLAN 的中继接口的逻辑接口。
-
服务提供商风格的接口配置 — 从 QFX10002-60C、QFX10002、QFX10008 和 QFX10016 交换机上的 Junos OS 22.4R1 版开始。
环路检测场景
以下三个环路检测场景表明,可以形成具有不同以太网分段标识符 (EIS)的环路,其 ESI 相同或没有 ESI。
当不同 ESI 发生环路时,您可以启用一系列交换矩阵路由器 ID,设备可触发环路检测(必需)。或者,您可以使用基于 EVPN Type 1 自动发现路由信令的路由器 ID 自动构建列表(可选)。

当同一 ESI 发生环路时,CE 交换机在连接到叶 1 和叶 3 时不会使用相同的桥接接口。

当其中一个环路端口没有 ESI 时,环路会通过 CE 交换机从叶 1 到叶 3。

使用 2 层心跳环路检测 PE-CE 用例
以下两个用例显示,由于交换机配置错误(用例 1),或者由于交换机上的电缆连接不一致(用例 2)而导致环路通过交换机发生。在以下两个用例中,功能不依赖于控制平面播发的 BGP 速度,而且这种轻量级 PC-CE 环路检测独立于配置的 ESI 值。
EVPN-VXLAN 轻型叶服务器环路检测用例 1
在此第一种情况下,环路发生在 Leaf3 上。CE-switch1 和 CE-switch2 不支持 CFM。叶 1 和叶 3 支持 CFM。第 2 层 (L2) 数据包 CFM 使用专有类型、长度、值 (TLV) 格式。

EVPN-VXLAN 轻型叶到服务器环路检测用例 2
L2 数据包 CFM 使用专有类型、长度和值 (TLV),环路发生在叶 1 上。轻量环路检测不依赖于 BGP 的速度,MAC 路由反射速度,以及大型 DC 交换矩阵中的重复 MAC 或 MAC 移动检测,它与 BGP EVPN 信令的状态无关。

在逻辑接口上启用环路检测
要启用环路检测,在 loop-detect enhanced interface logical-interface-name
层级使用语句 [edit protocols]
。
使用中继模式企业样式接口的配置示例
以下示例配置可在接口 ge-0/0/1.0 上进行环路检测,接口为 100 的 vlan-id
中继接口。
set interfaces ge-0/0/1.0 unit 0 family ethernet-switching interface-mode trunk set interfaces ge-0/0/1.0 unit 0 family ethernet-switching vlan members [ v100 v101 v102 v103 v104 ] set protocols evpn loop-detect enhanced interface ge-0/0/1.0 vlan-id 100 set protocols evpn loop-detect enhanced interface ge-0/0/1.0 loop-detect-action interface-down set protocols evpn loop-detect enhanced interface ge-0/0/1.0 transmit-interval 1s set protocols evpn loop-detect enhanced interface ge-0/0/1.0 revert-interval 50s
具有服务提供商样式接口的配置示例
以下示例配置可通过服务提供商样式接口配置对 vlan-id
提供商边缘 (PE) 和 CE 设备上的 100 进行环路检测。此配置未指定恢复间隔。因此,在设备检测到环路并纠正环路后,输入 clear loop detect enhanced interface name
命令以使接口重新联机。
PE 设备配置:
set interfaces xe-0/0/0 flexible-vlan-tagging set interfaces xe-0/0/0 encapsulation flexible-ethernet-services set interfaces xe-0/0/0 unit 10 encapsulation vlan-bridge set interfaces xe-0/0/0 unit 10 vlan-id 100 set protocols loop-detect enhanced interface xe-0/0/0.10 vlan-id 100 set vlans vlan100 vlan-id 100 set vlans vlan100 interface xe-0/0/0.10
CE 设备配置:
set interfaces xe-0/0/3 flexible-vlan-tagging set interfaces xe-0/0/3 encapsulation flexible-ethernet-services set interfaces xe-0/0/3 unit 10 encapsulation vlan-bridge set interfaces xe-0/0/3 unit 10 vlan-id 100 set protocols loop-detect enhanced interface xe-0/0/3.10 vlan-id 100 set vlans vlan100 vlan-id 100 set vlans vlan100 interface xe-0/0/3.10
显示或清除环路检测状态的 CLI 命令
使用 show loop-detect 增强型接口 命令可在某个接口或所有接口上显示环路状态。
在设备检测到环路并应用配置的操作以断开环路后,使用 明环检测增强接口 命令将接口或所有接口还原到先前的状态。
显示命令,没有任何环路
user@leaf-device# run show loop-detect enhanced interface Interface :ge-0/0/1.0 Vlan-id :100 ESI :00:00:00:00:00:00:00:00:00:00 Current status :Normal[Link Up] Last loop-detect time :- Receive statistics :0 Action configured :Interface-down Action count :0 Transmit Interval :1s Revert Interval :60s
显示带有环路检测状态的命令
user@leaf-device# run show loop-detect enhanced interface Interface :ge-0/0/1.0 Vlan-id :100 ESI :00:00:00:00:00:00:00:00:00:00 Current status :Loop-detected Remote Host :leaf04 Remote Chassis :94:f7:ad:94:dd:40 Remote Interface :xe-0/0/2.0 Remote ESI :00:00:00:00:00:00:00:00:00:00 Last loop-detect time :Tue May 26 04:36:37 2020 Receive statistics :4 Action configured :Interface-down Action count :1 Transmit Interval :1s Revert Interval :60s