Description | This article describes a special property of Blackhole routes in FortiOS. |
Scope | FortiGate. |
Solution |
When FortiGate performs route lookups restricted to a particular interface, blackhole routes will also be checked. This can potentially cause traffic drops if the blackhole route is more preferred than the intended route.
Ping traffic example:
--output omitted--
Routing table for VRF=0 S* 0.0.0.0/0 [10/0] via 10.0.0.1, wan1, [1/0] C 192.168.102.0/24 is directly connected, internal1 C 10.0.0.0/30 is directly connected, wan1 S 172.243.0.0/16 [10/0] via 10.0.0.1, wan1, [1/0]
FGT61F-A # execute ping-options interface wan1 FGT61F-A # execute ping 173.243.138.91 PING 173.243.138.91 (173.243.138.91): 56 data bytes sendto failed: 101(Network is unreachable) sendto failed: 101(Network is unreachable) sendto failed: 101(Network is unreachable) sendto failed: 101(Network is unreachable)
Matching intended routes: When configuring blackhole routes, it is recommended to use less specific prefixes than existing intended routes, to ensure intended routes are matched first.
Where this is not possible, the traffic can be allowed by configuring an intended route with the same prefix, administrative distance, and same or earlier priority, see the article 'Routing behavior depending on distance and priority for static routes' and the example below.
FGT61F-A # get router info routing-table all --output omitted-- S 173.243.138.91/32 [10/0] is a summary, Null, [1/0]
edit <index> set status enable next end
FGT61F-A # get router info routing-table details 173.243.138.91 Routing table for VRF=0 Known via "static", distance 10, metric 0, best
FGT61F-A # execute ping 173.243.138.91 PING 173.243.138.91 (173.243.138.91): 56 data bytes 64 bytes from 173.243.138.91: icmp_seq=0 ttl=54 time=1.4 ms 64 bytes from 173.243.138.91: icmp_seq=1 ttl=54 time=1.3 ms 64 bytes from 173.243.138.91: icmp_seq=2 ttl=54 time=1.2 ms 64 bytes from 173.243.138.91: icmp_seq=3 ttl=54 time=1.2 ms 64 bytes from 173.243.138.91: icmp_seq=4 ttl=54 time=1.3 ms
--- 173.243.138.91 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 1.2/1.2/1.4 ms
By configuring less specific blackhole routes or configuring routes to allow specific traffic, an administrator can prevent unintended drops from matching the blackhole route. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.