< Home

Controlling the Costs of Dynamic Routes Using VGMP Group

After the hot standby function is enabled, the FW dynamically adjusts the costs of the routes advertised by OSPF and OSPFv3 based on the VGMP group status and dynamically adjusts the MED values of the routes advertised by BGP. The detailed procedure is as follows:

The following example describes how to use the VGMP group to control the costs of routes advertised by OSPF. As shown in Figure 1, FW_A and FW_B form a hot standby network. OSPF runs between FW_A, FW_B, R1, and R2. Table 1 describes the key configurations of FW_A and FW_B.

Figure 1 FW service interfaces working at Layer 3, and FW being connected to routers in the upstream and downstream
Table 1 Key configurations of FW_A and FW_B
FW_A FW_B
#
hrp enable                               /*Enable hot standby.*/
hrp interface eth-trunk0 remote 10.0.1.2 /*Configure the heartbeat interface.*/
hrp adjust ospf-cost enable 65000        /*Configure VGMP group-based OSPF cost adjustment.*/
#
ospf 100 router-id 10.0.0.1
 default-route-advertise always          /*Enable the advertisement of the default route.*/
 area 0.0.0.0
  network 10.0.0.1 0.0.0.0
#
interface GigabitEthernet 0/0/1
 ospf cost 1                             /* Specify the OSPF cost of the interface.*/
#
hrp enable                               /*Enable hot standby.*/
hrp interface eth-trunk0 remote 10.0.1.1 /*Configure the heartbeat interface.*/
hrp adjust ospf-cost enable 65000        /*Configure VGMP group-based OSPF cost adjustment.*/
hrp standby-device                       /*Configure the device as a standby device.*/
#
ospf 100 router-id 10.0.0.5
 default-route-advertise always          /*Enable the advertisement of the default route.*/
 area 0.0.0.0
  network 10.0.0.5 0.0.0.0
#
interface GigabitEthernet 0/0/1
 ospf cost 1                             /* Specify the OSPF cost of the interface.*/

As shown in Figure 2, neither FW_A nor FW_B is faulty, the VGMP groups have the same priority, and the VGMP groups are in the load-balance state. FW_A advertises routes according to the OSPF configuration, as shown in Figure 3. Because the hrp standby-device command is configured on FW_B, the cost of OSPF routes advertised by FW_B is changed to 65000, as shown in Figure 4.

Figure 2 OSPF costs when the VGMP group is in the load-balance state
Figure 3 LSA sent by FW_A when the VGMP group is in the load-balance state
Figure 4 LSA sent by FW_B when the VGMP group is in the load-balance state

As shown in Figure 5, the upstream service interface of FW_A is faulty, and FW_B is normal. The VGMP group priority of FW_A is lower than that of FW_B. The VGMP group of FW_A becomes standby, and that of FW_B becomes active. The cost of the OSPF routes advertised by FW_A is changed to 65000, as shown in Figure 6. The cost of the OSPF routes advertised by FW_B is changed to 1, as shown in Figure 7.

Figure 5 OSPF costs when the VGMP group is in the active or standby state
Figure 6 LSA sent by FW_A when the VGMP group is in the standby state
Figure 7 LSA sent by FW_B when the VGMP group is in the standby state
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >