in OSPF bandwidth reference variable is used to calculate the cost of a link. The default is 100Mbps so the cost calculation in 1998 was good (RFC2328) but in today’s times we have a jumbo link that transport our packets like 10Gbps, 40Gbps, 100Gbps. If we do nothing, a 1Gbps link and a 10Gbps link will be considered with the same cost by the formula:
cost = ReferenceBandwidth / InterfaceBandwidth
So in a large network environment, like MPLS Backbone, remember to change the Reference Bandwidth to allow the protocol to calculate precise costs. This will prevent LDP to flood MPLS frames into a 1Gbps link when you have a 20Gbps port-channel link available 😉
Let’s conf!
# Huawei
ospf 81 router-id 172.29.29.6
bandwidth-reference 102400
# it change the default value from 100Mbps to 10Gbps
area 0.0.0.0
authentication-mode md5 23 cipher @%@%;43Ft]5d&df=&@-.,+@%@%
network 172.29.29.6 0.0.0.0
# Cisco
router ospf 81
router-id 172.29.29.6
log-adjacency-changes
auto-cost reference-bandwidth 102400
area 0 authentication message-digest
network 172.29.29.6 0.0.0.0 area 0
.glitchlist crew