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.
agodbole
Staff
Staff
Description
This article describes  basic OSPF configuration on FortiOS and behavior of default MTU settings.
  • FortiOS  supports OSPF routing protocol. This article is intended to demonstrate the minimal configuration required for OSPF  and explain the default behavior of MTU values under OSPF configuration.
  • MTU (Maximum Transmission Unit) the size (in bytes or octets) of the largest protocol data unit that the layer can accept.
  • Normal Ethernet frames accept MTU value of ~1500 bytes.

Solution
Default OSPF configuration

In FortiOS OSPF configuration is simple and can be done in 3 sub hierarchies under 'router ospf' hierarchy *after* defining the 'router-id'.

OSPF configuration consists of 3 basic hierarchies

1.    Area Configuration
2.    Interface Configuration
3.    Network Configuration

Area Configuration
config area
edit  <a.b.c.d>
next
end
Interface Configuration
config ospf-interface
edit "new"
set interface "XXXX"
next
end
Network Configuration
config network
edit X
set prefix <p.q.r.s> <subnet mask>
next
end

Default MTU value and CLI option to change it

MTU value is one crucial element to be matched to establish adjacency of OSPF.  MTU values are exchanged in the Hello packets between 2 OSPF speaking routers.

OSPF Adjacency is established only when the MTU values of the two routers are matched.  By default the MTU configuration option is available under  config router  >> config ospf-interface  hierarchy.

FortiOS supports default MTU value of 1500 on all FortiOS versions.

Examples to manually configure MTU value in OSPF

The default values of all the parameters can be seen by checking the 'full-configuration'.  For example:
FGT_#(ospf-interface) # edit <XXX>
FGT_#(XXX) # sh full-configuration
The default value of MTU size under OSPF interface is seen as '0'.  This implies that ospf-interface does not change the default MTU value of 1500.

To Change this value, edit "set mtu" under the ospf-interface hierarchy.  For example:
config ospf-interface
    edit "XXX"
set mtu <1436>

Contributors