Description
This article describes how to advertise a default route in OSPF.
Scope
FortiGate.
Solution
Default route can be advertised into OSPF by an ASBR, and option is disabled by default.
Default route will be advertised as External routes with a default cost of 10 and default metric-type E2.
The router has to have a default route in the routing table (not coming from OSPF) in order to advertise it into OSPF, otherwise 'always' keyword can be used.
Following syntax is used to advertise a default route in OSPF on a FortiGate:
config router os
(ospf) set default-information-originate <option>
Available options are as follows:
enable Enable setting. <----- This will send a default route if FortiGate has one in routing table
always Always advertise the default router. <----- This will always send a default route.
disable Disable setting.
In the above topology, both FortiGate01 and FortiGate03 need to advertise the default route in the network.
FortiGate01 does not have a default route in its routing table, so the following configuration can be established on it to advertise the default route:
The OSPF metric value and type of the default route being injected can be adjusted using the following commands:
config router ospf
set default-information-metric <metric value>
set default-information-metric-type <1/2>
end
OSPF metric is not the same as administrative distance and the value only compared against other OSPF routes, see the article Technical Tip: How OSPF default-information-metric type 1 and type 2 work.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.