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

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
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).
Configuration Examples

Configuration Examples

This section provides configuration examples of VRRP, including networking requirements, configuration roadmap, and configuration procedure.

Example for Configuring a VRRP Group in Active/Standby Mode

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

  • After Switch ModuleA recovers, it becomes the gateway.

Figure 11-46 Networking diagram for configuring a VRRP group

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

192.168.1.1/24

10GE1/17/2

VLANIF 100

10.1.1.1/24

SwitchB

10GE1/17/1

VLANIF 200

192.168.2.1/24

10GE1/17/2

VLANIF 100

10.1.1.2/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.2/24

10GE1/17/3

VLANIF 400

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

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure OSPF between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

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

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Verify the configuration.

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

    [Switch ModuleA] display vrrp verbose
    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 : 20s   Remain : --    
    TimerRun       : 1s                                                              
    TimerConfig    : 1s                                                           
    Auth Type      : NONE                                                            
    Virtual MAC    : 0000-5e00-0101                                                
    Check TTL      : YES                                                             
    Config Type    : Normal                                                   
    Create Time       : 2012-05-11 11:39:18                                           
    Last Change Time  : 2012-05-26 11:38:58 
    [Switch ModuleB] display vrrp verbose
    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 : 0s   Remain : --     
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0101                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:39:18                                      
    Last Change Time : 2012-05-26 11:38:58 

    # Run the shutdown command on 10GE1/17/2 of Switch ModuleA to simulate a link fault.

    [~Switch ModuleA] interface 10ge 1/17/2
    [~Switch ModuleA-10GE1/17/2] shutdown
    [*Switch ModuleA-10GE1/17/2] commit
    [~Switch ModuleA-10GE1/17/2] quit

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

    [Switch ModuleB] display vrrp verbose
    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 : 0s   Remain : --     
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0101                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:39:18                                      
    Last Change Time : 2012-05-26 11:38:58 

    # Run the undo shutdown command on 10GE1/17/2 of Switch ModuleA. After 20s, run the display vrrp command on Switch ModuleA to view the VRRP status. Switch ModuleA restores to be in Master state.

    [~Switch ModuleA] interface 10ge 1/17/2
    [~Switch ModuleA-10GE1/17/2] undo shutdown
    [*Switch ModuleA-10GE1/17/2] commit
    [~Switch ModuleA-10GE1/17/2] quit
    [Switch ModuleA] display vrrp verbose
    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 : 20s   Remain : --    
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0101                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:39:18                                      
    Last Change Time : 2012-05-26 11:38:58 

Configuration Files
  • Configuration file of Switch ModuleA

    #
    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 timer delay 20
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleB

    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleC

    #
    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 20.1.1.100 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 20.1.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
    

Example for Configuring a VRRP Group in Multi-gateway Load Balancing Mode

Networking Requirements
As shown in Figure 11-47, HostA and HostC are dual-homed to Switch ModuleA and Switch ModuleB through the switch. The requirements are as follows:
  • HostA uses Switch ModuleA as the default gateway to connect to the Internet, and Switch ModuleB functions as the backup gateway.
  • HostC uses Switch ModuleB as the default gateway to connect to the Internet, and Switch ModuleA functions as the backup gateway.
Therefore, load balancing can be implemented.
Figure 11-47 Networking diagram for configuring VRRP in multi-gateway load balancing mode

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

192.168.1.1/24

10GE1/17/2

VLANIF 100

10.1.1.1/24

SwitchB

10GE1/17/1

VLANIF 200

192.168.2.1/24

10GE1/17/2

VLANIF 100

10.1.1.2/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.2/24

10GE1/17/3

VLANIF 400

20.1.1.100/24

Configuration Roadmap

Multi-gateway load balancing are used to load balance traffic. The configuration roadmap is as follows:

  1. Assign an IP address to each interface and configure a routing protocol to ensure network connectivity.
  2. Create VRRP groups 1 and 2 on Switch ModuleA and Switch ModuleB. In VRRP group 1, configure Switch ModuleA as the master and Switch ModuleB as the backup. In VRRP group 2, configure Switch ModuleB as the master and Switch ModuleA as the backup.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure OSPF between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Configure VRRP groups.

    # Configure VRRP group 1 on Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleA to 120 and the preemption delay to 20s, and set the default priority for Switch ModuleB.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

    # Configure VRRP group 2 on Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleB to 120 and the preemption delay to 20s, and set the default priority for Switch ModuleA.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 2 virtual-ip 10.1.1.112
    [*Switch ModuleB-Vlanif100] vrrp vrid 2 priority 120
    [*Switch ModuleB-Vlanif100] vrrp vrid 2 preempt timer delay 20
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 2 virtual-ip 10.1.1.112
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    

  3. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on Switch ModuleA. You can see that Switch ModuleA is the master in VRRP group 1 and the backup in VRRP group 2.

    [Switch ModuleA] display vrrp verbose
    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 : 20s   Remain : --    
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0101                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:39:18                                      
    Last Change Time : 2012-05-26 11:38:58 
    
    Vlanif100 | Virtual Router 2
    State        : Backup
    Virtual IP     : 10.1.1.112
    Master IP      : 10.1.1.2
    PriorityRun    : 100
    PriorityConfig : 100                                                        
    MasterPriority : 120                                                        
    Preempt        : YES   Delay Time : 0s   Remain : --     
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0102                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:40:18                                      
    Last Change Time : 2012-05-26 11:48:58

    # After the configuration is complete, run the display vrrp command on Switch ModuleB. You can see that Switch ModuleB is the backup in VRRP group 1 and the master in VRRP group 2.

    [Switch ModuleB] display vrrp verbose
    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 : 0s   Remain : --     
    TimerRun       : 1s                                                              
    TimerConfig    : 1s                                                           
    Auth Type      : NONE                                                            
    Virtual MAC    : 0000-5e00-0101                                                
    Check TTL      : YES                                                             
    Config Type    : Normal                                                   
    Create Time      : 2012-05-11 11:39:18                                           
    Last Change Time : 2012-05-26 11:38:58 
    
    Vlanif100 | Virtual Router 2
    State        : Master
    Virtual IP     : 10.1.1.112
    Master IP      : 10.1.1.2
    PriorityRun    : 120
    PriorityConfig : 120                                                        
    MasterPriority : 120                                                        
    Preempt        : YES   Delay Time : 20s   Remain : --    
    TimerRun       : 1s                                                        
    TimerConfig    : 1s                                                        
    Auth Type      : NONE                                                       
    Virtual MAC    : 0000-5e00-0102                                             
    Check TTL      : YES                                                        
    Config Type    : Normal                                                
    Create Time      : 2012-05-11 11:40:18                                      
    Last Change Time : 2012-05-26 11:48:58

Configuration Files
  • Configuration file of Switch ModuleA

    #
    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 timer delay 20
     vrrp vrid 2 virtual-ip 10.1.1.112
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleB

    #
    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
     vrrp vrid 2 virtual-ip 10.1.1.112
     vrrp vrid 2 priority 120
     vrrp vrid 2 preempt timer delay 20
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleC

    #
    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 20.1.1.100 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 20.1.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
    

Example for Configuring a VRRP Group in Single-gateway Load Balancing Mode

Networking Requirements

As shown in Figure 11-48, HostA and HostC are dual-homed to Switch ModuleA and Switch ModuleB. Some users want to use Switch ModuleA to forward data traffic and use Switch ModuleB as the backup. Other users want to use Switch ModuleB to forward data traffic and use Switch ModuleA as the backup. Switch ModuleA and Switch ModuleB used as masters in different VRRP groups can back up each other and load balance data traffic.

Figure 11-48 Network diagram for configuring VRRP groups in single-gateway load balancing mode

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

192.168.1.1/24

10GE1/17/2

VLANIF 100

10.1.1.1/24

SwitchB

10GE1/17/1

VLANIF 200

192.168.2.1/24

10GE1/17/2

VLANIF 100

10.1.1.2/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.2/24

10GE1/17/3

VLANIF 400

