Chapter 2 Advanced Routing for FortiOS 5.0 : Open Shortest Path First (OSPF) : OSPF Background and concepts : The parts and terminology of OSPF : Router ID
  
Router ID
In OSPF, each router has a unique 32-bit number called its Router ID. Often this 32-bit number is written the same as a 32-bit IPv4 address would be written in dotted decimal notation. However some brands of routers, such as Cisco routers, support a router ID entered as an integer instead of an IP address.
It is a good idea to not use IP address in use on the router for the router ID number. The router ID does not have to be a particular IP address on the router. By choosing a different number, it will be harder to get confused which number you are looking at. A good idea can be to use the as much of the area's number as possible. For example if you have 15 routers in area 0.0.0.0 they could be numbered from 0.0.0.1 to 0.0.0.15. If you have an area 1.1.1.1, then routers in that area could start at 1.1.1.10 for example.
You can manually set the router ID on your FortiGate unit.
To manually set an OSPF router ID of 0.0.1.1 - web-based manager
1. Go to Router > Dynamic > OSPF.
2. For Router ID, enter 0.0.1.1.
3. Select Apply.
To manually set an OSPF router ID of 0.0.1.1 - CLI
config router ospf
set router-id 0.0.1.1
end