示例:在支持 ELS 的 QFX 系列和 EX 系列交换机上配置以太网环网保护交换
您可以在连接的 EX 系列或 QFX 系列交换机上配置以太网环网保护交换 (ERPS),以防止致命环路中断网络。ERPS 与生成树协议类似,但 ERPS 是专为环形拓扑定制的,因此效率更高。您必须连接并配置至少三台交换机才能形成一个环状。
此示例说明如何在支持 ELS 的四台交换机上配置以太网环网保护交换,这些交换机在环形拓扑中的专用链路上相互连接。您可以在 ERPS 环中包括不同类型的交换机,包括那些有或没有 ELS 支持的交换机。如果任何 EX 系列交换机运行的软件不支持 ELS,请使用以下配置说明:示例:在 EX 系列交换机上配置以太网环网保护交换。有关 ELS 的详细信息,请参阅 使用增强型第 2 层软件 CLI。
要求
此示例使用以下硬件和软件组件:
四台连接的 EX 系列交换机或 QFX 系列交换机,支持增强型第 2 层软件 (ELS) 作为环形拓扑中的节点运行。您可以使用以下任一 QFX 系列交换机:QFX5100、QFX5200 和 QFX10000。此配置还适用于支持在 EX4300、EX4600、EX2300 和 EX3400 交换机上运行的增强型第 2 层软件 (ELS) 配置样式的 EX 系列交换机。
EX 系列交换机的 Junos OS 13.2X50-D10 或更高版本。
QFX5100 交换机的 Junos OS 14.1X53-D10 或更高版本。适用于 QFX5200 和 QFX10000 交换机的 Junos OS 15.1X53-D30 或更高版本。
开始之前,确保您已经:
在四台交换机上分别配置了两个中继接口。有关此示例中使用的接口名称列表,请参阅 表 1 。
在所有四个交换机上配置了一个 VLAN(带有名称和
erp-control-vlan-1
ID100
),并将四个交换机中的每个网络接口与 VLAN 关联。请参阅为 QFX 系列配置 VLAN 或为支持 ELS 的 EX 系列交换机配置 VLAN(CLI 过程)。有关此示例中使用的接口名称列表,请参阅 表 1 。在所有四个交换机上再配置了两个 VLAN(一个带有名称和
erp-data-1
vlan ID101
,另一个带有名称和erp-data-2
VLAN ID102
),并关联每个交换机上的东西接口。
概述和拓扑
ERPS 在所有交换机之间使用专用物理链路,包括中继端口的控制 VLAN,以保护活动链路。ERPS VLAN 都位于此链路上,默认情况下也会被阻止。当交换机之间的流量没有问题时,活动链路会处理所有流量。只有当其中一条数据链路上出错时,ERPS 控制通道才会接管并开始转发流量。
交换机上的中继端口使用 VLAN 为 ERPS 创建单独的控制通道。为一个环配置多个 ERPS 实例时,ERPS 链路上会存在多个环网保护链路 (RPL) 和 RPL 所有者,并且每个实例都会阻止一个不同的通道。非吞吐量端口使用物理链路,因为控制通道和协议数据单元 (PDU) 未标记,数据包中没有 VLAN 信息。
此示例在四个交换机上创建一个保护环(称为节点环),名为 erp1,通过中继端口连接在一个环中,如中 图 1所示。由于链路是中继端口,因此 VLAN 100 用于 erp1 流量。每个交换机的东接口都与相邻交换机的西接口连接。Cobia 是 RPL 所有者,接口 ge-0/0/0/0 配置为 RPL 终端接口。Jas5-esc 的接口 ge-0/0/0 配置为 RPL 邻接接口。处于空闲状态时,RPL 端会阻止此特定 ERP 实例的控制 VLAN 和数据通道 VLAN — Cobia 上的受阻端口中 图 1标有一个星号。

