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

CLI-based Configuration Guide - Reliability

AR100-S, AR110-S, AR120-S, AR150-S, AR160-S, AR200-S, AR1200-S, AR2200-S, and AR3200-S V200R009

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

As shown in Figure 7-11, HostA is dual-homed to RouterA and RouterB through the switch. The requirements are as follows:
  • The host uses RouterA as the default gateway to connect to the Internet. When RouterA becomes faulty, RouterB functions as the gateway. This implements gateway backup.

  • After RouterA recovers, it becomes the gateway.

Figure 7-11  Networking diagram for configuring a VRRP group

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 RouterA and RouterB, set a higher priority for RouterA so that RouterA functions as the master to forward traffic and set the preemption delay to 20s on RouterA, and set a lower priority for RouterB so that RouterB functions as the backup.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. RouterA is used as an example. The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 10.1.1.1 24
    [RouterA-GigabitEthernet2/0/0] quit
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 24
    [RouterA-GigabitEthernet1/0/0] quit

    # Configure OSPF between RouterA, RouterB, and RouterC. RouterA is used as an example. The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.

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

  2. Configure VRRP groups.

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

    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] vrrp vrid 1 virtual-ip 10.1.1.111
    [RouterA-GigabitEthernet2/0/0] vrrp vrid 1 priority 120
    [RouterA-GigabitEthernet2/0/0] vrrp vrid 1 preempt-mode timer delay 20
    [RouterA-GigabitEthernet2/0/0] quit

    # Configure VRRP group 1 on RouterB. RouterB uses the default priority of 100.

    [RouterB] interface gigabitethernet 2/0/0
    [RouterB-GigabitEthernet2/0/0] vrrp vrid 1 virtual-ip 10.1.1.111
    [RouterB-GigabitEthernet2/0/0] quit

  3. Verify the configuration.

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

    [RouterA] display vrrp
      GigabitEthernet2/0/0 | 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-05-11 11:39:18                                           
        Last change time : 2012-05-26 11:38:58 
    [RouterB] display vrrp
      GigabitEthernet2/0/0 | 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-05-11 11:39:18                                           
        Last change time : 2012-05-26 11:38:58 

    # Run the shutdown command on GE2/0/0 of RouterA to simulate a link fault.

    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] shutdown
    [RouterA-GigabitEthernet2/0/0] quit

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

    [RouterB] display vrrp
      GigabitEthernet2/0/0 | 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-05-11 11:39:18                                           
        Last change time : 2012-05-26 11:38:58 

    # Run the undo shutdown command on GE2/0/0 of RouterA. After 20s, run the display vrrp command on RouterA to view the VRRP status. RouterA restores to be in Master state.

    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] undo shutdown
    [RouterA-GigabitEthernet2/0/0] quit
    [RouterA] display vrrp
      GigabitEthernet2/0/0 | 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-05-11 11:39:18                                           
        Last change time : 2012-05-26 11:38:58 

Configuration Files

  • RouterA configuration file

    #
    sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     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
    #
    ospf 1
     area 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 10.1.1.0 0.0.0.255
    #
    return
  • RouterB configuration file

    #
    sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.2.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.111
    #
    ospf 1
     area 0.0.0.0
      network 192.168.2.0 0.0.0.255
      network 10.1.1.0 0.0.0.255
    #
    return
  • RouterC configuration file

    #
    sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 172.16.1.1 255.255.255.0
    #
    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
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174116

Views: 51175

Downloads: 19

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