No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - Reliability

S1720, S2700, S5700, and S6720 V200R010C00

This document describes the configuration of BFD, DLDP, VRRP, SmartLink, CFM, EFM, Y.1731 and MAC swap loopback to ensure reliability on the device.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring a VRRP Group in Active/Standby Mode

Example for Configuring a VRRP Group in Active/Standby Mode

Networking Requirements

In Figure 4-16, HostA is dual-homed to SwitchA and SwitchB through the switch. To ensure nonstop service transmission, a VRRP group in active/standby mode needs to be configured on SwitchA and SwitchB.
  • The host uses SwitchA as the default gateway to connect to the Internet. When SwitchA becomes faulty, SwitchB functions as the gateway. This implements gateway backup.

  • After SwitchA recovers, it switches to the master to transmit data after a preemption delay of 20s.

NOTE:

In this scenario, to avoid loops, ensure that all connected interfaces have STP disabled and connected interfaces are removed from VLAN 1. If STP is enabled and VLANIF interfaces of switches are used to construct a Layer 3 ring network, an interface on the network will be blocked. As a result, Layer 3 services on the network cannot run normally.

Figure 4-16  Networking diagram for configuring a VRRP group

Device

Interface

VLANIF Interface

IP Address

SwitchA

GE0/0/1

VLANIF 300

192.168.1.1/24

GE0/0/2

VLANIF 100

10.1.1.1/24

SwitchB

GE0/0/1

VLANIF 200

192.168.2.1/24

GE0/0/2

VLANIF 100

10.1.1.2/24

SwitchC

GE0/0/1

VLANIF 300

192.168.1.2/24

GE0/0/2

VLANIF 200

192.168.2.2/24

GE0/0/3

VLANIF 400

172.16.1.1/24

Configuration Roadmap

