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.
knaveenkumar
Staff
Staff
Article Id 241245
Description This article describes troubleshooting steps to solve OSPF getting stuck in a 2-way state in FortiGate and FortiOs.
Scope Any supported FortiGate version.
Solution

 

10.5.16.0.PNG

 

An OSPF neighbor reaches the 2-way state when bidirectional communication is established. In order to reach this bi-directional communication, each router receives a 'hello' packet with its own router-id in the list. This is the beginning of an OSPF adjacency.

 

The DR and BDR are selected in this state.

 

In the above example, R sends a 'hello' packet that says the R2 has seen R1's 'hello'. The router-id of R2 is higher, so it has also been elected as a DR.

 

However, a problem may occur where an OSPF neighbour gets stuck in 2-way communication. This occurs because the DR and BDR have not been chosen, but the network type requires both.

 

First, check for any errors in the priority interface configuration.

If all the routers on a segment are configured with priority 0 (default=1), no router will not be in the full state, which will create problems.
At least one router on the segment must have a priority that is not set to 0.

 

Two-way hello example output with sniffer:

 

# diagnose sniffer packet any " host 224.0.0.5 " 4 0 a
Using Original Sniffing Mode
interfaces=[any]
filters=[ host 224.0.0.5 ]
2022-12-28 15:55:09.773720 port1 in 10.5.21.231 -> 224.0.0.5: ip-proto-89 52
2022-12-28 15:55:11.535673 port1 out 10.5.27.232 -> 224.0.0.5: ip-proto-89 52

 

# get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
10.0.5.231 1 Full/DR 00:00:37 10.5.21.231 port1
2.2.2.2 0 2-Way/DROther 00:00:40 10.5.27.232 port1


# get router info ospf interface
port1 is up, line protocol is up
Internet Address 10.5.28.246/20, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROther, Priority 0
Designated Router (ID) 10.0.5.231, Interface Address 10.5.21.231
No backup designated router on this network
Timer intervals configured, Hello 10.000, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 2, Adjacent neighbor count is 1
Crypt Sequence Number is 2342357
Hello received 79 sent 41, DD received 8 sent 8
LS-Req received 1 sent 2, LS-Upd received 8 sent 3
LS-Ack received 5 sent 5, Discarded 7
loopback is up, line protocol is up
Internet Address 1.1.1.1/32, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 100
No bandwidth information from kernel
Transmit Delay is 1 sec, State Loopback
Timer intervals configured, Hello 10.000, Dead 40, Wait 40, Retransmit 5


# get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
10.0.5.231 1 Full/DR 00:00:33 10.5.21.231 port1
1.1.1.1 0 2-Way/DROther 00:00:36 10.5.28.246 port1

 

# get router info ospf interface
port1 is up, line protocol is up
Internet Address 10.5.27.232/20, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROther, Priority 0
Designated Router (ID) 10.0.5.231, Interface Address 10.5.21.231
No backup designated router on this network
Timer intervals configured, Hello 10.000, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 2, Adjacent neighbor count is 1
Crypt Sequence Number is 3436
Hello received 101 sent 51, DD received 7 sent 8
LS-Req received 2 sent 1, LS-Upd received 8 sent 5
LS-Ack received 6 sent 6, Discarded 2
loopback is up, line protocol is up
Internet Address 2.2.2.2/32, Area 0.0.0.0, MTU 1500
Process ID 0, VRF 0, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 100
No bandwidth information from kernel
Transmit Delay is 1 sec, State Loopback
Timer intervals configured, Hello 10.000, Dead 40, Wait 40, Retransmit 5


Run the below commands and Check the status:


# get router info OSPF interface


# get router info OSPF neighbor

 

# get router info ospf database brief