FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Dhruvin_patel
Article Id 232184

 

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
Duplex :Full
link_status :Up

 

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
Internet Address 192.168.194.2/24, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 100

 

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
Internet Address 192.168.194.1/24, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

 

This is the default behavior with a software switch.