The configuration roadmap is as follows:

  1. Assign an IP address to each interface and configure a routing protocol to ensure network connectivity.
  2. Configure a VRRP group on SwitchA and SwitchB and set a higher priority for SwitchA so that SwitchA functions as the master to forward traffic. Then, set the preemption delay to 20s on SwitchA, and set a lower priority for SwitchB so that SwitchB functions as the backup.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. SwitchA is used as an example. The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here. For details, see the configuration files.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 100 300
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 300
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 300
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/2] port hybrid pvid vlan 100
    [SwitchA-GigabitEthernet0/0/2] port hybrid untagged vlan 100
    [SwitchA-GigabitEthernet0/0/2] quit
    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] ip address 10.1.1.1 24
    [SwitchA-Vlanif100] quit
    [SwitchA] interface vlanif 300
    [SwitchA-Vlanif300] ip address 192.168.1.1 24
    [SwitchA-Vlanif300] quit

    # Configure Layer 2 transmission on the switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type hybrid
    [Switch-GigabitEthernet0/0/2] port hybrid pvid vlan 100
    [Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 100
    [Switch-GigabitEthernet0/0/2] quit
    

    # Configure OSPF between SwitchA, SwitchB, and SwitchC. SwitchA is used as an example. The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here. For details, see the configuration files.

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] quit

  2. Configure VRRP groups.

    # Configure VRRP group 1 on SwitchA, and set the priority of SwitchA to 120 and the preemption delay to 20s.

    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [SwitchA-Vlanif100] vrrp vrid 1 priority 120
    [SwitchA-Vlanif100] vrrp vrid 1 preempt-mode timer delay 20
    [SwitchA-Vlanif100] quit

    # Configure VRRP group 1 on SwitchB. SwitchB uses default value 100.

    [SwitchB] interface vlanif 100
    [SwitchB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [SwitchB-Vlanif100] quit

  3. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on SwitchA and SwitchB. You can see that SwitchA is in Master state and SwitchB is in Backup state.

    [SwitchA] display vrrp
      Vlanif100 | Virtual Router 1
        State : Master
        Virtual IP : 10.1.1.111
        Master IP : 10.1.1.1
        PriorityRun : 120
        PriorityConfig : 120                                                        
        MasterPriority : 120                                                        
        Preempt : YES   Delay Time : 20 s
        TimerRun : 1 s
        TimerConfig : 1 s
        Auth type : NONE                                                            
        Virtual MAC : 0000-5e00-0101                                                
        Check TTL : YES                                                             
        Config type : normal-vrrp                                                   
        Backup-forward : disabled
        Create time : 2012-01-12 20:15:46
        Last change time : 2012-01-12 20:15:46
    [SwitchB] display vrrp
      Vlanif100 | Virtual Router 1
        State : Backup
        Virtual IP : 10.1.1.111
        Master IP : 10.1.1.1
        PriorityRun : 100
        PriorityConfig : 100                                                        
        MasterPriority : 120                                                        
        Preempt : YES   Delay Time : 0 s
        TimerRun : 1 s
        TimerConfig : 1 s
        Auth type : NONE                                                            
        Virtual MAC : 0000-5e00-0101                                                
        Check TTL : YES                                                             
        Config type : normal-vrrp                                                   
        Backup-forward : disabled
        Create time : 2012-01-12 20:15:46
        Last change time : 2012-01-12 20:15:46

    # Run the display ip routing-table command on SwitchA and SwitchB. The command output shows that a direct route to the virtual IP address exists in the routing table of SwitchA and an OSPF route to the virtual IP address exists in the routing table of SwitchB. The command output on SwitchA and SwitchB is as follows:

    [SwitchA] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------  
    Routing Tables: Public                                                          
             Destinations : 9       Routes : 10                                    
                                                                                    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface      
                                                                                    
         10.1.1.0/24    Direct   0     0         D      10.1.1.1        Vlanif100
         10.1.1.1/32    Direct   0     0         D      127.0.0.1       Vlanif100
     10.1.1.111/32    Direct  0     0         D      127.0.0.1      Vlanif100
         127.0.0.0/8    Direct   0    0          D      127.0.0.1       InLoopBack0
        127.0.0.1/32    Direct   0    0          D      127.0.0.1       InLoopBack0
       172.16.1.0/24    OSPF     10   2          D      192.168.1.2     Vlanif300
      192.168.1.0/24    Direct   0    0          D      192.168.1.1     Vlanif300
      192.168.1.1/32    Direct   0    0          D      127.0.0.1       Vlanif300
      192.168.2.0/24    OSPF     10   2          D      10.1.1.2        Vlanif100
                        OSPF     10   2          D      192.168.1.2     Vlanif300
    [SwitchB] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------  
    Routing Tables: Public                                                          
             Destinations : 9       Routes : 10                                    
                                                                                    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface      
                                                                                    
         10.1.1.0/24    Direct   0     0         D     10.1.1.2        Vlanif100
         10.1.1.2/32    Direct   0     0         D     127.0.0.1       Vlanif100
     10.1.1.111/32    OSPF    10    2         D     10.1.1.1      Vlanif100
         127.0.0.0/8    Direct   0     0         D     127.0.0.1       InLoopBack0
        127.0.0.1/32    Direct   0     0         D     127.0.0.1       InLoopBack0
       172.16.1.0/24    OSPF     10    2         D     192.168.2.2     Vlanif200
      192.168.1.0/24    OSPF     10    2         D     10.1.1.1        Vlanif100
                        OSPF     10    2         D     192.168.2.2     Vlanif200
      192.168.2.0/24    Direct   0     0         D     192.168.2.1     Vlanif200
      192.168.2.1/32    Direct   0     0         D     127.0.0.1       Vlanif200

    # Run the shutdown command on GE0/0/2 of SwitchA to simulate a link fault.

    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] shutdown
    [SwitchA-GigabitEthernet0/0/2] quit

    # Run the display vrrp command on SwitchB to view the VRRP status. The command output shows that SwitchB is in Master state.

    [SwitchB] display vrrp
      Vlanif100 | Virtual Router 1
        State : Master
        Virtual IP : 10.1.1.111
        Master IP : 10.1.1.2
        PriorityRun : 100
        PriorityConfig : 100                                                        
        MasterPriority : 100                                                        
        Preempt : YES   Delay Time : 0 s
        TimerRun : 1 s
        TimerConfig : 1 s
        Auth type : NONE                                                            
        Virtual MAC : 0000-5e00-0101                                                
        Check TTL : YES                                                             
        Config type : normal-vrrp                                                   
        Backup-forward : disabled
        Create time : 2012-01-12 20:15:46
        Last change time : 2012-01-12 20:18:40

    # Run the undo shutdown command on GE0/0/2 of SwitchA.

    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] undo shutdown
    [SwitchA-GigabitEthernet0/0/2] quit

    # After 20s, run the display vrrp command on SwitchA to view the VRRP status. SwitchA restores to be in Master state.

    [SwitchA] display vrrp
      Vlanif100 | Virtual Router 1
        State : Master
        Virtual IP : 10.1.1.111
        Master IP : 10.1.1.1
        PriorityRun : 120
        PriorityConfig : 120                                                        
        MasterPriority : 120                                                        
        Preempt : YES   Delay Time : 20 s
        TimerRun : 1 s
        TimerConfig : 1 s
        Auth type : NONE                                                            
        Virtual MAC : 0000-5e00-0101                                                
        Check TTL : YES                                                             
        Config type : normal-vrrp                                                   
        Backup-forward : disabled
        Create time : 2012-01-12 20:15:46
        Last change time : 2012-01-12 20:20:56

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.111
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt-mode timer delay 20
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.111
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 200 300 400
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif400
     ip address 172.16.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 400
     port hybrid untagged vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
    
  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 100
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    return

Relevant Information

Video

Configuring VRRP

Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000141941

Views: 91523

Downloads: 512

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next