Technical Tip: How configure ECMP in OSPF NSSA area with FortiSwitch
| Description | This article explains how to configure OSPF settings on FortiSwitch to enable ECMP (Equal-Cost Multi-Path) routes within an NSSA (Not-So-Stubby Area). |
| Scope | FortiSwitch-2048F v7.6.2 build1085.250526 (GA). |
| Solution | In this topology, FortiSwitch AGG-N2B has 60 VLAN interfaces that need to be redistributed to FortiSwitch CORE_B. Conversely, FortiSwitch CORE_B has 3 VLAN interfaces that must be redistributed to FortiSwitch AGG-N2B. To maximize throughput, both uplinks between FortiSwitch AGG-N2B and FortiSwitch CORE_B are utilized, aiming to achieve 200 Gbps. This requires ECMP routing to be enabled on both FortiSwitch devices.
Network Topology:
 
Figure 1. FortiSwitch CORE_B - LSA type 7 showing prefix 10.10.253.0/24   Figure 2. FortiSwitch AGG-N2B OSPF - external routing table (get router info ospf route)
  FortiSwitch AGG-N2B successfully installs ECMP routes to FortiSwitch CORE_B prefixes. However, the reverse is not true. When FortiSwitch AGG-N2B advertises its prefixes via LSA Type 7, it sets the NSSA Forwarding Address to either 192.168.12.2 or 192.168.13.2, depending on the route. This causes FortiSwitch CORE_B to only install a single path to FortiSwitch AGG-N2B prefixes, thus disabling ECMP.
Figure 3. FortiSwitch AGG-N2B - LSA type 7 showing prefix 10.10.1.0/24
Figure 4. FortiSwitch CORE_B OSPF - external routing table (get router info ospf route)
  FortiSwitch CORE_B has reached all prefixes connected to FortiSwitch AGG-N2B by only the IP 192.168.21.3, and ECMP routes have not been installed.
Create a loopback interface in all FortiSwitch (FortiSwitch: AGG-N2B):
config system interface edit "loopback2" set ip 192.168.254.2 255.255.255.255 set allowaccess ping set type loopback next end
Configure OSPF (FortiSwitch: AGG-N2B):
config router ospf set router-id 192.168.254.2 config area edit 1.0.0.1 set type nssa next end config interface edit "port49" next edit "port50" next edit "loopback2" next end config network edit 1 <----- Prioritize loopback. set area 1.0.0.1 set prefix 192.168.254.2 255.255.255.255 next edit 2 set area 1.0.0.1 set prefix 192.168.13.0 255.255.255.0 next edit 3 set area 1.0.0.1 set prefix 192.168.12.0 255.255.255.0 next end config redistribute "connected" set status enable end end
Monitoring and Validation:
Figure 5. FortiSwitch AGG-N2B - LSA type 7 showing prefix 10.10.1.0/24 (Forwarding Address is loopback IP)
The loopback IP (192.168.254.2) is used as the Forwarding Address and is reachable via both uplinks (192.168.12.2 and 192.168.13.2). As a result, FortiSwitch CORE_B correctly installs ECMP routes to FortiSwitch AGG-N2B prefixes.
Figure 6. FortiSwitch CORE_B OSPF - external routing table (get router info ospf route)
Conclusion: |







