發布時間: 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