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.
ronmar
Staff
Staff
Article Id 300826
Description This article describes how the OSPF default-information-metric type 1 and type 2 work when default-information-originate is enabled.
Scope FortiGate, OSPF
Solution

The default-information-originate option on the OSPF is to advertise a default route to the peering OSPF devices. It has 3 possible options posted below:

 

disable (default): Avoid to advertise a default route to OSPF peering devices.

enable: Advertise a default route to OSPF peering devices if there is an active default route on the routing-table.

always: Always advertise a default route to OSPF peering devices even if there is no active default route on the routing-table.

 

If this option is set to enable and always, there are 2 additional configurations that we can adjust to control the default route being advertised to its peering devices.

 

  • set default-information-metric <integer>: It is possible to set an integer on this setting that will be used to compute the metric of the OSPF default route.
  • set default-information-metric-type <1|2>: It is possible to select the metric type of the OSPF default route.

 

OSPF metric type has 2 options, Either Type 1 or Type 2. Here are more details about metric types 1 and 2:

 

If metric type 1 is selected the metric value of the default route that will be advertised on the network will be the sum of the internal OSPF cost and the value set on 'set default-information-metric <integer>'.
If metric type 2 (default) is selected the metric value of the default route that will be advertised will be the value set on 'set default-information-metric <integer>'.

 

See the sample scenario below to see how metric type 1 and type 2 work.

Network Diagram:

 

NetworkDiagram.jpg

 

Scenario 1:

Both are using metric type 1. The lowest metric value will be selected as the primary default route of the peering devices and the computation will be the sum of the internal OSPF cost and the value set on 'set default-information-metric <integer>'.

 

  • DC1: Default Metric value is set to 500 and Metric type is set to type 1.

 

DC1-Metric1.jpg

 

  • DC2: Default Metric Value is set to 400 and Metric Type is set Type 1.

 

DC2-Metric1.jpg

 

Router1 routing table: Router 1 will select the route that has the lower metric and will have the metric value of External OSPF Type1 route (the sum of the internal OSPF cost and the value set on 'set default-information-metric <integer>').

 

Router1-routingtable-Metric1.jpg

 

Scenario 2:

Both are using metric type 2. The lowest metric value will be selected as the primary default route of the peering devices and the metric will be the value set on 'set default-information-metric <integer>'.

 

DC1: Default Metric value is set to 500 and Metric type is set to type 2.

 

DC1-Metric2.jpg

 

DC2: Default Metric Value is set to 400 and Metric Type is set Type 2.

 

DC2-Metric2.jpg

 

Router 1 routing table: Router 1 will select the route that has the lower metric and will have the metric value of the External OSPF Type2 route (the metric will be the value set on 'set default-information-metric <integer>').

 

Router1-routingtable-Metric2.jpg

 

Scenario 3:

DC1 and DC2 have different Metric Types. DC1 has a Metric type of 1 with a Metric value of 500 while DC2 has a Metric type of 2 with a Metric value of 400. 

 

Note:

The device that receives a metric type 1 and 2 on different devices will always prefer the type 1 over a type 2 route for the same destination.

 

Router 1 routing table: Router 1 will choose the DC1 default route since it is using Metric Type 1.

 

Router1-routingtable-different.jpg

Contributors