| Description | This article describes the steps to control subnet advertising on OSPF links when the redistribute static is enabled. |
| Scope | FortiGate. |
| Solution |
In certain network requirements, connections between FortiGates are controlled by OSPF redistribution. The following network topology interlinks FortiGate communication via OSPF routes with a redistributed default route and a static route enabled:
In the network topology, the following setup is configured:
The following routing table is observed in all the FortiGates:
FortiGate External.
Routing table for VRF=0
FortiGate Edge.
Routing table for VRF=0
FortiGate Internal.
Routing table for VRF=0
Under this configuration, if the network administrator wants to segregate management traffic (192.168.101.0/24) through port 3 on the FortiGate Internal interface, the subnet on the Internal FortiGate will not be able to communicate with the loopback IP (LO-EX) configured on the FortiGate External Interface. A static route will need to be configured on FortiGate Internal to route the traffic through port3 (192.168.3.2):
However, this configuration will cause a network loop in FortiGate Edge:
To resolve this looping issue, it is possible to configure a route-map to avoid FortiGate Internal from redistributing the static route: Configure route-map and access-list in FortiGate Internal to avoid the advertisement of 192.168.101.0/24 subnet:
config router access-list edit "DoNotSend" config rule edit 1 set prefix 192.168.101.0 255.255.255.0 set exact-match enable next end next end
config router route-map edit "Exclude-NET" config rule edit 1 set action deny set match-ip-address "DoNotSend" unset set-ip-prefsrc next exit 2 unset set-ip-prefsrc next end next end
config router ospf config redistribute "static" set status enable set routemap "Exclude-NET" end end
With this configuration, FortiGate Edge will see a single route to route 192.168.101.0/24 to FortiGate External:
Accessing FortiGate External Loopback IP is now possible from 192.168.3.2 configured on FortiGate Internal:
|
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 2025 Fortinet, Inc. All Rights Reserved.