20.1.1.100/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. Disable the ARP fast reply function on Switch ModuleA and Switch ModuleB.

  3. Configure two VRRP groups on Switch ModuleA and Switch ModuleB. Switch ModuleA is configured as the master in VRRP group 1. Switch ModuleB is configured as the master in VRRP group 2 so that traffic can be load balanced.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure OSPF between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Disable the ARP fast reply function.

    # Disable the ARP fast reply function on Switch ModuleA.

    [~Switch ModuleA] arp fast-reply disable
    [*Switch ModuleA] commit

    # Disable the ARP fast reply function on Switch ModuleB.

    [~Switch ModuleB] arp fast-reply disable
    [*Switch ModuleB] commit

  3. Configure VRRP groups.

    # Create VRRP groups 1 and 2 on VLANIF100 of Switch ModuleA, set the priority to 120 for Switch ModuleA in VRRP group 1 so that Switch ModuleA serves as the master in VRRP group 1, and set the priority to 100 for Switch ModuleA in VRRP group 2 so that Switch ModuleA serves as the backup in VRRP group 2.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 2

    # On VLANIF100 of Switch ModuleA, configure VRRP group 1 as a load-balance redundancy group (LBRG) and add VRRP group 2 to the LBRG.

    [*Switch ModuleA-Vlanif100] vrrp vrid 1 load-balance
    [*Switch ModuleA-Vlanif100] vrrp vrid 2 join load-balance-vrrp vrid 1
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Create VRRP groups 1 and 2 on VLANIF100 of Switch ModuleB in VRRP group 2 so that Switch ModuleB serves as the master in VRRP group 2 and as the backup in VRRP group 1.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*Switch ModuleB-Vlanif100] vrrp vrid 2
    [*Switch ModuleB-Vlanif100] vrrp vrid 2 priority 120

    # On VLANIF100 of Switch ModuleB, configure VRRP group 1 as an LBRG and add VRRP group 2 to the LBRG.

    [*Switch ModuleB-Vlanif100] vrrp vrid 1 load-balance
    [*Switch ModuleB-Vlanif100] vrrp vrid 2 join load-balance-vrrp vrid 1
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  4. Verify the configuration.

    Run the display vrrp command on Switch ModuleA. The command output shows that Switch ModuleA serves as the master in the LBRG and as a backup in the LBRG member group.

    [Switch ModuleA] display vrrp verbose
    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 : 0s    Remain : --
    TimerRun       : 1s
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Load-Balance
    Create Time       : 2012-10-19 03:29:46
    Last Change Time  : 2012-10-19 03:29:51
    
    Vlanif100 | Virtual Router 2
    State         : Backup
    Virtual IP    : 0.0.0.0
    Master IP     : 10.1.1.2
    PriorityRun    : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt        : YES   Delay Time : 0s Remain : --
    TimerRun       : 1s
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0102
    Check TTL      : YES
    Config Type    : Load-Blance-Member
    Create Time       : 2012-10-19 03:30:17
    Last Change Time  : 2012-10-19 03:33:05
                                               

    Run the display vrrp command on Switch ModuleB. The command output shows that Switch ModuleB serves as a backup in the LBRG and as the master in the LBRG member group.

    [Switch ModuleB] display vrrp verbose
    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 : 0s Remain : --
    TimerRun       : 1s
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Load-Balance
    Create Time       : 2012-10-19 03:32:29
    Last Change Time  : 2012-10-19 03:32:31
    
    Vlanif100 | Virtual Router 2
    State         : Master
    Virtual IP    : 0.0.0.0
    Master IP     : 10.1.1.2
    PriorityRun    : 120
    PriorityConfig : 120
    MasterPriority : 120
    Preempt        : YES   Delay Time : 0s
    TimerRun       : 1s
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0102
    Check TTL      : YES
    Config Type    : Load-Balance-Member
    Create Time       : 2012-10-19 03:32:51
    Last Change Time  : 2012-10-19 03:33:04
                                          

    Run the display vrrp load-balance command on Switch Module A. The command output shows information about the LBRG and its member group on Switch Module A.

    [Switch ModuleA] display vrrp load-balance member-vrrp
    Interface: Vlanif100, load-balance-vrrp vrid: 1, state: Master
      Member-vrrp number: 1
        Member-vrrp vrid: 2, state: Backup

    Run the display vrrp load-balance command on Switch Module B. The command output shows information about the LBRG and its member group on Switch Module B.

    [Switch ModuleB] display vrrp load-balance member-vrrp
    Interface: Vlanif100, load-balance-vrrp vrid: 1, state: Backup
      Member-vrrp number: 1
        Member-vrrp vrid: 2, state: Master

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    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 load-balance
     vrrp vrid 1 priority 120
     vrrp vrid 2
     vrrp vrid 2 join load-balance-vrrp vrid 1
    #
    interface VLANIF300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    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
     vrrp vrid 1 load-balance
     vrrp vrid 2
     vrrp vrid 2 priority 120
     vrrp vrid 2 join load-balance-vrrp vrid 1
    #
    interface VLANIF200
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass 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
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    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 20.1.1.100 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 20.1.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

Example for Configuring Association Between VRRP and BFD to Implement a Rapid Active/Standby Switchover

Networking Requirements

As shown in Figure 11-49, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master.

When Switch ModuleA or the link between Switch ModuleA and the switch is faulty, the switchover period is within 1s. This reduces the impact of the fault on service transmission.

Figure 11-49 Networking diagram for configuring association between VRRP and BFD to implement a rapid active/standby switchover


Configuration Roadmap

Association between VRRP and BFD is used to implement fast switching of master and backup gateways. 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 Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleA to 120 and the preemption delay to 20s so that Switch ModuleA functions as the master, and set the default priority for Switch ModuleB so that Switch ModuleB functions as the backup.
  3. Configure a static BFD session on Switch ModuleA and Switch ModuleB to monitor the link of the VRRP group.
  4. Configure association between VRRP and BFD on Switch ModuleB. When the link is faulty, an active/standby switchover can be performed rapidly.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface and configure a routing protocol. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan 100
    [*Switch ModuleA-vlan10] quit
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] ospf
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit
    [*Switch ModuleA] commit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB, and set the default priority of 100 for Switch ModuleB.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Configure a static BFD session.

    # Create a BFD session on Switch ModuleA.

    [~Switch ModuleA] bfd
    [*Switch ModuleA-bfd] quit
    [*Switch ModuleA] bfd atob bind peer-ip 10.1.1.2 interface vlanif 100
    [*Switch ModuleA-bfd-session-atob] discriminator local 1
    [*Switch ModuleA-bfd-session-atob] discriminator remote 2
    [*Switch ModuleA-bfd-session-atob] min-rx-interval 50
    [*Switch ModuleA-bfd-session-atob] min-tx-interval 50 
    [*Switch ModuleA-bfd-session-atob] commit
    [~Switch ModuleA-bfd-session-atob] quit
    

    # Create a BFD session on Switch ModuleB.

    [~Switch ModuleB] bfd
    [*Switch ModuleB-bfd] quit
    [*Switch ModuleB] bfd btoa bind peer-ip 10.1.1.1 interface vlanif 100
    [*Switch ModuleB-bfd-session-btoa] discriminator local 2
    [*Switch ModuleB-bfd-session-btoa] discriminator remote 1
    [*Switch ModuleB-bfd-session-btoa] min-rx-interval 50
    [*Switch ModuleB-bfd-session-btoa] min-tx-interval 50
    [*Switch ModuleB-bfd-session-btoa] commit
    [~Switch ModuleB-bfd-session-btoa] quit
    

    Run the display bfd session command on Switch ModuleA and Switch ModuleB. You can see that the BFD session is Up. The display on Switch Module A is used as an example.

    [Switch ModuleA] display bfd session all
    S: Static session
    D: Dynamic session
    IP: IP session
    IF: Single-hop session
    PEER: Multi-hop session
    AUTO: Automatically negotiated session
    Total UP/DOWN Session Number :  1/0
    --------------------------------------------------------------------------------
    Local Remote     PeerIpAddr      State     Type        InterfaceName 
    --------------------------------------------------------------------------------
    1     2          10.1.1.2        Up       S/IP-IF      Vlanif100
    --------------------------------------------------------------------------------

  4. Configure association between VRRP and BFD.

    # Configure association between VRRP and BFD on Switch ModuleB. When the BFD session becomes Down, the priority of Switch ModuleB increases by 40.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 track bfd 2 increase 40
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  5. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on Switch ModuleA and Switch ModuleB. Switch ModuleA is the master, Switch ModuleB is the backup, and the associated BFD session is in Up state.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:32:56
    Last Change Time : 2012-05-22 17:33:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : btoa             Priority Increased : 40
    BFD-session State: UP
    Create Time      : 2012-05-22 17:33:00
    Last Change Time : 2012-05-22 17:33:04

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleA to simulate a link fault. Then run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Initialize state, Switch ModuleB becomes the master, and the associated BFD session becomes Down.

    [~Switch ModuleA] interface 10ge 1/17/1
    [~Switch ModuleA-10GE1/17/1] shutdown
    [*Switch ModuleA-10GE1/17/1] commit
    [~Switch ModuleA-10GE1/17/1] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Initialize
    Virtual IP       : 10.1.1.3
    Master IP        : 0.0.0.0
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 0
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:32:56
    Last Change Time : 2012-05-22 17:33:06
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.2
    PriorityRun      : 140
    PriorityConfig   : 100
    MasterPriority   : 140
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : btoa             Priority Increased : 40
    BFD-session State: DOWN
    Create Time      : 2012-05-22 17:33:00
    Last change Time : 2012-05-22 17:33:06

    # Run the undo shutdown command on 10GE1/17/1 of Switch ModuleA. After 20s, run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA restores to be the master and Switch ModuleB the backup, and the associated BFD session is in Up state.

    [~Switch ModuleA] interface 10ge 1/17/1
    [~Switch ModuleA-10GE1/17/1] undo shutdown
    [*Switch ModuleA-10GE1/17/1] commit
    [~Switch ModuleA-10GE1/17/1] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:32:56
    Last Change Time : 2012-05-22 17:33:50
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : btoa             Priority Increased : 40
    BFD-session State: UP
    Create Time      : 2012-05-22 17:33:00
    Last Change Time : 2012-05-22 17:33:50

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 100
    #
     bfd
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.3
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    bfd atob bind peer-ip 10.1.1.2 interface Vlanif100
     discriminator local 1
     discriminator remote 2
     min-tx-interval 50
     min-rx-interval 50
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    vlan batch 100
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.3
     vrrp vrid 1 track bfd session-name btoa increase 40
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    bfd btoa bind peer-ip 10.1.1.1 interface Vlanif100
     discriminator local 2
     discriminator remote 1
     min-tx-interval 50
     min-rx-interval 50
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return

Example for Configuring Association Between VRRP and VRID-based Dynamic BFD to Implement a Rapid Active/Standby Switchover

