Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Judbe
New Contributor

OSPF Redistribution Issue with Multiple VRFs

Hello!
I have multiple VRFs configured on a Fortigate device and I can see that OSPF creates a separate process per VRF:

 

OSPF Router with ID (10.10.10.10) (Process ID 1, VRF 1)
OSPF Router with ID (10.10.10.10) (Process ID 2, VRF 2)
OSPF Router with ID (10.10.10.10) (Process ID 3, VRF 3)
...

 

 

Each VRF should be isolated but when enabling "Redistribute Connected", OSPF starts advertising all directly connected networks across all VRFs, causing routing loops.

I have tried using route-maps to filter the redistribution, but the issue persists. It seems that Fortigate treats redistribution as global per VDOM rather than per OSPF process/VRF.

Questions:
* Is there a way to ensure that "Redistribute Connected" only applies within its respective VRF and does not affect other VRFs?
* If this is expected behavior, what is the recommended best practice for redistributing directly connected networks while maintaining VRF isolation?

Thanks in advance for your help!

6 REPLIES 6
ebilcari
Staff
Staff

Currently, FGT has some limitations in configuring separate OSPF instances for each VRF. To achieve fully independent OSPF configurations, you should consider using VDOMs.

- Emirjon
If you have found a solution, please like and accept it to make it easily accessible for others.
palrami
New Contributor

Hello, are you able to share your config also if you found solution 

funkylicious
SuperUser
SuperUser

one option would be to create a route-map that matches the prefix and vrf and use it under redistribute.

"jack of all trades, master of none"
"jack of all trades, master of none"
palrami

Thank you, i have the following configurations but ospf didnt come, basically _leak0 and _leak1 belongs to different vrfs, i saw error about duplicate router id, i was wondering if you can share your ospf configurations

 

 

HUB1 (ospf) # show
config router ospf
config area
edit 0.0.0.0
next
end
config ospf-interface
edit "cevrf"
set interface "vrf10_leak1"
set dead-interval 40
set hello-interval 10
set network-type point-to-point
next
edit "pevrf"
set interface "vrf10_leak0"
set dead-interval 40
set hello-interval 10
set network-type point-to-point
next
end
config network
edit 1
set prefix 10.200.255.20 255.255.255.254
next

funkylicious

i dont have a working config, i just shared an idea i had about the redistribution.

as for the ospf with intfs in diff vrfs, it should work - https://community.fortinet.com/t5/FortiGate/Technical-Note-OSPF-Support-for-multiple-virtual-routing... 

is the router-id duplicate on FGT on the remote devices ?

"jack of all trades, master of none"
"jack of all trades, master of none"
hamanka6
Visitor

Maybe I'm missing something from the way you've described your scenario, but why would you have to modify the ASR config? Your OSPF process numbers don't have to match between peers, is that where you were seeing an issue? You should be able to configure the 4500 with OSPF-1 in VRF-A and OSPF-2 in VRF-B, and have both of those OSPF processes peer with OSPF-3 on the ASR.

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors