Skip to main content
sidp
Explorer II
Jan 18, 2023 3:14 PM UTC
Solved

Fortigate OSPF stop inter-area distribution

I found the following article about ospf inter-area distribution.

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configuring-OSPF-to-filter-Inter-Area-routes-using/ta-p/197747

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configuration-of-OSPF-Stub-Totally-Stub-NSSA-and/ta-p/194927

 

OSPF and Fortigate are fairly new to me... I am planning to replace a Cisco Firepower with a Fortigate.

 

Currently on the Cisco firepower there are two opsf processes configured. One has area id 0 and the other has area-id 10 and both are connected to two different cisco switches. Because of the two ospf processes the areas are separated which means cisco-sw2 doesn't receive any routes from area 10. Since Fortigate doesn't support more than one ospf process I have to find another solution.

 

cisco-sw1---area-id 10---Fortigate(Cisco FTD)---area-id 0---cisco-sw2

 

How can I prevent Fortigate from distributing learned routes from area 10 to 0 (sw2)?

 

Current Fortigate config:

fortigate # show router ospf 
config router ospf
set router-id 2.2.2.2
config area
edit 0.0.0.0
next
edit 0.0.0.10
set type stub
next
end
config ospf-interface
edit "clientvpn"
set interface "port2.505"
set dead-interval 40
set hello-interval 10
next
edit "dmvpn"
set interface "port2.503"
set dead-interval 40
set hello-interval 10
next
edit "inside"
set interface "inside"
set dead-interval 40
set hello-interval 10
next
edit "transit"
set interface "port2.506"
set dead-interval 40
set hello-interval 10
next
end
config network
edit 1
set prefix 10.30.15.0 255.255.255.240
next
edit 2
set prefix 10.30.13.0 255.255.255.240
next
edit 3
set prefix 10.30.14.0 255.255.255.240
next
edit 4
set prefix 10.30.16.0 255.255.255.240
set area 0.0.0.10
next
end
config redistribute "connected"
end
config redistribute "static"
end
config redistribute "rip"
end
config redistribute "bgp"
end
config redistribute "isis"
end
end

 

srajeswaran
Staff
Feb 1, 2023 1:51 PM UTC

Thanks for testing that. I just verified this in LAB and I am able to restrict the external routes entering area0 by making the area10 nssa and then apply the route filter we configured earlier.

 

1. Configure Area10 as NSSA on both Fortigate and Switch

2. Configure route filter as below

config router prefix-list
edit "FILTER_AREA_10_NETWORKS"
config rule
edit 1
set action deny
set prefix any
next
end
next
end

 

3. Apply this filter under Area10 as "Out" direction (default direction)

edit 0.0.0.10
set type nssa
config filter-list
edit 1
set list "FILTER_AREA_10_NETWORKS"
next
end
next

 

 

25 replies

srajeswaran
Staff
Staff
Jan 18, 2023 4:06 PM UTC

If you are looking to block all the routes from area 10, then we don't have to use any filters, we may try the below as suggested in the article shared by you.

 

# config router prefix-list
edit "FILTER_AREA_10_NETWORKS"
# config rule
edit 1
set action deny
set prefix any
unset ge
unset le
next
end

 

Apply this on Area10 out direction.

 

# config router ospf
# config area
edit 0.0.0.10
# config filter-list
edit 1
set list "FILTER_AREA_10_NETWORKS"
set direction out        
next
end
next
end
end
sidp
sidpAuthor
Explorer II
Jan 18, 2023 4:29 PM UTC

Hi Suraj,

 

I tried it but nothing changes and rechecked the configuration.

"set direction out" doesn't appear in the show config but maybe this is just because it is the default value. I also tested it with set direction in which appeared in the config but again nothing changed...

 

Regards,

Patrick

srajeswaran
Staff
Staff
Jan 19, 2023 7:08 AM UTC

Can you share the output of "get router info ospf database brief"

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT