OSPF measurement method
1. An interface cost=reference bandwidth/actual bandwidth
The default reference bandwidth value is 100M. When the calculation result has decimal places, only integer digits are used. When the result is less than 1, the cost is equal to 1.
2. Two ways to change the cost:
a/ directly configured on the interface
<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] ospf cost 65
b/Modify the reference bandwidth (all routers need to be modified to ensure routing consistency)
# Set the OSPF bandwidth reference value to 1000 Mbit/s, which is used to calculate the interface cost.
<Huawei> system-view
[Huawei] ospf 100
[Huawei-ospf-100] bandwidth-reference 1000
RTA reaches the cumulative cost of 192.168.3.0/24=G1`s cost + G2`s cost