发布时间: 2018-07-25 17:44:37
配置RRPP单实例单环示例
组网图形
图1 配置RRPP单环组网图
·
组网需求
·
配置思路
·
操作步骤
·
配置文件
·
相关信息
组网需求
如图1所示,在组网中存在由SwitchA、SwitchB、SwitchC组成的环网结构。对于这种组网结构,需要当环网完整时,可以避免报文成环;当环网发生故障时,可以实现快速收敛迅速恢复环网上各节点间的通信。在SwitchA、SwitchB和SwitchC上配置RRPP功能,可以很好地满足这两个需求。
配置思路
采用如下的思路配置RRPP单环示例:
1.
配置设备上将要加入RRPP的各接口,使其可以通过RRPP环上需要通过的VLAN数据,并去使能与RRPP相冲突的功能(例如STP功能)。
2.
创建RRPP域和控制VLAN,为后续配置RRPP环做好准备。
3.
将RRPP环上需要通过的VLAN数据映射到实例1,包括数据VLAN100~VLAN300和控制VLAN20、VLAN21(其中VLAN21是设备自动生成的子控制VLAN),为后续配置保护VLAN做好准备。
4.
在RRPP域中,配置保护VLAN并创建RRPP环,将SwitchA、SwitchB和SwitchC配置为域1环1的节点。其中配置SwitchA为环1的主节点,SwitchB和SwitchC为环1的传输节点。
5.
在各设备上使能RRPP环和RRPP协议,使得RRPP功能生效。
操作步骤
1. 创建RRPP域,同时创建域的控制VLAN
# 配置SwitchA。SwitchB和SwitchC的配置与SwitchA类似,此处省略,详见配置文件。
<HUAWEI> system-view
[HUAWEI] sysname
SwitchA
[SwitchA] rrpp
domain 1
[SwitchA-rrpp-domain-region1]
control-vlan 20
[SwitchA-rrpp-domain-region1]
quit
2. 配置实例1映射控制VLAN20、VLAN21和数据VLAN100~VLAN300。
# 配置SwitchA。SwitchB和SwitchC的配置与SwitchA相同,此处省略,详见配置文件。
[SwitchA] vlan
batch 100 to 300
[SwitchA] stp
region-configuration
[SwitchA-mst-region]
instance 1 vlan 20 21 100 to 300
[SwitchA-mst-region]
active region-configuration
[SwitchA-mst-region]
quit
3. 将即将加入RRPP环的接口配置为Trunk类型接口,允许VLAN100~300通过,并去使能接口的STP功能
# 配置SwitchA。SwitchB和SwitchC的配置与SwitchA相同,此处省略,详见配置文件。
[SwitchA]
interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1]
port link-type trunk
[SwitchA-GigabitEthernet0/0/1]
undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/1]
port trunk allow-pass vlan 100 to 300
[SwitchA-GigabitEthernet0/0/1]
stp disable
[SwitchA-GigabitEthernet0/0/1]
quit
[SwitchA]
interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2]
port link-type trunk
[SwitchA-GigabitEthernet0/0/2]
undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/2]
port trunk allow-pass vlan 100 to 300
[SwitchA-GigabitEthernet0/0/2]
stp disable
[SwitchA-GigabitEthernet0/0/2]
quit
4. 配置保护VLAN,创建RRPP环并使能RRPP环
# 配置SwitchA。
[SwitchA] rrpp
domain 1
[SwitchA-rrpp-domain-region1]
protected-vlan reference-instance 1
[SwitchA-rrpp-domain-region1]
ring 1 node-mode master primary-port gigabitethernet 0/0/1 secondary-port gigabitethernet
0/0/2 level 0
[SwitchA-rrpp-domain-region1]
ring 1 enable
[SwitchA-rrpp-domain-region1]
quit
# 配置SwitchB。
[SwitchB] rrpp
domain 1
[SwitchB-rrpp-domain-region1]
protected-vlan reference-instance 1
[SwitchB-rrpp-domain-region1]
ring 1 node-mode transit primary-port gigabitethernet 0/0/1 secondary-port gigabitethernet
0/0/2 level 0
[SwitchB-rrpp-domain-region1]
ring 1 enable
[SwitchB-rrpp-domain-region1]
quit
# 配置SwitchC。
[SwitchC] rrpp
domain 1
[SwitchC-rrpp-domain-region1]
protected-vlan reference-instance 1
[SwitchC-rrpp-domain-region1]
ring 1 node-mode transit primary-port gigabitethernet 0/0/1 secondary-port gigabitethernet
0/0/2 level 0
[SwitchC-rrpp-domain-region1]
ring 1 enable
[SwitchC-rrpp-domain-region1]
quit
5. 使能RRPP协议
# 配置SwitchA。SwitchB和SwitchC的配置与SwitchA相同,此处省略,详见配置文件。
[SwitchA] rrpp
enable
6. 检查配置结果
经过以上配置,在网络稳定后,执行以下操作,验证配置结果。以SwitchA为例。
# 在SwitchA上执行display rrpp
brief命令,查看结果如下:
[SwitchA] display
rrpp brief
Abbreviations for
Switch Node Mode :
M - Master , T -
Transit , E - Edge , A - Assistant-Edge
RRPP Protocol
Status: Enable
RRPP Working Mode:
HW
RRPP Linkup Delay
Timer: 0 sec (0 sec default)
Number of RRPP
Domains: 1
Domain Index : 1
Control VLAN : major 20
sub 21
Protected VLAN :
Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Ring
Ring Node Primary/Common Secondary/Edge Is
ID
Level Mode Port Port Enabled
----------------------------------------------------------------------------
1
0 M GigabitEthernet0/0/1 GigabitEthernet0/0/2 Yes
可以看到SwitchA的RRPP协议状态使能了,在域1中的主控制Vlan为20,子控制Vlan为21,SwitchA为主环1中的主节点。主端口为GigabitEthernet0/0/1,副端口为GigabitEthernet0/0/2。
# 在SwitchA上执行display rrpp
verbose domain命令,查看结果如下:
[SwitchA] display
rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 20
sub 21
Protected VLAN :
Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
可以看到RRPP环的状态处于完整状态。
配置文件
·
SwitchA的配置文件
·
#
·
sysname
SwitchA
·
#
·
vlan
batch 20 to 21 100 to 300
·
#
·
rrpp
enable
·
#
·
stp
region-configuration
·
instance 1 vlan 20 to 21 100 to 300
·
active region-configuration
·
#
·
rrpp
domain 1
·
control-vlan 20
·
protected-vlan reference-instance 1
·
ring 1 node-mode master primary-port GigabitEthernet0/0/1
secondary-port GigabitEthernet0/0/2 level 0
·
ring 1 enable
·
#
·
interface
GigabitEthernet0/0/1
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
·
interface
GigabitEthernet0/0/2
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
·
return
·
SwitchB的配置文件
·
#
·
sysname
SwitchB
·
#
·
vlan
batch 20 to 21 100 to 300
·
#
·
rrpp
enable
·
#
·
stp
region-configuration
·
instance 1 vlan 20 to 21 100 to 300
·
active region-configuration
·
#
·
rrpp
domain 1
·
control-vlan 20
·
protected-vlan reference-instance 1
·
ring 1 node-mode transit primary-port GigabitEthernet0/0/1
secondary-port GigabitEthernet0/0/2 level 0
·
ring 1 enable
·
#
·
interface
GigabitEthernet0/0/1
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
·
interface
GigabitEthernet0/0/2
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
return
·
SwitchC的配置文件
·
#
·
sysname
SwitchC
·
#
·
vlan
batch 20 to 21 100 to 300
·
#
·
rrpp
enable
·
#
·
stp
region-configuration
·
instance 1 vlan 20 to 21 100 to 300
·
active region-configuration
·
#
·
rrpp
domain 1
·
control-vlan 20
·
protected-vlan reference-instance 1
·
ring 1 node-mode transit primary-port GigabitEthernet0/0/1
secondary-port GigabitEthernet0/0/2 level 0
·
ring 1 enable
·
#
·
interface
GigabitEthernet0/0/1
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
·
interface
GigabitEthernet0/0/2
·
port link-type trunk
·
undo port trunk allow-pass vlan 1
·
port trunk allow-pass vlan 20 to 21 100 to 300
·
stp disable
·
#
return