Troubleshooting Tip: How to find missing subnet on OSPF Routing Table
| Description | This article describes the steps on how to find missing subnets in the OSPF routing table. |
| Scope | FortiGate. |
| Solution | Topology:
Traffic is sent from subnet 172.16.10.0/24 to 10.122.0.0/20.
The debug flow shows RPF Check Failed:
FGT-B # id=65308 trace_id=727 func=print_pkt_detail line=5920 msg="vd-root:0 received a packet(proto=1, 172.16.10.1:3->10.122.3.180:2048) tun_id=0.0.0.0 from port2. type=8, code=0, id=3, seq=0."
This means that FGT-B is receiving the packet from the wrong interface. 172.16.20.0/24 should come from port2, but the routing table does not have any entry of it.
FGT-B # get router info routing-table details 172.16.10.1 Routing table for VRF=0
FGT-B was supposed to learn this subnet from OSPF. FGT-A already redistributes both Static and Connected routes.
config router ospf
Checking routing on FGT-A, subnet 172.16.10.0/24 was from Static Routes.
FGT-A # get router info routing-table details 172.16.10.0 Routing table for VRF=0
Static Routes were being redistributed into OSPF with Route Map configured for the filter.
config redistribute "static"
The route map has a prefix list as the matching statement.
config router route-map
config router prefix-list end
Subnet 172.16.10.0 was not on the list, which is why it is not being redistributed.
config router prefix-list
After adding subnet 172.16.10.0/24 into the prefix list, the routes will now show on FGT-B.
FGT-B # get router info routing-table details 172.16.10.0 Routing table for VRF=0
The debug flow will now show that the traffic is accepted by the firewall policy.
FGT-B # id=65308 trace_id=746 func=print_pkt_detail line=5920 msg="vd-root:0 received a packet(proto=1, 172.16.10.1:7->10.122.3.180:2048) tun_id=0.0.0.0 from port2. type=8, code=0, id=7, seq=0."
The FGT-A OSPF advertisement can also be shown using this command.
Before:
FGT-A # get router info ospf database adv-router 1.1.1.1 OSPF Router with ID (1.1.1.1) (Process ID 0, VRF 0) Router Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# CkSum Flag Link count Net Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# CkSum Flag AS External Link States Link ID ADV Router Age Seq# CkSum Flag Route Tag
After:
FGT-A # get router info ospf database adv-router 1.1.1.1 OSPF Router with ID (1.1.1.1) (Process ID 0, VRF 0) Router Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# CkSum Flag Link count Net Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# CkSum Flag AS External Link States Link ID ADV Router Age Seq# CkSum Flag Route Tag |