Networking Requirements

As shown in Figure 11-50, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master.

When Switch ModuleA or the link between Switch ModuleA and the switch is faulty, the switchover period is within 1s. This reduces the impact of the fault on service transmission.

Figure 11-50 Networking diagram for configuring association between VRRP and VRID-based dynamic BFD to implement a rapid active/standby switchover
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 Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleA to 120 and the preemption delay to 20s so that Switch ModuleA functions as the master, and set the default priority for Switch ModuleB so that Switch ModuleB functions as the backup.
  3. Configure association between VRRP and VRID-based dynamic BFD on Switch ModuleA and Switch ModuleB. When the link is faulty, an active/standby switchover can be performed rapidly.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface and configure a routing protocol. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan 100
    [*Switch ModuleA-vlan10] quit
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] ospf
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit
    [*Switch ModuleA] commit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB. Switch ModuleB uses default value 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Enable global BFD.

    # Enable BFD onSwitch ModuleA.

    [~Switch ModuleA] bfd
    [*Switch ModuleA-bfd] quit
    [*Switch ModuleA] commit

    # Enable BFD onSwitch ModuleB.

    [~Switch ModuleB] bfd
    [*Switch ModuleB-bfd] quit
    [*Switch ModuleB] commit

  4. Configure association between VRRP and VRID-based BFD.

    # Configure association between VRRP and VRID-based BFD on Switch ModuleA.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 bfd peer-ip 10.1.1.2
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 bfd min-rx-interval 50 min-tx-interval 50 detect-multiplier 5
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure association between VRRP and VRID-based BFD on Switch ModuleB.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 bfd peer-ip 10.1.1.1
    [*Switch ModuleB-Vlanif100] vrrp vrid 1 bfd min-rx-interval 50 min-tx-interval 50 detect-multiplier 5
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

    Run the display vrrp bfd session command on Switch ModuleA and Switch ModuleB. You can see that the BFD session is Up. The display on Switch ModuleA is used as an example.

    [Switch ModuleA] display vrrp bfd session all
    Total BFD session(s) for VRRP: 1                                                
    ----------------------------------------------------------------                
    Interface                : Vlanif100                                            
    TXInterval(milliseconds) : 50   / 50   (Config / Running)                       
    RXInterval(milliseconds) : 50   / 50   (Config / Running)                       
    DetectMultiplier         : 5    / 5    (Config / Running)                       
    LocalIP                  : 10.1.1.1                                             
    PeerIP                   : 10.1.1.2                                             
    BFD State                : UP

  5. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on Switch ModuleA and Switch ModuleB. Switch ModuleA is the master, Switch ModuleB is the backup, and the associated BFD session is in Up state.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Master
    Virtual IP     : 10.1.1.3
    Master IP      : 10.1.1.1
    PriorityRun    : 120
    PriorityConfig : 120
    MasterPriority : 120
    Preempt        : YES   Delay Time : 20s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : UP               Type:Dynamic
    Create Time       : 2012-05-22 17:32:56
    Last Change Time  : 2012-05-22 17:33:00
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Backup
    Virtual IP     : 10.1.1.3
    Master IP      : 10.1.1.1
    PriorityRun    : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt        : YES   Delay Time : 0s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : UP               Type:Dynamic
    Create Time       : 2012-05-22 17:33:00
    Last Change Time  : 2012-05-22 17:33:04

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleA to simulate a link fault. Then run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Initialize state, Switch ModuleB becomes the master, and the associated BFD session becomes Down.

    [~Switch ModuleA] interface 10ge 1/17/1
    [~Switch ModuleA-10GE1/17/1] shutdown
    [*Switch ModuleA-10GE1/17/1] commit
    [~Switch ModuleA-10GE1/17/1] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Initialize
    Virtual IP     : 10.1.1.3
    Master IP      : 0.0.0.0
    PriorityRun    : 120
    PriorityConfig : 120
    MasterPriority : 0
    Preempt        : YES   Delay Time : 20s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : DOWN             Type:Dynamic
    Create Time       : 2012-05-22 17:32:56
    Last Change Time  : 2012-05-22 17:33:06
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Master
    Virtual IP     : 10.1.1.3
    Master IP      : 10.1.1.2
    PriorityRun    : 100
    PriorityConfig : 100
    MasterPriority : 100
    Preempt        : YES   Delay Time : 0s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : DOWN             Type:Dynamic 
    Create Time       : 2012-05-22 17:33:00
    Last change Time  : 2012-05-22 17:33:06

    # Run the undo shutdown command on 10GE1/17/1 of Switch ModuleA. After 20s, run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA restores to be the master and Switch ModuleB the backup, and the associated BFD session is in Up state.

    [~Switch ModuleA] interface 10ge 1/17/1
    [~Switch ModuleA-10GE1/17/1] undo shutdown
    [*Switch ModuleA-10GE1/17/1] commit
    [~Switch ModuleA-10GE1/17/1] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Master
    Virtual IP     : 10.1.1.3
    Master IP      : 10.1.1.1
    PriorityRun    : 120
    PriorityConfig : 120
    MasterPriority : 120
    Preempt        : YES   Delay Time : 20s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : UP               Type:Dynamic
    Create Time       : 2012-05-22 17:32:56
    Last Change Time  : 2012-05-22 17:33:50
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State        : Backup
    Virtual IP     : 10.1.1.3
    Master IP      : 10.1.1.1
    PriorityRun    : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt        : YES   Delay Time : 0s   Remain : --
    TimerRun       : 1s 
    TimerConfig    : 1s
    Auth Type      : NONE
    Virtual MAC    : 0000-5e00-0101
    Check TTL      : YES
    Config Type    : Normal
    BFD-session State : UP               Type:Dynamic
    Create Time       : 2012-05-22 17:33:00
    Last Change Time  : 2012-05-22 17:33:50

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 100
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.3
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
     vrrp vrid 1 bfd peer-ip 10.1.1.2
     vrrp vrid 1 bfd min-tx-interval 50 min-rx-interval 50 detect-multiplier 5 
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    vlan batch 100
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.3
     vrrp vrid 1 bfd peer-ip 10.1.1.1
     vrrp vrid 1 bfd min-tx-interval 50 min-rx-interval 50 detect-multiplier 5
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return

Example for Configuring Association Between VRRP and the Interface Status

Networking Requirements

As shown in Figure 11-51, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master.

When VLANIF 300 on Switch ModuleA becomes faulty, the VRRP group can immediately detect the fault and an active/standby switchover is performed. Switch ModuleB then continues to forward services. This reduces the impact of the fault on service transmission.

Figure 11-51 Network diagram for configuring association between VRRP and the interface status

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

192.168.1.1/24

10GE1/17/2

VLANIF 100

10.1.1.1/24

SwitchB

10GE1/17/1

VLANIF 200

192.168.2.1/24

10GE1/17/2

VLANIF 100

10.1.1.2/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.2/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 Switch ModuleA and Switch ModuleB, set a higher priority for Switch ModuleA so that Switch ModuleA functions as the master to forward traffic, and set a lower priority for switch modulesB so that switch modulesB functions as the backup.
  3. Configure association between VRRP and VLANIF 300. When the link between Switch ModuleA and Switch ModuleC becomes faulty, the VRRP group can immediately detect the fault and an active/standby switchover is performed.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure OSPF between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB. Switch ModuleB uses default value 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.3
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Configure association between VRRP and the interface status.

    # Configure association between VRRP and the interface status on Switch ModuleA. When VLANIF 100 becomes Down, the priority of Switch ModuleA decreases by 40.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 track interface vlanif 300 reduce 40
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

  4. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on Switch ModuleA and Switch ModuleB. Switch ModuleA is the master, Switch ModuleB is the backup, and the associated interface is in Up state.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal     
    Track IF         : Vlanif300   Priority Reduced : 40
    IF State       : UP
    Create Time      : 2012-05-22 17:32:56
    Last Change Time : 2012-05-22 17:33:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:33:00
    Last Change Time : 2012-05-22 17:33:04

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleA to simulate a link fault. Run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA switches to the Backup state, Switch ModuleB switches to the Master state, and the associated interface is in Down state.

    [~Switch ModuleA] interface vlanif 300
    [~Switch ModuleA-Vlanif300] shutdown
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.2
    PriorityRun      : 80
    PriorityConfig   : 120
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track IF         : Vlanif300   Priority Reduced : 40
    IF State       : DOWN
    Create Time      : 2012-05-22 17:33:56
    Last Change Time : 2012-05-22 17:34:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.2
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:34:00
    Last Change Time : 2012-05-22 17:34:04

    # Run the undo shutdown command on 10GE1/17/1 of Switch ModuleA. Run the display vrrp command on Switch ModuleA and Switch ModuleB. After 20s, you can see that Switch ModuleA restores to be the master, Switch ModuleB restores to be the backup, and the associated interface is in Up state.

    [~Switch ModuleA] interface vlanif 300
    [~Switch ModuleA-Vlanif300] undo shutdown
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit
    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track IF         : Vlanif300   Priority Reduced : 40
    IF State       : UP
    Create Time      : 2012-05-22 17:34:56
    Last Change Time : 2012-05-22 17:35:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.3
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:35:00
    Last Change Time : 2012-05-22 17:35:04

Configuration Files
  • Configuration file of Switch ModuleA

    #
    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.3
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
     vrrp vrid 1 track interface Vlanif300 reduce 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    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
  • Configuration file of Switch ModuleB

    #
    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.3
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    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
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 200 300
    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    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
    