在此示例中,我们使用两者图 1表 1中都指示的接口来配置四台交换机。
接口 |
科比亚 |
Jas5-esc |
Jas6-esc |
带鱼 |
---|---|---|---|---|
东 |
ge-0/0/0 |
ge-0/0/10 |
ge-0/0/30 |
ge-0/0/20 |
西 |
ge-0/0/20 |
ge-0/0/0 |
ge-0/0/20 |
ge-0/0/10 |
第三 |
ge-0/0/10 |
ge-0/0/20 |
ge-0/0/0 |
ge-0/0/0 |
配置
在 RPL 所有者节点上 Cobia 上配置 ERPS
CLI 快速配置
要快速配置 Cobia,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 CLI 中 [edit]
。
如果配置了任何生成树协议,则无法在接口上配置 ERPS。(RSTP 默认配置。)因此,在此示例中,配置 ERPS 之前,在每个环端口上都禁用 RSTP。生成树协议会以两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。因此,此示例中的前两个语句各不相同:Junos 15.1 或更高版本使用一个命令关闭 RSTP,15.1 之前的 Junos 版本使用另一个命令。
Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/0 disable Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/20 disable Junos OS release prior to 15.1: delete rstp interface ge-0/0/0 Junos OS release prior to 15.1: delete rstp interface ge-0/0/20 set protocols protection-group ethernet-ring erp1 set protocols protection-group ethernet-ring erp1 ring-protection-link-owner set protocols protection-group ethernet-ring erp1 data-channel 101 set protocols protection-group ethernet-ring erp1 data-channel 102 set protocols protection-group ethernet-ring erp1 control-vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/0.0 set protocols protection-group ethernet-ring erp1 east-interface ring-protection-link-end set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/20.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel vlan 100
逐步过程
要配置 Cobia 上的 ERPS:
禁用当前在 ERPS 接口上配置的任何生成树协议。RSTP、VSTP 和 MSTP 都是可用的生成树协议。RSTP 在默认配置中处于启用状态,因此此示例显示了禁用 RSTP。生成树协议会以两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。
如果您运行的是 Junos 15.1 或更高版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# set rstp interface ge-0/0/0 disable user@switch# set rstp interface ge-0/0/20 disable
如果您运行的是 15.1 之前的 Junos 版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# delete rstp interface ge-0/0/0 user@switch# delete rstp interface ge-0/0/20
创建一个名为 erp1 的节点环:
[edit protocols] user@switch# set protection-group ethernet-ring erp1
将 Cobia 指定为 RPL 所有者节点:
[edit protocols protection-group ethernet-ring erp1] user@switch# set ring-protection-link-owner
将 VLAN 101 和 102 配置为数据通道:
[edit protocols protection-group ethernet-ring erp1] user@switch# set data-channel 101 user@switch# set data-channel 102
在中继接口上为此 ERPS 实例配置控制 vlan 100:
[edit protocols protection-group ethernet-ring erp1] user@switch# set control-vlan 100
使用控制通道 ge-0/0/0.0 配置节点环 erp1 的东接口,并指示此特定环保护链路结束此处:
[edit protocols protection-group ethernet-ring erp1] user@switch# set east-interface control-channel ge-0/0/0.0 user@switch# set east-interface ring-protection-link-end
配置节点环 erp1 的西接口,使用控制通道 ge-0/0/20.0:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel ge-0/0/20.0
中继端口上的每个环网实例都有一个控制 VLAN,ERP 数据包在其中遍历。控制 VLAN 还控制数据 VLAN(如果配置了 VLAN)。将 100 分配为两个接口上的控制 VLAN:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel vlan 100 user@switch# set east-interface control-channel
在 Jas5-esc 上配置 ERPS
CLI 快速配置
要快速配置 Jas5-esc,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 CLI 中 [edit]
。
如果配置了任何生成树协议,则无法在接口上配置 ERPS。(RSTP 默认配置。)因此,在此示例中,配置 ERPS 之前,在每个环端口上都禁用 RSTP。生成树可以通过两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。因此,前两个语句将有所不同:Junos 15.1 或更高版本使用一个命令关闭 RSTP,15.1 之前的 Junos 版本使用另一个命令。
Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/10 disable Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/0 disable Junos OS release prior to 15.1: delete rstp interface ge-0/0/10 Junos OS release prior to 15.1: delete rstp interface ge-0/0/0 set protocols protection-group ethernet-ring erp1 set protocols protection-group ethernet-ring erp1 data-channel 101 set protocols protection-group ethernet-ring erp1 data-channel 102 set protocols protection-group ethernet-ring erp1 control-vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/10.0 set protocols protection-group ethernet-ring erp1 east-interface control-channel vlan 100 ge-0/0/0.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel ge-0/0/20.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel vlan 100 set protocols protection-group ethernet-ring erp1 west-interface control-channel vlan 100
逐步过程
要配置 Jas5-esc 上的 ERPS:
禁用当前在 ERPS 接口上配置的任何生成树协议。RSTP、VSTP 和 MSTP 都是可用的生成树协议。RSTP 在默认配置中处于启用状态,因此此示例显示了禁用 RSTP。生成树协议会以两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。
如果您运行的是 Junos 15.1 或更高版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# set rstp interface ge-0/0/10 disable user@switch# set rstp interface ge-0/0/0 disable
如果您运行的是 15.1 之前的 Junos 版本,请使用这些命令禁用任何版本的生成树协议。要禁用 RSTP:
[edit protocols] user@switch# delete rstp interface ge-0/0/10 user@switch# delete rstp interface ge-0/0/0
创建一个名为 erp1 的节点环:
[edit protocols] user@switch# set protection-group ethernet-ring erp1
配置两个名为 erp data-1 和 erp-data-2 的数据通道,以定义属于环实例的一组 VLAN ID。
[edit protocols protection-group ethernet-ring erp1] user@switch# set data-channel vlan 101 user@switch# set data-channel vlan 102
为节点环 erp1 配置 ID 为 100 的控制 VLAN:
[edit protocols protection-group ethernet-ring erp1] user@switch# set control-vlan 100
使用控制通道 ge-0/0/10.0 配置节点环 erp1 的东接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set east-interface control-channel ge-0/0/10.0
配置节点环 erp1 的西接口,使用控制通道 ge-0/0/0.0 vlan 100:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel ge-0/0/0.0
中继端口上的每个环网实例都有一个控制 VLAN,ERP 数据包在其中遍历。控制 VLAN 还控制数据 VLAN(如果配置了 VLAN)。将 VLAN # 100 分配为控制 VLAN:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel vlan 100 user@switch# set east-interface control-channel vlan 100
在毛尾上配置 ERPS
CLI 快速配置
要快速配置 Hairtail,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 CLI 中 [edit]
。
如果配置了任何生成树协议,则无法在接口上配置 ERPS。(RSTP 默认配置。)因此,在此示例中,配置 ERPS 之前,在每个环端口上都禁用 RSTP。生成树可以通过两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。因此,前两个语句将有所不同:Junos 15.1 或更高版本使用一个命令关闭 RSTP,15.1 之前的 Junos 版本使用另一个命令。
Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/10 disable Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/20 disable Junos OS release prior to 15.1: delete rstp interface ge-0/0/10 Junos OS release prior to 15.1: delete rstp interface ge-0/0/20 set protocols protection-group ethernet-ring erp1 set protocols protection-group ethernet-ring erp1 data-channel 101 set protocols protection-group ethernet-ring erp1 data-channel 102 set protocols protection-group ethernet-ring erp1 control-vlan 100 Set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/0.0 set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/20.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel vlan 100
逐步过程
要配置“发尾”上的 ERPS:
禁用当前在 ERPS 接口上配置的任何生成树协议。RSTP、VSTP 和 MSTP 都是可用的生成树协议。RSTP 在默认配置中处于启用状态,因此此示例显示了禁用 RSTP。生成树协议会以两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。
如果您运行的是 Junos 15.1 或更高版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# set rstp interface ge-0/0/10 disable user@switch# set rstp interface ge-0/0/20 disable
如果您运行的是 15.1 之前的 Junos 版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# delete rstp interface ge-0/0/10 user@switch# delete rstp interface ge-0/0/20
创建一个名为 erp1 的节点环:
[edit protocols] user@switch# set protection-group ethernet-ring erp1
为节点环 erp1 配置控制 vlan 100:
[edit protocols protection-group ethernet-ring erp1] user@switch# set control-vlan 100
配置两个编号为 101 和 102 的数据通道,以定义属于环状实例的一组 VLAN ID:
[edit protocols protection-group ethernet-ring erp1] user@switch# set data-channel vlan 101 user@switch# set data-channel vlan 102
使用控制通道 ge-0/0/20.0 配置节点环 erp1 的东接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set east-interface control-channel ge-0/0/20.0
使用控制通道 ge-0/0/10.0 配置节点环 erp1 的西接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel ge-0/0/10.0
中继端口上的每个环网实例都有一个控制 VLAN,ERP 数据包在其中遍历。控制 VLAN 还控制数据 VLAN(如果配置了 VLAN)。将 100 分配为控制 VLAN:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel vlan 100 user@switch# set east-interface control-channel vlan 100
在 Jas6-esc 上配置 ERPS
CLI 快速配置
要快速配置 Jas6-esc,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
如果配置了任何生成树协议,则无法在接口上配置 ERPS。(RSTP 默认配置。)因此,在此示例中,配置 ERPS 之前,在每个环端口上都禁用 RSTP。生成树可以通过两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。因此,前两个语句将有所不同:Junos 15.1 或更高版本使用一个命令关闭 RSTP,15.1 之前的 Junos 版本使用另一个命令。
Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/30 disable Junos OS release 15.1 or later: set protocols rstp interface ge-0/0/20 disable Junos OS release prior to 15.1: delete rstp interface ge-0/0/30 Junos OS release prior to 15.1: delete rstp interface ge-0/0/20 set protocols protection-group ethernet-ring erp1 set protocols protection-group ethernet-ring erp1 data-channel 101 set protocols protection-group ethernet-ring erp1 data-channel 102 set protocols protection-group ethernet-ring erp1 control-vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel ge-0/0/30.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel ge-0/0/20.0 set protocols protection-group ethernet-ring erp1 west-interface control-channel vlan 100 set protocols protection-group ethernet-ring erp1 east-interface control-channel vlan 100
逐步过程
要配置 Jas6-esc 上的 ERPS:
禁用当前在 ERPS 接口上配置的任何生成树协议。RSTP、VSTP 和 MSTP 都是可用的生成树协议。RSTP 在默认配置中处于启用状态,因此此示例显示了禁用 RSTP。生成树协议会以两种不同的方式进行禁用,具体取决于您运行的 Junos OS 版本。
如果您运行的是 Junos 15.1 或更高版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# set rstp interface ge-0/0/30 disable user@switch# set rstp interface ge-0/0/20 disable
如果您运行的是 15.1 之前的 Junos 版本,请使用以下命令禁用任何生成树协议。要禁用 RSTP:
[edit protocols] user@switch# delete rstp interface ge-0/0/30 user@switch# delete rstp interface ge-0/0/20
创建一个名为 erp1 的节点环:
[edit protocols] user@switch# set protection-group ethernet-ring erp1
为节点环 erp1 配置控制 vlan 100:
[edit protocols protection-group ethernet-ring erp1] user@switch# set control-vlan 100
配置两个编号为 101 和 102 的数据通道,以定义属于环状实例的 VLAN ID。
[edit protocols protection-group ethernet-ring erp1] user@switch# set data-channel 101 user@switch# set data-channel 102
使用控制通道 ge-0/0/30.0 配置节点环 erp1 的东接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set east-interface control-channel ge-0/0/30.0
使用控制通道 ge-0/0/20.0 配置节点环 erp1 的西接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel ge-0/0/20.0
中继端口上的每个环网实例都有一个控制 VLAN,ERP 数据包在其中遍历。控制 VLAN 还控制数据 VLAN(如果配置了 VLAN)。将 VLAN 编号 100 分配为控制 VLAN:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel vlan 100 user@switch# set east-interface control-channel vlan 100