As shown in Figure 1, SwitchA, SwitchB, and SwitchC constitute a ring network. The network is required to prevent loops when the ring is complete and implement fast convergence to rapidly restore communication between nodes on the ring when the ring fails. You can enable RRPP on SwitchA, SwitchB, and SwitchC to meet this requirement.
The configuration roadmap is as follows:
Configure interfaces to be added to the RRPP domain on the devices so that data can pass through the interfaces. Disable protocols that conflict with RRPP, such as STP.
Create an RRPP domain and its control VLAN.
Map data that needs to pass through the VLANs on the RRPP ring to Instance 1, including data VLANs 100 to 300 and control VLANs 20 and 21 (VLAN 21 is the sub-control VLAN generated by the device).
In the RRPP domain, configure a protected VLAN, create an RRPP ring and configure SwitchA, SwitchB, and SwitchC as nodes on Ring 1 in Domain 1. Configure SwitchA as the master node on Ring 1, and configure SwitchB and SwitchC as transit nodes on Ring 1.
Enable the RRPP ring and RRPP protocol on devices to make RRPP take effect.
# Configure SwitchA. The configurations on SwitchB and SwitchC are similar to that on SwitchA and not mentioned here. For details, see the configuration files.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] rrpp domain 1 [SwitchA-rrpp-domain-region1] control-vlan 20 [SwitchA-rrpp-domain-region1] quit
# Configure SwitchA. The configurations on SwitchB and SwitchC are the same as that of SwitchA and not mentioned here. For details, see the configuration files.
[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
# Configure SwitchA. The configurations on SwitchB and SwitchC are the same as that of SwitchA and not mentioned here. For details, see the configuration files.
[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
# Configure 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
# Configure 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
# Configure 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
# Configure SwitchA. The configurations on SwitchB and SwitchC are the same as that of SwitchA and not mentioned here. For details, see the configuration files.
[SwitchA] rrpp enable
After the preceding configurations are complete and the network becomes stable, run the following commands to verify the configuration. The display on Switch A is used as an example.
# Run the display rrpp brief command on SwitchA. The command output is as follows:
[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
The command output shows that RRPP is enabled on SwitchA, the major control VLAN of domain 1 is VLAN 20 and the sub-control VLAN is VLAN 21, and SwitchA is the master node on Ring 1. The primary interface is GigabitEthernet0/0/1 and the secondary interface is GigabitEthernet0/0/2.
# Run the display rrpp verbose domain command on SwitchA. The command output is as follows:
[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
The command output shows that the RRPP ring is complete.
SwitchA configuration file
# 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 configuration file
# 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 configuration file
# 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