Troubleshooting Tip: Incorrect OSPF cost when OSPF neighborship forms with a software switch
- December 4, 2022
- 0 replies
- 2818 views
| Description | This article explains how the FortiGate calculates the OSPF version 2 cost based on RFC 2328 and offers a solution for incorrect measurements. |
| Scope | FortiGate. |
| Solution | When OSPF neighborship forms with a software switch, it shows a cost of 100 despite how the interface (which is part of the software switch) negotiates at 1000 Mbps and references bandwidth value as 1000Mbps.
Negotiated bandwidth is 1000Mbps:
# get hardware nic <interface_name> Speed :1000
The reference bandwidth is 1000:
# config router ospf set auto-cost-ref-bandwidth 1000
Ideally, cost should be 1. As the interface is part of the software switch, it shows cost 100:
soft_1 is up, line protocol is up
This behavior makes it difficult to steer traffic appropriately.
To remediate this behavior, use a hardware switch instead of a software switch:
Hardware_1 is up, line protocol is up This is the default behavior with a software switch. |
