Description
This article describes the steps to enable OSPF logs and change level for showing information in router logs in the GUI.
Scope
FortiOS.
Solution
By default, logs for OSPF are disabled and only critical events can be showed.
Via CLI:
Test-LAB # diagnose ip router ospf show
OSPF debugging status:
OSPF debugging level is ERROR
timestamp disabled
Via GUI:
Go to Log & Report -> System Events -> Router Events.
To enable all logs for OSPF:
Test-LAB # diagnose ip router ospf all enable
Debug messages will be on for 30 minutes.
After all logs have been enabled, the status will be changed and can be shown with the command:
Test-LAB # diagnose ip router ospf show
OSPF debugging status:
OSPF all IFSM debugging is on
OSPF all NFSM debugging is on
OSPF packet Hello detail debugging is on
OSPF packet Database Description detail debugging is on
OSPF packet Link State Request detail debugging is on
OSPF packet Link State Update detail debugging is on
OSPF packet Link State Acknowledgment detail debugging is on
OSPF all LSA debugging is on
OSPF all NSM debugging is on
OSPF all events debugging is on
OSPF all route calculation debugging is on
OSPF debugging level is ERROR
timestamp disabled
To change the level of debugging, this is from error to info level for show all events (or whatever is required).
For show level options
Test-LAB # diagnose ip router ospf level
critical Critical level.
error Error level.
warn Warning level.
info Information level.
none None level.
For the change level option:
Test-LAB # diagnose ip router ospf level info
Debug messages will be on for 27 minutes.
The following command can be used to validate the current level after the change:
Test-LAB # diagnose ip router ospf show
OSPF debugging status:
OSPF all IFSM debugging is on
OSPF all NFSM debugging is on
OSPF packet Hello detail debugging is on
OSPF packet Database Description detail debugging is on
OSPF packet Link State Request detail debugging is on
OSPF packet Link State Update detail debugging is on
OSPF packet Link State Acknowledgment detail debugging is on
OSPF all LSA debugging is on
OSPF all NSM debugging is on
OSPF all events debugging is on
OSPF all route calculation debugging is on
OSPF debugging level is INFO
timestamp disabled
To see logs in the GUI, enable the following:
Test-LAB # config router ospf
Test-LAB (ospf) # set log-neighbour-changes en
Test-LAB (ospf) # end
Related articles:
Technical Tip: OSPF static routes redistribution example