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.
oarslan
Staff
Staff
Article Id 195789

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.

 

kb_18748_1.png

 

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: 


FortiGate01 # config router ospf
set default-information-originate always
end

FortiGate03 does have a default route in its routing table, and the following configuration can be done on it to advertise the default route:
 
FortiGate03 # config router ospf
set default-information-originate enable
end

To configure the same on GUI, navigate to Network -> OSPF -> Default Settings:
  
ospf_topology-2.png

 

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.