示例:在支持 ELS 的 QFX 系列和 EX 系列交换机上配置以太网环网保护交换机
您可以在连接的 EX 系列或 QFX 系列交换机上配置以太网环网保护交换 (ERPS),以防止致命环路中断网络。ERPS 类似于生成树协议,但 ERPS 效率更高,因为它是针对环形拓扑定制的。您必须连接并配置至少三个交换机才能形成一个环。
此示例说明如何在支持 ELS 的四台交换机上配置以太网环形保护交换,这些交换机在环形拓扑中的专用链路上相互连接。您可以在 ERPS 环中包含不同类型的交换机,包括支持 ELS 和不支持 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 或更高版本。
Junos OS 版本 14.1X53-D10 或更高版本(适用于 QFX5100 交换机)。适用于 QFX5200 和QFX10000交换机的 Junos OS 15.1X53-D30 或更高版本。
开始之前,确保您具备以下条件:
在四台交换机中的每一台交换机上配置了两个中继接口。有关此示例中使用的接口名称的列表,请参阅 。表 1
在所有四台交换机上配置了一个 VLAN(带有名称和 ID ),并将这四台交换机中每台交换机的两个网络接口与 VLAN 关联。
erp-control-vlan-1
100
请参阅为 QFX 系列配置 VLAN 或为 EX 系列交换机配置 VLAN 支持 ELS(CLI 过程)。https://www.juniper.net/documentation/en_US/release-independent/junos/topics/task/configuration/qfx-series-bridging-vlans-qfx-series-j-web.htmlhttps://www.juniper.net/documentation/en_US/junos/topics/task/configuration/bridging-vlans-ex-series-cli-els.html有关此示例中使用的接口名称的列表,请参阅 。表 1在所有四台交换机上配置了另外两个 VLAN(一个带有名称和 VLAN ID,另一个 VLAN 带有名称和 VLAN ID ),并在每台交换机上关联东西接口。
erp-data-1
101
erp-data-2
102
概述和拓扑
ERPS 在所有交换机之间使用专用物理链路(包括用于中继端口的控制 VLAN)来保护活动链路。ERPS VLAN 全部位于此链路上,默认情况下也会被阻止。当交换机之间的流量顺畅流动时,活动链路将处理所有流量。仅当其中一个数据链路上发生错误时,ERPS 控制通道才会接管并开始转发流量。
交换机上的中继端口使用 VLAN 为 ERPS 创建单独的控制通道。为一个环配置多个 ERPS 实例时,ERPS 链路上有多组环形保护链路 (RPL) 和 RPL 所有者,并且为每个实例阻止不同的通道。非中继端口使用物理链路,因为控制通道和协议数据单元 (PDU) 未标记,数据包中没有 VLAN 信息。
此示例在通过中继端口连接在一个环中的四台交换机上创建一个名为 erp1 的保护环(称为节点环),如 所示 。图 1由于链路是中继端口,因此 VLAN 100 用于 erp1 流量。每台交换机的东接口与相邻交换机的西接口连接。Cobia 是 RPL 所有者,接口 ge-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
分步过程
要在军曹鱼上配置 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
使用控制通道 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(如果已配置)。将 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
使用控制通道 ge-0/0/0.0 VLAN 100 配置节点环 erp1 的西部接口:
[edit protocols protection-group ethernet-ring erp1] user@switch# set west-interface control-channel ge-0/0/0.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
在发尾上配置 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
分步过程
要在 Hairtail 上配置 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(如果已配置)。将 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,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改任何必要的详细信息以匹配您的网络配置,然后将命令复制并粘贴到层次结构级别的 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/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 编号 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