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, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

This document provides guidance for configuring reliability services, including interface backup, BFD, VRRP, and EFM.
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 VRRP on a QinQ Termination Sub-interface

Example for Configuring VRRP on a QinQ Termination Sub-interface

Networking Requirements

As shown in Figure 7-19, hosts on a LAN are dual-homed to RouterA and RouterB through LSW1. HostA belongs to VLAN 10 and HostB belongs to VLAN 20. User packets sent from LSW1 carry double tags. 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 within 20s.

Figure 7-19  Networking for configuring VRRP on a QinQ termination sub-interface

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 sub-interfaces of 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, 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. For details, see the configuration files.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 2/0/0.1
    [RouterA-GigabitEthernet2/0/0.1] ip address 10.1.1.1 24
    [RouterA-GigabitEthernet2/0/0.1] quit
    [RouterA] interface gigabitethernet 2/0/0.2
    [RouterA-GigabitEthernet2/0/0.2] ip address 10.1.2.1 24
    [RouterA-GigabitEthernet2/0/0.2] quit
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.2.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. For details, see the configuration files.

    [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 10.1.2.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] quit
    [RouterA-ospf-1] quit

  2. Configure Layer 2 forwarding.

    # Configure LSW2.

    <Huawei> system-view
    [Huawei] sysname LSW2
    [LSW2] vlan 10
    [LSW2-vlan10] quit
    [LSW2] interface gigabitethernet 1/0/0
    [LSW2-GigabitEthernet1/0/0] port link-type access
    [LSW2-GigabitEthernet1/0/0] port default vlan 10
    [LSW2-GigabitEthernet1/0/0] quit
    [LSW2] interface gigabitethernet 1/0/1
    [LSW2-GigabitEthernet1/0/1] port link-type trunk
    [LSW2-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [LSW2-GigabitEthernet1/0/1] quit
    

    # Configure LSW3.

    <Huawei> system-view
    [Huawei] sysname LSW3
    [LSW3] vlan 20
    [LSW3-vlan20] quit
    [LSW3] interface gigabitethernet 1/0/0
    [LSW3-GigabitEthernet1/0/0] port link-type access
    [LSW3-GigabitEthernet1/0/0] port default vlan 20
    [LSW3-GigabitEthernet1/0/0] quit
    [LSW3] interface gigabitethernet 1/0/1
    [LSW3-GigabitEthernet1/0/1] port link-type trunk
    [LSW3-GigabitEthernet1/0/1] port trunk allow-pass vlan 20
    [LSW3-GigabitEthernet1/0/1] quit
    

    # Configure LSW1.

    <Huawei> system-view
    [Huawei] sysname LSW1
    [LSW1] vlan 100
    [LSW1-vlan100] quit
    [LSW1] interface gigabitethernet 1/0/0
    [LSW1-GigabitEthernet1/0/0] port vlan-stacking vlan 10 stack-vlan 100
    [LSW1-GigabitEthernet1/0/0] quit
    [LSW1] interface gigabitethernet 1/0/1
    [LSW1-GigabitEthernet1/0/1] port vlan-stacking vlan 20 stack-vlan 100
    [LSW1-GigabitEthernet1/0/1] quit
    [LSW1] interface gigabitethernet 1/0/2
    [LSW1-GigabitEthernet1/0/2] port link-type trunk
    [LSW1-GigabitEthernet1/0/2] port trunk allow-pass vlan 100
    [LSW1-GigabitEthernet1/0/2] quit
    [LSW1] interface gigabitethernet 1/0/3
    [LSW1-GigabitEthernet1/0/3] port link-type trunk
    [LSW1-GigabitEthernet1/0/3] port trunk allow-pass vlan 100
    [LSW1-GigabitEthernet1/0/3] quit
    

  3. Configure VRRP on a QinQ termination sub-interface.

    # On RouterA, configure VRRP group 1 on GE2/0/0.1 and VRRP group 2 on GE2/0/0.2, and set the priority of RouterA in the two VRRP groups to 120 and the preemption delay to 20s.

    [RouterA] interface gigabitethernet 2/0/0.1
    [RouterA-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10
    [RouterA-GigabitEthernet2/0/0.1] qinq vrrp pe-vid 100 ce-vid 10
    [RouterA-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 10.1.1.111
    [RouterA-GigabitEthernet2/0/0.1] vrrp vrid 1 priority 120
    [RouterA-GigabitEthernet2/0/0.1] vrrp vrid 1 preempt-mode timer delay 20
    [RouterA-GigabitEthernet2/0/0.1] quit
    [RouterA] interface gigabitethernet 2/0/0.2
    [RouterA-GigabitEthernet2/0/0.2] qinq termination pe-vid 100 ce-vid 20
    [RouterA-GigabitEthernet2/0/0.2] qinq vrrp pe-vid 100 ce-vid 20
    [RouterA-GigabitEthernet2/0/0.2] vrrp vrid 2 virtual-ip 10.1.2.111
    [RouterA-GigabitEthernet2/0/0.2] vrrp vrid 2 priority 120
    [RouterA-GigabitEthernet2/0/0.2] vrrp vrid 2 preempt-mode timer delay 20
    [RouterA-GigabitEthernet2/0/0.2] quit

    # On RouterB, configure VRRP group 1 on GE2/0/0.1 and VRRP group 2 on GE2/0/0.2, and configure RouterB to use the default priority in the two VRRP groups.

    [RouterB] interface gigabitethernet 2/0/0.1
    [RouterB-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10
    [RouterB-GigabitEthernet2/0/0.1] qinq vrrp pe-vid 100 ce-vid 10
    [RouterB-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 10.1.1.111
    [RouterB-GigabitEthernet2/0/0.1] quit
    [RouterB] interface gigabitethernet 2/0/0.2
    [RouterB-GigabitEthernet2/0/0.2] qinq termination pe-vid 100 ce-vid 20
    [RouterB-GigabitEthernet2/0/0.2] qinq vrrp pe-vid 100 ce-vid 20
    [RouterB-GigabitEthernet2/0/0.2] vrrp vrid 2 virtual-ip 10.1.2.111
    [RouterB-GigabitEthernet2/0/0.2] quit

  4. 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 in the two VRRP groups.

    [RouterA] display vrrp
      GigabitEthernet2/0/0.1 | 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-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
                                                                                    
      GigabitEthernet2/0/0.2 | Virtual Router 2 
        State : Master
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    [RouterB] display vrrp
      GigabitEthernet2/0/0.1 | 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-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    
      GigabitEthernet2/0/0.2 | Virtual Router 2
        State : Backup
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    

    # Run the display ip routing-table command on RouterA and RouterB. The command output shows that a direct route to the virtual IP address exists in the routing table of RouterA and an OSPF route to the virtual IP address exists in the routing table of RouterB.

    [RouterA] display ip routing-table
    Route Flags: R - relay, D - download to fib, T -
    to vpn-instance
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 11       Routes : 13
    
    Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
    
           10.1.1.0/24  Direct 0    0           D  10.1.1.1        GigabitEthernet2/0/0.1
           10.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.1
         10.1.1.111/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.1
           10.1.2.0/24  Direct 0    0           D  10.1.2.1        GigabitEthernet2/0/0.2
           10.1.2.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.2
         10.1.2.111/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.2
          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
        192.168.1.0/24  OSPF   10   2           D  192.168.2.2     GigabitEthernet1/0/0
                        OSPF   10   2           D  10.1.1.2        GigabitEthernet2/0/0.1
                        OSPF   10   2           D  10.1.2.2        GigabitEthernet2/0/0.2
        192.168.2.0/24  Direct 0    0           D  192.168.2.1     GigabitEthernet1/0/0
        192.168.2.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
    
    [RouterB] display ip routing-table
    Route Flags: R - relay, D - download to fib, T -
    to vpn-instance
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 11       Routes : 15
    
    Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
    
           10.1.1.0/24  Direct 0    0           D  10.1.1.2        GigabitEthernet2/0/0.1
           10.1.1.2/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.1
         10.1.1.111/32  OSPF   10   2           D  10.1.1.1        GigabitEthernet2/0/0.1
                        OSPF   10   2           D  10.1.2.1        GigabitEthernet2/0/0.2
           10.1.2.0/24  Direct 0    0           D  10.1.2.2        GigabitEthernet2/0/0.2
           10.1.2.2/32  Direct 0    0           D  127.0.0.1       GigabitEthernet2/0/0.2
         10.1.2.111/32  OSPF   10   2           D  10.1.1.1        GigabitEthernet2/0/0.1
                        OSPF   10   2           D  10.1.2.1        GigabitEthernet2/0/0.2
          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
        192.168.1.0/24  Direct 0    0           D  192.168.1.1     GigabitEthernet1/0/0
        192.168.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
        192.168.2.0/24  OSPF   10   2           D  192.168.1.2     GigabitEthernet1/0/0
                        OSPF   10   2           D  10.1.1.1        GigabitEthernet2/0/0.1
                        OSPF   10   2           D  10.1.2.1        GigabitEthernet2/0/0.2

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

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

    # Run the display vrrp command on RouterA and RouterB. You can see that RouterA is in Initialize state and RouterB is in Master state in VRRP group 1.

    [RouterA] display vrrp
      GigabitEthernet2/0/0.1 | Virtual Router 1
        State : Initialize
        Virtual IP : 10.1.1.111
        Master IP : 0.0.0.0
        PriorityRun : 120
        PriorityConfig : 120
        MasterPriority : 0
        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-29 21:27:47                                           
        Last change time : 2012-05-29 21:29:10    
                                                                                    
      GigabitEthernet2/0/0.2 | Virtual Router 2 
        State : Master
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    [RouterB] display vrrp
      GigabitEthernet2/0/0.1 | 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-29 21:27:47                                           
        Last change time : 2012-05-29 21:29:10    
    
      GigabitEthernet2/0/0.2 | Virtual Router 2
        State : Backup
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    

    # Run the undo shutdown command on GE2/0/0.1 of RouterA.

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

    # After 20s, run the display vrrp command on RouterA and RouterB. You can see that RouterA is in Master state and RouterB is in Backup state in VRRP group 1.

    [RouterA] display vrrp
      GigabitEthernet2/0/0.1 | 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-29 21:29:47                                           
        Last change time : 2012-05-29 21:31:10    
                                                                                    
      GigabitEthernet2/0/0.2 | Virtual Router 2 
        State : Master
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    [RouterB] display vrrp
      GigabitEthernet2/0/0.1 | 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-29 21:29:47                                           
        Last change time : 2012-05-29 21:31:10    
    
      GigabitEthernet2/0/0.2 | Virtual Router 2
        State : Backup
        Virtual IP : 10.1.2.111
        Master IP : 10.1.2.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-0102
        Check TTL : YES
        Config type : normal-vrrp
        Backup-forward : disabled
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:27:10    
    

Configuration Files

  • RouterA configuration file

    #
    sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.2.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0.1
     qinq termination pe-vid 100 ce-vid 10
     qinq vrrp pe-vid 100 ce-vid 10
     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 GigabitEthernet2/0/0.2
     qinq termination pe-vid 100 ce-vid 20
     qinq vrrp pe-vid 100 ce-vid 20
     ip address 10.1.2.1 255.255.255.0
     vrrp vrid 2 virtual-ip 10.1.2.111
     vrrp vrid 2 priority 120
     vrrp vrid 2 preempt-mode timer delay 20
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.2.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • RouterB configuration file

    #
    sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0.1
     qinq termination pe-vid 100 ce-vid 10
     qinq vrrp pe-vid 100 ce-vid 10
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.111
    #
    interface GigabitEthernet2/0/0.2
     qinq termination pe-vid 100 ce-vid 20
     qinq vrrp pe-vid 100 ce-vid 20
     ip address 10.1.2.2 255.255.255.0
     vrrp vrid 2 virtual-ip 10.1.2.111
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.2.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • RouterC configuration file

    #
    sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.1.2 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • LSW1 configuration file

    #
    sysname LSW1
    #
    vlan batch 100
    #
    interface GigabitEthernet1/0/0
     port vlan-stacking vlan 10 stack-vlan 100
    #
    interface GigabitEthernet1/0/1
     port vlan-stacking vlan 20 stack-vlan 100
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet1/0/3
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of LSW2

    #
    sysname LSW2
    #
    vlan batch 10
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
  • LSW3 configuration file

    #
    sysname LSW3
    #
    vlan batch 20
    #
    interface GigabitEthernet1/0/0
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100069338

Views: 14239

Downloads: 43

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