Example for Configuring Association Between VRRP and BFD to Monitor the Uplink Status

Networking Requirements

As shown in Figure 11-52, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master. Generally, Switch ModuleA functions as the gateway and user traffic is along the path Switch -> Switch ModuleA -> Switch ModuleC -> Switch ModuleE.

When the link between Switch ModuleC and Switch ModuleE is faulty, the VRRP group can detect the fault within 1s and an active/standby switchover is performed rapidly. Then Switch ModuleB forwards services, so the impact of the link fault on service transmission is reduced.

Figure 11-52 Association between VRRP and BFD to monitor the uplink status

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 100

10.1.1.1/24

10GE1/17/2

VLANIF 300

192.168.1.1/24

SwitchB

10GE1/17/1

VLANIF 100

10.1.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.1/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 500

20.1.1.1/24

SwitchD

10GE1/17/1

VLANIF 200

192.168.2.2/24

10GE1/17/2

VLANIF 400

30.1.1.1/24

SwitchE

10GE1/17/1

VLANIF 500

20.1.1.2/24

10GE1/17/2

VLANIF 400

30.1.1.2/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 Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleA to 120 and the preemption delay to 20s so that Switch ModuleA functions as the master, and configure Switch ModuleB to use the default priority so that Switch ModuleB functions as the backup.
  3. Configure a static BFD session on Switch ModuleA and Switch ModuleE to monitor the link between Switch ModuleA and Switch ModuleE.
  4. Configure association between VRRP and BFD on Switch ModuleA. When the link is faulty, an active/standby switchover can be performed rapidly.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of other devices are similar to the configuration of switch modulesA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure OSPF between Switch Modules. Switch ModuleA is used as an example. The configurations of other Switch Modules are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [*Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB. Switch ModuleB uses default priority 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Configure a static BFD session.

    # Create a BFD session on Switch ModuleA.

    [~Switch ModuleA] bfd
    [*Switch ModuleA-bfd] quit
    [*Switch ModuleA] bfd atob bind peer-ip 20.1.1.2
    [*Switch ModuleA-bfd-session-atob] discriminator local 1
    [*Switch ModuleA-bfd-session-atob] discriminator remote 2
    [*Switch ModuleA-bfd-session-atob] min-rx-interval 50
    [*Switch ModuleA-bfd-session-atob] min-tx-interval 50 
    [*Switch ModuleA-bfd-session-atob] commit
    [~Switch ModuleA-bfd-session-atob] quit
    

    # Create a BFD session on Switch ModuleE.

    [~Switch ModuleE] bfd
    [*Switch ModuleE-bfd] quit
    [*Switch ModuleE] bfd btoa bind peer-ip 192.168.1.1
    [*Switch ModuleE-bfd-session-btoa] discriminator local 2
    [*Switch ModuleE-bfd-session-btoa] discriminator remote 1
    [*Switch ModuleE-bfd-session-btoa] min-rx-interval 50
    [*Switch ModuleE-bfd-session-btoa] min-tx-interval 50 
    [*Switch ModuleE-bfd-session-btoa] commit
    [~Switch ModuleE-bfd-session-btoa] quit
    

  4. Configure association between VRRP and BFD.

    # Configure association between VRRP and BFD on Switch ModuleA. When the BFD session becomes Down, the priority of Switch ModuleA decreases by 40.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 track bfd 1 reduce 40
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

  5. Verify the configuration.

    # After the configuration is complete, run the display vrrp command on Switch ModuleA and Switch ModuleB. Switch ModuleA is the master, Switch ModuleB is the backup, and the associated BFD session is in Up state.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : atob          Priority Reduced : 40
    BFD-session State: UP
    Create Time      : 2012-05-22 17:32:56
    Last Change Time : 2012-05-22 17:33:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:33:00
    Last Change Time : 2012-05-22 17:33:04

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleE to simulate a link fault.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # Run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Backup state, Switch ModuleB becomes the master, and the associated BFD session becomes Down.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 80
    PriorityConfig   : 120
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 20 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      :  0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : atob          Priority Reduced : 40
    BFD-session State: DOWN
    Create Time      : 2012-05-22 17:34:56
    Last Change Time : 2012-05-22 17:35:00
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 0 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:35:00
    Last Change Time : 2012-05-22 17:35:04

    # Run the undo shutdown command on of Switch ModuleE.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] undo shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # After 20s, run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA restores to be the master, Switch ModuleB restores to be the backup, and the associated BFD session is in Up state.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track BFD        : atob          Priority Reduced : 40
    BFD-session State: UP
    Create Time      : 2012-05-22 17:36:56
    Last Change Time : 2012-05-22 17:37:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0 s   Remain : --
    TimerRun         : 1 s 
    TimerConfig      : 1 s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:37:00
    Last Change Time : 2012-05-22 17:37:04

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    bfd
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.3
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
     vrrp vrid 1 track bfd session-name atob reduce 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    bfd atob bind peer-ip 20.1.1.2 
     discriminator local 1
     discriminator remote 2
     min-tx-interval 50
     min-rx-interval 50
     commit
    #
    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
  • Configuration file of Switch ModuleB

    #
    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.10
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    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
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 300 500
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif500
     ip address 20.1.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname SwitchD
    #
    vlan batch 200 400
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif400
     ip address 30.1.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 30.1.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleE

    #
    sysname SwitchE
    #
     vlan batch 400 500
    #
    bfd
    #
    interface Vlanif400
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif500
     ip address 20.1.1.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    bfd btoa bind peer-ip 192.168.1.1 
     discriminator local 2
     discriminator remote 1
     min-tx-interval 50
     min-rx-interval 50
     commit 
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
      network 30.1.1.0 0.0.0.255
    #
    return

Example for Configuring Association Between VRRP and NQA to Monitor the Uplink Status

Networking Requirements

As shown in Figure 11-53, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master. Generally, Switch ModuleA functions as the gateway and user traffic is along the path Switch -> Switch ModuleA -> Switch ModuleC -> Switch ModuleE.

When the link between Switch ModuleC and Switch ModuleE is faulty, the VRRP group is required to be able to detect the fault. Then an active/standby switchover is performed rapidly andSwitch ModuleB takes over services. This reduces the impact of the link fault on service forwarding.

Figure 11-53 Association between VRRP and NQA to monitor the uplink status

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 100

10.1.1.1/24

10GE1/17/2

VLANIF 300

192.168.1.1/24

SwitchB

10GE1/17/1

VLANIF 100

10.1.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.1/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 500

20.1.1.1/24

SwitchD

10GE1/17/1

VLANIF 200

192.168.2.2/24

10GE1/17/2

VLANIF 400

30.1.1.1/24

SwitchE

10GE1/17/1

VLANIF 500

20.1.1.2/24

10GE1/17/2

VLANIF 400

30.1.1.2/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 Switch ModuleA and Switch ModuleB. Set the priority of Switch ModuleA to 120 and the preemption delay to 20s so that Switch ModuleA functions as the master. Configure Switch ModuleB to use the default priority so that Switch ModuleB functions as the backup.
  3. Configure an NQA test instance of ICMP on Switch ModuleA, specify the IP address of 10GE1/17/1 on Switch ModuleE as the destination address, and configure the NQA test instance to detect connectivity of the link between Switch ModuleA and Switch ModuleE.
  4. Configure association between VRRP and NQA on Switch ModuleA. When the link is faulty, an active/standby switchover can be performed rapidly.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB, Switch ModuleC, Switch ModuleD, and Switch ModuleE are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Configure Layer 2 transmission on the switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface 10ge 1/17/0
    [Switch-10GE1/17/0] port link-type trunk
    [Switch-10GE1/17/0] port trunk allow-pass vlan 100
    [Switch-10GE1/17/0] port trunk pvid vlan 100
    [Switch-10GE1/17/0] undo port trunk allow-pass vlan 1
    [Switch-10GE1/17/0] quit
    [Switch] interface 10ge 2/17/0
    [Switch-10GE2/17/0] port link-type trunk
    [Switch-10GE2/17/0] port trunk allow-pass vlan 100
    [Switch-10GE2/17/0] port trunk pvid vlan 100
    [Switch-10GE2/17/0] undo port trunk allow-pass vlan 1
    [Switch-10GE2/17/0] quit

    # Configure OSPF between devices. Switch ModuleA is used as an example. The configurations of Switch ModuleB, Switch ModuleC, Switch ModuleD, and Switch ModuleE are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] commit
    [~Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [~Switch ModuleA-ospf-1] quit

  2. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB. Switch ModuleB uses default priority 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Configure an NQA test instance.

    # Configure an NQA test instance of ICMP with destination IP address 20.1.1.2/24 on Switch ModuleA.

    [~Switch ModuleA] nqa test-instance user test
    [*Switch ModuleA-nqa-user-test] test-type icmp
    [*Switch ModuleA-nqa-user-test] destination-address ipv4 20.1.1.2
    [*Switch ModuleA-nqa-user-test] frequency 15
    [*Switch ModuleA-nqa-user-test] start now
    [*Switch ModuleA-nqa-user-test] commit
    [~Switch ModuleA-nqa-user-test] quit

    # Run the display nqa results test-instance user test command on Switch ModuleA. The command output shows that the NQA test instance status is success.

    [Switch ModuleA] display nqa results test-instance user test
    NQA entry(user, test) :testflag is active ,testtype is icmp
     1 . Test 12 result   The test is finished                                     
       Send operation times: 1                Receive response times: 0             
       Completion: success                     RTD OverThresholds number: 0         
       Attempts number: 1                     Drop operation number: 0              
       Disconnect operation number: 0         Operation timeout number: 5           
       System busy operation number: 0        Connection fail number: 0             
       Operation sequence errors number: 0    RTT Status errors number: 0            
       Destination ip address: 20.1.1.2                                           
       Min/Max/Average Completion Time: 0/0/0                                       
       Sum/Square-Sum  Completion Time: 0/0                                         
       Last Good Probe Time: 0000-00-00 00:00:00.0             
       Lost packet ratio: 100 % 

  4. Configure association between VRRP and NQA.

    # Configure association between VRRP and NQA on Switch ModuleA. When the NQA test instance is failed, the priority of Switch ModuleA decreases by 40.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 track nqa user test reduced 40
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

  5. Verify the configuration.

    # After the configuration is complete, run the display vrrp verbose command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is the master, Switch ModuleB is the backup, and the associated NQA test instance is success.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track NQA           : user test          Priority Reduced : 40
    NQA State           : success
    Create Time         : 2012-05-22 17:32:56
    Last Change Time    : 0000-00-00 00:00:00
    
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:33:00
    Last Change Time : 0000-00-00 00:00:00

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleE to simulate a link fault.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # Run the display vrrp verbose command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Backup state, Switch ModuleB becomes the master, and the NQA test instance is failed.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 80
    PriorityConfig   : 120
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track NQA        : user test          Priority Reduced : 40
    NQA State        : failed
    Create Time      : 2012-05-22 17:34:56
    Last Change Time : 2012-05-22 17:35:00
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:35:00
    Last Change Time : 2012-05-22 17:35:04

    # Run the undo shutdown command on 10GE1/17/1 of Switch ModuleE.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] undo shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # After 20s, run the display vrrp verbose command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA restores to be the master and Switch ModuleB the backup, and the associated NQA test instance status is success.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track NQA        : user test          Priority Reduced : 40
    NQA State        : success
    Create Time      : 2012-05-22 17:36:56
    Last Change Time : 2012-05-22 17:37:00
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time      : 2012-05-22 17:37:00
    Last Change Time : 2012-05-22 17:37:04

Configuration Files
  • Configuration file of Switch ModuleA

    #
    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.10
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
     vrrp vrid 1 track nqa user test reduce 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    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
    #
    nqa test-instance user test
     test-type icmp
     destination-address ipv4 20.1.1.2
     frequency 15
     start now
    #
    return
  • Configuration file of Switch ModuleB

    #
    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.10
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    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
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 300 500
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif500
     ip address 20.1.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname SwitchD
    #
    vlan batch 200 400
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif400
     ip address 30.1.1.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 30.1.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleE

    #
    sysname SwitchE 
    #
    vlan batch 400 500
    #
    interface Vlanif400
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif500
     ip address 20.1.1.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
      network 30.1.1.0 0.0.0.255
    #
    return
  • Configuration file of the switch

    #
    sysname Switch 
    #
    vlan batch 100
    #
    interface 10GE1/17/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE2/17/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return

Example for Configuring Association Between VRRP and Routing to Monitor the Uplink Status

Networking Requirements

As shown in Figure 11-54, hosts on a LAN are dual-homed to Switch ModuleA and Switch ModuleB through the switch. A VRRP group is established on Switch ModuleA and Switch ModuleB, and Switch ModuleA is the master. Switch ModuleA functions as the gateway and user traffic is forwarded along the path Switch -> Switch ModuleA -> Switch ModuleC -> Switch ModuleE.

When the route between Switch ModuleC and Switch ModuleE is withdrawn or becomes inactive, the VRRP group is required to be able to detect the fault. Then an active/standby switchover is performed rapidly and Switch ModuleB takes over services. This reduces the impact of the link fault on service forwarding.

Figure 11-54 Association between VRRP and routing to monitor the uplink status

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 100

10.1.1.1/24

10GE1/17/2

VLANIF 300

192.168.1.1/24

SwitchB

10GE1/17/1

VLANIF 100

10.1.1.2/24

10GE1/17/2

VLANIF 200

192.168.2.1/24

SwitchC

10GE1/17/1

VLANIF 300

192.168.1.2/24

10GE1/17/2

VLANIF 500

20.1.1.1/24

SwitchD

10GE1/17/1

VLANIF 200

192.168.2.2/24

10GE1/17/2

VLANIF 400

30.1.1.1/24

SwitchE

10GE1/17/1

VLANIF 500

20.1.1.2/24

10GE1/17/2

VLANIF 400

30.1.1.2/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 Switch ModuleA and Switch ModuleB, set a higher priority for Switch ModuleA so that Switch ModuleA functions as the master to forward traffic and set the preemption delay to 20s, and set a lower priority for Switch ModuleB so that Switch ModuleB functions as the backup.
  3. Configure association between VRRP and routing on Switch ModuleA so that an active/standby switchover is performed immediately when the monitored route is withdrawn or becomes inactive.

Procedure

  1. Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB, Switch ModuleC, Switch ModuleD, and Switch ModuleE are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 10.1.1.1 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ip address 192.168.1.1 24
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

  2. Configure Layer 2 transmission on the switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface 10ge 1/17/0
    [Switch-10GE1/17/0] port link-type trunk
    [Switch-10GE1/17/0] port trunk allow-pass vlan 100
    [Switch-10GE1/17/0] port trunk pvid vlan 100
    [Switch-10GE1/17/0] undo port trunk allow-pass vlan 1
    [Switch-10GE1/17/0] quit
    [Switch] interface 10ge 2/17/0
    [Switch-10GE2/17/0] port link-type trunk
    [Switch-10GE2/17/0] port trunk allow-pass vlan 100
    [Switch-10GE2/17/0] port trunk pvid vlan 100
    [Switch-10GE2/17/0] undo port trunk allow-pass vlan 1
    [Switch-10GE2/17/0] quit

  3. Configure VRRP groups.

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

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Configure VRRP group 1 on Switch ModuleB. Switch ModuleB uses default priority 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  4. Configure IS-IS. Switch ModuleA, Switch ModuleC, and Switch ModuleE are used as an example. The configurations of Switch ModuleB and Switch ModuleD are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    # Set the IS-IS NET of Switch ModuleA to 10.0000.0000.0001.00, and set the IS-IS level to 1.

    [~Switch ModuleA] isis 1
    [~Switch ModuleA-isis-1] is-level level-1 
    [*Switch ModuleA-isis-1] network-entity 10.0000.0000.0001.00
    [*Switch ModuleA-isis-1] quit
    [*Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] isis enable 1
    [*Switch ModuleA-Vlanif300] quit
    [*Switch ModuleA] commit

    # Set the IS-IS NET of Switch ModuleC to 10.0000.0000.0002.00, and set the IS-IS level to 1.

    [~Switch ModuleC] isis 1
    [~Switch ModuleC-isis-1] is-level level-1 
    [*Switch ModuleC-isis-1] network-entity 10.0000.0000.0002.00
    [*Switch ModuleC-isis-1] quit
    [*Switch ModuleC] interface vlanif 300
    [*Switch ModuleC-Vlanif300] isis enable 1
    [*Switch ModuleC-Vlanif300] quit
    [*Switch ModuleC] interface vlanif 500
    [*Switch ModuleC-Vlanif500] isis enable 1
    [*Switch ModuleC-Vlanif500] quit
    [*Switch ModuleC] commit

    # Set the IS-IS NET of Switch ModuleE to 10.0000.0000.0003.00 and 20.0000.0000.0003.00, and set the IS-IS level to 1.

    [~Switch ModuleE] isis 1
    [~Switch ModuleE-isis-1] is-level level-1 
    [*Switch ModuleE-isis-1] network-entity 10.0000.0000.0003.00
    [*Switch ModuleE-isis-1] quit
    [*Switch ModuleE] interface vlanif 500
    [*Switch ModuleE-Vlanif500] isis enable 1
    [*Switch ModuleE-Vlanif500] quit
    [*Switch ModuleE] isis 2
    [~Switch ModuleE-isis-2] is-level level-1 
    [*Switch ModuleE-isis-2] network-entity 20.0000.0000.0003.00
    [*Switch ModuleE-isis-2] quit
    [*Switch ModuleE] interface vlanif 400
    [*Switch ModuleE-Vlanif400] isis enable 2
    [*Switch ModuleE-Vlanif400] quit
    [*Switch ModuleE] commit

  5. Configure association between VRRP and routing on Switch ModuleA. When the associated route is withdrawn, the priority of Switch ModuleA decreases by 40.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp vrid 1 track ip route 20.1.1.0 24 reduce 40
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

  6. Verify the configuration.

    # After the configuration is complete, run the display isis route command on Switch ModuleA. You can see a route to network segment 20.1.1.0/24.

    [Switch ModuleA] display isis route
                                                                                    
                             Route information for ISIS(1)                          
                             -----------------------------                          
                                                                                    
                            ISIS(1) Level-1 Forwarding Table                        
                            --------------------------------                        
                                                                                    
    IPV4 Destination     IntCost    ExtCost ExitInterface   NextHop         Flags   
    ------------------------------------------------------------------------------- 
    192.168.1.0/24       10         NULL    Vlanif300       Direct          D/-/L/- 
    20.1.1.0/24          20         NULL    Vlanif300       192.168.1.2     A/-/-/- 
         Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,     
                                   U-Up/Down Bit Set                                

    # Run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is the master, Switch ModuleB is the backup, and the associated route is reachable.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track IP Route : 20.1.1.0/24  Priority Reduced : 40                         
    IP Route State : Reachable                                                  
    Create Time : 2012-05-29 21:25:47                                           
    Last Change Time : 2012-05-29 21:25:51
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time : 2012-05-29 21:25:47                                           
    Last Change Time : 2012-05-29 21:25:51

    # Run the shutdown command on 10GE1/17/1 of Switch ModuleE to simulate a link fault.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # Run the display isis route command on Switch ModuleA. You can see that the route to network segment 20.1.1.0/24 is withdrawn.

    [Switch ModuleA] display isis route
                                                                                    
                             Route information for ISIS(1)                          
                             -----------------------------                          
                                                                                    
                            ISIS(1) Level-1 Forwarding Table                        
                            --------------------------------                        
                                                                                    
    IPV4 Destination     IntCost    ExtCost ExitInterface   NextHop         Flags   
    ------------------------------------------------------------------------------- 
    192.168.1.0/24       10         NULL    Vlanif300       Direct          D/-/L/- 
         Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,     
                                   U-Up/Down Bit Set                                

    # Run the display vrrp command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Backup state, Switch ModuleB is in Master state, and the associated route is unreachable.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 80
    PriorityConfig   : 120
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track IP Route : 20.1.1.0/24  Priority Reduced : 40                         
    IP Route State : Unreachable
    Create Time : 2012-05-29 21:25:47
    Last Change Time : 2012-05-29 21:25:51
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.2
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 100
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time : 2012-05-29 21:25:47
    Last Change Time : 2012-05-29 21:25:51

    # Run the undo shutdown command on 10GE1/17/1 of Switch ModuleE.

    [~Switch ModuleE] interface 10ge 1/17/1
    [~Switch ModuleE-10GE1/17/1] undo shutdown
    [*Switch ModuleE-10GE1/17/1] commit
    [~Switch ModuleE-10GE1/17/1] quit

    # After 20s, run the display vrrp verbose command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA restores to be the master and Switch ModuleB the backup, and the associated route is reachable.

    [Switch ModuleA] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Master
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 120
    PriorityConfig   : 120
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 20s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Track IP Route : 20.1.1.0/24  Priority Reduced : 40
    IP Route State : Reachable
    Create Time : 2012-05-29 21:27:47
    Last Change Time : 2012-05-29 21:27:51
    [Switch ModuleB] display vrrp verbose
    Vlanif100 | Virtual Router 1
    State          : Backup
    Virtual IP       : 10.1.1.10
    Master IP        : 10.1.1.1
    PriorityRun      : 100
    PriorityConfig   : 100
    MasterPriority   : 120
    Preempt          : YES   Delay Time : 0s   Remain : --
    TimerRun         : 1s 
    TimerConfig      : 1s
    Auth Type        : NONE
    Virtual MAC      : 0000-5e00-0101
    Check TTL        : YES
    Config Type      : Normal
    Create Time : 2012-05-29 21:27:47                                           
    Last Change Time : 2012-05-29 21:27:51      

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 100 300
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0001.00
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.10
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt timer delay 20
     vrrp vrid 1 track ip route 20.1.1.0 255.255.255.0 reduce 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
     isis enable 1
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    return
    
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    vlan batch 100 200
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0001.00
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.10
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
     isis enable 2
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    return
    
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 300 500
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0002.00
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
     isis enable 1
    #
    interface Vlanif500
     ip address 20.1.1.1 255.255.255.0
     isis enable 1
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    return 
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    vlan batch 200 400
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0002.00
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
     isis enable 2
    #
    interface Vlanif400
     ip address 30.1.1.1 255.255.255.0
     isis enable 2
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    return 
  • Configuration file of Switch ModuleE

    #
    sysname Switch ModuleE
    #
    vlan batch 400 500
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0003.00
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0003.00
    #
    interface Vlanif400
     ip address 30.1.1.2 255.255.255.0
     isis enable 2
    #
    interface Vlanif500
     ip address 20.1.1.2 255.255.255.0
     isis enable 1
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    return 
  • Configuration file of the switch

    #
    sysname Switch 
    #
    vlan batch 100
    #
    interface 10GE1/17/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface 10GE2/17/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return

Example for Configuring Association Between a VRRP Group and a Direct Route

Networking Requirements

As shown in Figure 11-55, the VRRP group consisting of NPE1 and NPE2 functions as the gateway and uplink traffic is sent to the master NPE1. OSPF runs between NPE1, NPE2, and NPE3 to ensure connectivity. The path that downlink traffic passes depends on OSPF route selection. On NPE3, there are two equal-cost OSPF routes to network segment 10.1.1.0/24, so downlink traffic may be load balanced. In this case, uplink and downlink traffic are transmitted along different paths, so data is blocked by the firewall. It is required that uplink and downlink traffic be transmitted along the same path so that data can pass the firewall.

Figure 11-55 Association between a VRRP group and a direct route
Configuration Roadmap

The configuration roadmap is as follows:

  • Configure a VRRP group on NPE1 and NPE2 to improve link reliability.

  • Configure OSPF on NPE1, NPE2, and NPE3 to ensure connectivity at the network layer.

  • Configure association between a direct route and a VRRP group on NPE1 and NPE2.

  • Configure OSPF to import direct routes and retain the cost of the imported route on NPE1 and NPE2 so that VRRP can be associated with direct routes.

Procedure

  1. Assign a name to each device and an IP address to each interface. For details, see the configuration files.
  2. Configure VRRP groups.

    # Create VLAN 100 on the UPE, and add 10GE1/17/1 and 10GE1/17/2 to VLAN 10 so that VRRP Advertisement packets from NPE1 and NPE2 can be transparently transmitted.

    <UPE> system-view
    [~UPE] vlan 100
    [~UPE-vlan100] port 10ge 1/17/1
    [*UPE-vlan100] port 10ge 1/17/2
    [*UPE-vlan100] commit
    [~UPE-vlan100] quit

    # Create VRRP group 1 on NPE1 and set the priority of NPE1 in the group to 120 so that NPE1 functions as the master.

    <NPE1> system-view
    [~NPE1] interface vlanif 100
    [~NPE1-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*NPE1-Vlanif100] vrrp vrid 1 priority 120
    [*NPE1-Vlanif100] vrrp vrid 1 preempt timer delay 60
    [*NPE1-Vlanif100] commit
    [~NPE1-Vlanif100] quit

    # Create VRRP group 1 on NPE2 and set the priority of NPE2 to 100 so that NPE2 functions as the backup.

    <NPE2> system-view
    [~NPE2] interface vlanif 100
    [~NPE2-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
    [*NPE2-Vlanif100] commit
    [~NPE2-Vlanif100] quit

  3. Configure OSPF.

    # Configure OSPF on NPE1.

    [~NPE1] ospf 1
    [*NPE1-ospf-1] area 0
    [*NPE1-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
    [*NPE1-ospf-1-area-0.0.0.0] commit
    [~NPE1-ospf-1-area-0.0.0.0] quit
    [~NPE1-ospf-1] quit

    # Configure OSPF on NPE2.

    [~NPE2] ospf 1
    [*NPE2-ospf-1] area 0
    [*NPE2-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
    [*NPE2-ospf-1-area-0.0.0.0] commit
    [~NPE2-ospf-1-area-0.0.0.0] quit
    [~NPE2-ospf-1] quit

    # Configure OSPF on NPE3.

    <NPE3> system-view
    [~NPE3] ospf 1
    [*NPE3-ospf-1] area 0
    [*NPE3-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
    [*NPE3-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
    [*NPE3-ospf-1-area-0.0.0.0] commit
    [~NPE3-ospf-1-area-0.0.0.0] quit
    [~NPE3-ospf-1] quit

  4. Configure association between a direct route and a VRRP group.

    # Configure NPE1.

    [~NPE1] interface vlanif 100
    [~NPE1-Vlanif100] direct-route track vrrp vrid 1 degrade-cost 300
    [*NPE1-Vlanif100] commit
    [~NPE1-Vlanif100] quit

    # Configure NPE2.

    [~NPE2] interface vlanif 100
    [~NPE2-Vlanif100] direct-route track vrrp vrid 1 degrade-cost 300
    [*NPE2-Vlanif100] commit
    [~NPE2-Vlanif100] quit

  5. Configure OSPF to import direct routes.

    # Configure NPE1.

    [~NPE1] ospf 1
    [~NPE1-ospf-1] import-route direct
    [*NPE1-ospf-1] default cost inherit-metric
    [*NPE1-ospf-1] commit
    [~NPE1-ospf-1] quit

    # Configure NPE2.

    [~NPE2] ospf 1
    [~NPE2-ospf-1] import-route direct
    [*NPE2-ospf-1] default cost inherit-metric
    [*NPE2-ospf-1] commit
    [~NPE2-ospf-1] quit

  6. Verify the configuration.

    # Run the display ip routing-table command on NPE2 to view the IP routing table. You can see that the cost of the direct route on the network segment where the VRRP-enabled interface is located is 300.

    [NPE2] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 12       Routes : 12        
    
    Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface
    
           10.1.1.0/24  Direct 0    300           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  O_ASE  150  0             D  10.1.2.2        Vlanif200
         10.1.1.255/32  Direct 0    0             D  127.0.0.1       Vlanif100
           10.1.2.0/24  Direct 0    0             D  10.1.2.1        Vlanif200
           10.1.2.1/32  Direct 0    0             D  127.0.0.1       Vlanif200
         10.1.2.255/32  Direct 0    0             D  127.0.0.1       Vlanif200
           10.1.3.0/24  OSPF   10   2             D  10.1.2.2        Vlanif200
          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
    127.255.255.255/32  Direct 0    0             D  127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct 0    0             D  127.0.0.1       InLoopBack0

    # Run the display ip routing-table 10.1.1.0 command on NPE3 to view the route to the user network segment. You can see that NPE3 sends downlink traffic through the route with the next hop address of 10.1.3.1.

    [NPE3] display ip routing-table 10.1.1.0
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : _public_
    Summary Count : 1
    
    Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface
    
           10.1.1.0/24  O_ASE  150  0             D  10.1.3.1        Vlanif300

Configuration Files
  • Configuration file of the UPE

    #
    sysname UPE
    #
    vlan batch 100
    #               
    interface 10GE1/17/1
     port default vlan 100
    #               
    interface 10GE1/17/2
     port default vlan 100
    #
    return
  • Configuration file of NPE1

    #
    sysname NPE1
    #
    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
     direct-route track vrrp vrid 1 degrade-cost 300
    #
    interface Vlanif300
     ip address 10.1.3.1 255.255.255.0
    #
    interface 10GE1/17/1
     port default vlan 300
    #
    interface 10GE1/17/2
     port default vlan 100
    #               
    ospf 1          
     default cost inherit-metric
     import-route direct
     area 0.0.0.0   
      network 10.1.3.0 0.0.0.255
    #
    return
  • Configuration file of NPE2

    #
    sysname NPE2
    #
    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
     direct-route track vrrp vrid 1 degrade-cost 300
    #
    interface Vlanif200
     ip address 10.1.2.1 255.255.255.0
    #
    interface 10GE1/17/1
     port default vlan 200
    #
    interface 10GE1/17/2
     port default vlan 100
    #               
    ospf 1          
     default cost inherit-metric
     import-route direct
     area 0.0.0.0   
      network 10.1.2.0 0.0.0.255
    #
    return
  • Configuration file of NPE3

    #
    sysname NPE3
    #
    vlan batch 200 300
    #
    interface Vlanif200
     ip address 10.1.2.2 255.255.255.0
    # 
    interface Vlanif300
     ip address 10.1.3.2 255.255.255.0
    #
    interface 10GE1/17/1
     port default vlan 200
    #
    interface 10GE1/17/2
     port default vlan 300
    #              
    ospf 1          
     area 0.0.0.0   
      network 10.1.2.0 0.0.0.255
      network 10.1.3.0 0.0.0.255
    #
    return

Example for Configuring a VRRP6 Group in Active/Standby Mode

Networking Requirements
As shown in Figure 11-56, HostA is dual-homed to Switch ModuleA and Switch ModuleB through the switch on the IPv6 network. The requirements are as follows:
  • The host uses Switch ModuleA as the default gateway to connect to the Internet. When Switch ModuleA becomes faulty, Switch ModuleB functions as the gateway. This implements gateway backup.

  • After Switch ModuleA recovers, it becomes the gateway within 20s.

Figure 11-56 Networking diagram for a VRRP6 group in active/standby mode

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

2002::1/64

10GE1/17/2

VLANIF 100

2000::1/64

SwitchB

10GE1/17/1

VLANIF 200

2001::1/64

10GE1/17/2

VLANIF 100

2000::2/64

SwitchC

10GE1/17/1

VLANIF 300

2002::2/64

10GE1/17/2

VLANIF 200

2001::2/64

10GE1/17/3

VLANIF 400

2003::2/64

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

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IP address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 300
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ipv6 enable
    [*Switch ModuleA-Vlanif100] ipv6 address 2000::1 64
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ipv6 enable
    [*Switch ModuleA-Vlanif300] ipv6 address 2002::1 64
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

    # Configure OSPFv3 between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospfv3
    [*Switch ModuleA-ospfv3-1] router-id 1.1.1.1
    [*Switch ModuleA-ospfv3-1] commit
    [~Switch ModuleA-ospfv3-1] quit
    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [~Switch ModuleA-Vlanif300] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

  2. Configure VRRP6 groups.

    # Configure VRRP6 group 1 on Switch ModuleA, and set the priority of Switch ModuleA to 120 and the preemption delay to 20s.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    

    # Configure VRRP6 group 1 on Switch ModuleB. Switch ModuleB uses default value 100.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Verify the configuration.

    # After the configuration is complete, run the display vrrp6 verbose command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Master state and Switch ModuleB is in Backup state.

    [Switch ModuleA] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Master
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 20s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    
    [Switch ModuleB] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Backup
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 0s     Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    

    # Run the shutdown command on 10GE1/17/2 of Switch ModuleA to simulate a link fault.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

    # Run the display vrrp6 command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Initialize state and Switch ModuleB is in Master state.

    [Switch ModuleA] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Initialize
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : ::
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 0
    Preempt         : YES    Delay Time : 20s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    
    [Switch ModuleB] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Master
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FE68:7455
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 100
    Preempt         : YES    Delay Time : 0s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    

    # Run the undo shutdown command on 10GE1/17/2 of Switch ModuleA. After 20s, run the display vrrp6 command on Switch ModuleA and Switch ModuleB. You can see that Switch ModuleA is in Master state and Switch ModuleB is in Backup state.

    [~Switch ModuleA] interface 10ge 1/17/2
    [~Switch ModuleA-10GE1/17/2] undo shutdown
    [*Switch ModuleA-10GE1/17/2] commit
    [~Switch ModuleA-10GE1/17/2] quit
    
    [Switch ModuleA] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Master
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 20s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    
    [Switch ModuleB] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Backup
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 0s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    ospfv3 1
     router-id 1.1.1.1
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::1/64
     ospfv3 1 area 0.0.0.0
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
     vrrp6 vrid 1 priority 120
     vrrp6 vrid 1 preempt timer delay 20
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    ospfv3 1
     router-id 2.2.2.2
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::2/64
     ospfv3 1 area 0.0.0.0
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 200 300 400
    #
    ospfv3 1
     router-id 3.3.3.3
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif400
     ipv6 enable
     ipv6 address 2003::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk pvid vlan 400
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 400
    #
    return

Example for Configuring a VRRP6 Group in Multi-gateway Load Balancing Mode

Networking Requirements

As shown in Figure 11-57, HostA and HostC are dual-homed to Switch ModuleA and Switch ModuleB through the switch on the IPv6 network. To reduce the load of data traffic on Switch ModuleA, HostA uses Switch ModuleA as the default gateway to connect to the Internet, and Switch ModuleB functions as the backup gateway. HostC uses Switch ModuleB as the default gateway to connect to the Internet, and Switch ModuleA functions as the backup gateway. This implements load balancing.

Figure 11-57 Networking diagram for a VRRP6 group in load balancing mode

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

2002::1/64

10GE1/17/2

VLANIF 100

2000::1/64

SwitchB

10GE1/17/1

VLANIF 200

2001::1/64

10GE1/17/2

VLANIF 100

2000::2/64

SwitchC

10GE1/17/1

VLANIF 300

2002::2/64

10GE1/17/2

VLANIF 200

2001::2/64

10GE1/17/3

VLANIF 400

2003::2/64

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. Create VRRP6 groups 1 and 2 on Switch ModuleA and Switch ModuleB. In VRRP6 group 1, configure Switch ModuleA as the master and Switch ModuleB as the backup. In VRRP6 group 2, configure Switch ModuleB as the master and Switch ModuleA as the backup.

Procedure

  1. Configure devices to ensure network connectivity.

    # Configure VLANs that each interface belongs to. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 300
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit

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

    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ipv6 enable
    [*Switch ModuleA-Vlanif100] ipv6 address 2000::1 64
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ipv6 enable
    [*Switch ModuleA-Vlanif300] ipv6 address 2002::1 64
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

    # Configure OSPFv3 between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here. For details, see the configuration files.

    [~Switch ModuleA] ospfv3
    [*Switch ModuleA-ospfv3-1] router-id 1.1.1.1
    [*Switch ModuleA-ospfv3-1] commit
    [~Switch ModuleA-ospfv3-1] quit
    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [~Switch ModuleA-Vlanif300] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

  2. Configure VRRP6 groups.

    # Configure VRRP6 group 1 on Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleA to 120 and the preemption delay to 20s, and set the default priority for Switch ModuleB.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 preempt timer delay 20
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

    # Configure VRRP6 group 2 on Switch ModuleA and Switch ModuleB, set the priority of Switch ModuleB to 120 and the preemption delay to 20s, and set the default priority for Switch ModuleA.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp6 vrid 2 virtual-ip FE80::2 link-local
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2 virtual-ip 2000::60
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2 priority 120
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2 preempt timer delay 20
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp6 vrid 2 virtual-ip FE80::2 link-local
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 2 virtual-ip 2000::60
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

  3. Verify the configuration.

    # After the configuration is complete, run the display vrrp6 verbose command on Switch ModuleA. You can see that Switch ModuleA is the master in VRRP6 group 1 and the backup in VRRP6 group 2.

    [Switch ModuleA] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Master
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 20s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    
    Vlanif100 | Virtual Router 2
    State           : Backup
    Virtual IP      : FE80::2
                      2000::60
    Master IP       : FE80::218:82FF:FE68:7455
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES      Delay Time : 0s
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0202
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    

    # After the configuration is complete, run the display vrrp6 verbose command on Switch ModuleB. You can see that Switch ModuleB is the backup in VRRP6 group 1 and the master in VRRP6 group 2.

    [Switch ModuleB] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Backup
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 0s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201 
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    
    Vlanif100 | Virtual Router 2
    State           : Master
    Virtual IP      : FE80::2
                      2000::60
    Master IP       : FE80::218:82FF:FE68:7455
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES    Delay Time : 20s    Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0202
    Check hop limit : YES
    Config Type     : Normal
    Create Time      : 2013-01-12 20:15:46
    Last Change Time : 2013-01-12 20:15:46
    

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    ospfv3 1
     router-id 1.1.1.1
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::1/64
     ospfv3 1 area 0.0.0.0
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
     vrrp6 vrid 1 priority 120
     vrrp6 vrid 1 preempt timer delay 20
     vrrp6 vrid 2 virtual-ip FE80::2 link-local
     vrrp6 vrid 2 virtual-ip 2000::60
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    ospfv3 1
     router-id 2.2.2.2
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::2/64
     ospfv3 1 area 0.0.0.0
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
     vrrp6 vrid 2 virtual-ip FE80::2 link-local
     vrrp6 vrid 2 virtual-ip 2000::60
     vrrp6 vrid 2 priority 120
     vrrp6 vrid 2 preempt timer delay 20
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 200 300 400
    #
    ospfv3 1
     router-id 3.3.3.3
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif400
     ipv6 enable
     ipv6 address 2003::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port hybrid pvid vlan 400
     port hybrid untagged vlan 400
     port link-type trunk
     port trunk pvid vlan 400
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 400
    #
    return

Example for Configuring a VRRP6 Group in Single-gateway Load Balancing Mode

Networking Requirements

As shown in Figure 11-58, HostA and HostC are dual-homed to Switch ModuleA and Switch ModuleB. Some users want to use Switch ModuleA to forward data traffic and use Switch ModuleB as the backup. Other users want to use Switch ModuleB to forward data traffic and use Switch ModuleA as the backup. Switch ModuleA and Switch ModuleB used as masters in different VRRP groups can back up each other and load balance data traffic.

Figure 11-58 Networking diagram for configuring a VRRP6 group in load balancing mode

Device

Interface

VLANIF Interface

IP Address

SwitchA

10GE1/17/1

VLANIF 300

2002::1/64

10GE1/17/2

VLANIF 100

2000::1/64

SwitchB

10GE1/17/1

VLANIF 200

2001::1/64

10GE1/17/2

VLANIF 100

2000::2/64

SwitchC

10GE1/17/1

VLANIF 300

2002::2/64

10GE1/17/2

VLANIF 200

2001::2/64

10GE1/17/3

VLANIF 400

2003::2/64

Configuration Roadmap

The configuration roadmap is as follows:

  1. Assign an IPv6 address to each interface and configure a routing protocol to ensure network connectivity.

  2. Configure two VRRP6 groups on Switch ModuleA and Switch ModuleB. Switch ModuleA is configured as the master in VRRP6 group 1. Switch ModuleB is configured as the master in VRRP6 group 2 so that traffic can be load balanced.

Procedure

  1. Configure devices to ensure network connectivity.

    # Assign an IPv6 address to each interface. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 100 300
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 300
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 300
    [*Switch ModuleA-10GE1/17/1] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/2] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/2] undo port trunk allow-pass vlan 1
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ipv6 enable
    [*Switch ModuleA-Vlanif100] ipv6 address 2000::1 64
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [*Switch ModuleA-Vlanif300] ipv6 enable
    [*Switch ModuleA-Vlanif300] ipv6 address 2002::1 64
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

    # Configure OSPFv3 between Switch ModuleA, Switch ModuleB, and Switch ModuleC. Switch ModuleA is used as an example. The configurations of Switch ModuleB and Switch ModuleC are similar to the configuration of Switch ModuleA, and are not mentioned here.

    [~Switch ModuleA] ospfv3
    [* Switch ModuleA-ospfv3-1] router-id 1.1.1.1
    [*Switch ModuleA-ospfv3-1] commit
    [~Switch ModuleA-ospfv3-1] quit
    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit
    [~Switch ModuleA] interface vlanif 300
    [~Switch ModuleA-Vlanif300] ospfv3 1 area 0
    [*Switch ModuleA-Vlanif300] commit
    [~Switch ModuleA-Vlanif300] quit

  2. Configure VRRP6 groups.

    # Create VRRP6 groups 1 and 2 on VLANIF100 of Switch ModuleA, set the priority to 120 for Switch ModuleA in VRRP6 group 1 so that Switch ModuleA serves as the master in VRRP6 group 1, and set the priority to 100 for Switch ModuleA in VRRP6 group 2 so that Switch ModuleA serves as the backup in VRRP6 group 2.

    [~Switch ModuleA] interface vlanif 100
    [~Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 priority 120
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 2

    # On VLANIF100 of Switch ModuleA, configure VRRP6 group 1 as a Load-Balance Redundancy Group (LBRG) and add VRRP6 group 2 to the LBRG.

    [*Switch ModuleA-Vlanif100] vrrp6 vrid 1 load-balance
    [*Switch ModuleA-Vlanif100] vrrp6 vrid 2 join load-balance-vrrp vrid 1
    [*Switch ModuleA-Vlanif100] commit
    [~Switch ModuleA-Vlanif100] quit

    # Create VRRP6 groups 1 and 2 on VLANIF100 of Switch ModuleB in VRRP6 group 2 so that Switch ModuleB serves as the master in VRRP6 group 2 and as the backup in VRRP group 1.

    [~Switch ModuleB] interface vlanif 100
    [~Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip FE80::1 link-local
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 1 virtual-ip 2000::100
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2 priority 120
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

    # On VLANIF100 of Switch ModuleB, configure VRRP6 group 1 as an LBRG and add VRRP6 group 2 to the LBRG.

    [*Switch ModuleB-Vlanif100] vrrp6 vrid 1 load-balance
    [*Switch ModuleB-Vlanif100] vrrp6 vrid 2 join load-balance-vrrp vrid 1
    [*Switch ModuleB-Vlanif100] commit
    [~Switch ModuleB-Vlanif100] quit

  3. Verify the configuration.

    # Run the display vrrp6 verbose command on Switch ModuleA. The command output shows that Switch ModuleA serves as the master in the LBRG and as a backup in the LBRG member group.

    [Switch ModuleA] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Master
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES   Delay Time : 0s   Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201
    Check hop limit : YES
    Config Type     : Load-Balance
    Create Time       : 2013-07-27 20:15:46
    Last Change Time  : 2013-07-27 20:15:46
    
    Vlanif100 | Virtual Router 2
    State           : Backup
    Virtual IP      : ::
    Master IP       : FE80::218:82FF:FE68:7455
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES   Delay Time : 0s   Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0202
    Check hop limit : YES
    Config Type     : Load-Balance-Member
    Create Time       : 2013-07-27 20:17:46
    Last Change Time  : 2013-07-27 20:17:46

    # Run the display vrrp command on Switch ModuleB. The command output shows that Switch ModuleB serves as a backup in the LBRG and as the master in the LBRG member group.

    [Switch ModuleB] display vrrp6 verbose
    Vlanif100 | Virtual Router 1
    State           : Backup
    Virtual IP      : FE80::1
                      2000::100
    Master IP       : FE80::218:82FF:FED3:2AF3
    PriorityRun     : 100
    PriorityConfig  : 100
    MasterPriority  : 120
    Preempt         : YES   Delay Time : 0s   Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0201
    Check hop limit : YES
    Config Type     : Load-Balance
    Create Time       : 2013-07-27 20:19:46
    Last Change Time  : 2013-07-27 20:19:46
    
    Vlanif100 | Virtual Router 2
    State           : Master
    Virtual IP      : ::
    Master IP       : FE80::218:82FF:FE68:7455
    PriorityRun     : 120
    PriorityConfig  : 120
    MasterPriority  : 120
    Preempt         : YES   Delay Time : 0s   Remain : --
    TimerRun        : 100cs
    TimerConfig     : 100cs
    Virtual MAC     : 0000-5e00-0202
    Check hop limit : YES
    Config Type     : Load-Balance-Member
    Create Time       : 2013-07-27 20:21:46
    Last Change Time  : 2013-07-27 20:21:46

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    ospfv3 1
     router-id 1.1.1.1
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::1/64
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
     vrrp6 vrid 1 load-balance
     vrrp6 vrid 1 priority 120
     vrrp6 vrid 2
     vrrp6 vrid 2 join load-balance-vrrp vrid 1
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    ospfv3 1
     router-id 2.2.2.2
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address 2000::2/64
     vrrp6 vrid 1 virtual-ip FE80::1 link-local
     vrrp6 vrid 1 virtual-ip 2000::100
     vrrp6 vrid 1 load-balance
     vrrp6 vrid 2
     vrrp6 vrid 2 priority 120
     vrrp6 vrid 2 join load-balance-vrrp vrid 1
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname SwitchC
    #
    vlan batch 200 300 400
    #
    ospfv3 1
     router-id 3.3.3.3
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2001::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif300
     ipv6 enable
     ipv6 address 2002::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface Vlanif400
     ipv6 enable
     ipv6 address 2003::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 300
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 300
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 200
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 200
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk pvid vlan 400
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 400
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 58740

Downloads: 3621

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