Skip to main content
moby
New Member
November 23, 2016
Question

Redistributing BGP learned Routes into OSPF

  • November 23, 2016
  • 1 reply
  • 7499 views

Hi All,

 

I have two Fortigates running BGP and distributing approx 150 routes into OSPF. What I would like to do is redistribute approx half of these routes from one firewall into OSPF with a better cost so from the Internal network approx half the prefixes are routed to one of the Firewalls and the other half to the other firewall.

 

So I guess my question is can I use a route map/prefix list to modify the cost of a prefix that is re-distributed from BGP into OSPF?

 

Any idea if it is possible and how to do that?

 

Thanks!

    1 reply

    emnoc
    New Member
    November 23, 2016

    Yes that should be doable but I would be cautious of  asymmetrical issues. When I heard would your trying todo I see asymmetrical issues popping up.

     

    check out OSPFext route filtering but the same approach could be taken on the routes that you push into OSPF.

     

     

    i perfer tagging routes for furture needs on anything that you set.

     

     

    edit "netmap"             config rule                 edit 1                     set prefix 10.1.10.0  255.255.255.0                     unset ge                     unset le                 next

                   edit 2                     set prefix 10.2.10.0  255.255.255.0                     unset ge                     unset le                 next

                  edit 2                     set prefix 10.4.10.0  255.255.255.0                     unset ge                     unset le                 next

                   edit 2                     set prefix 10.9.10.0  255.255.255.0                     unset ge                     unset le                 next

    end

     

    config router route-map

    edit "static2ospf"             config rule                 edit 1                     set match-ip-address "netmap"                     set set-metric 17788                     set set-tag 888                 next                 edit 2                 next             end

     

          config redistribute "static"             set status enable             set routemap "static2ospf"             set tag 888

          end

             

     

     

    http://socpuppet.blogspot.com/2015/03/ospf-e2-route-filter-fortigate.html

     

     

    moby
    mobyAuthor
    New Member
    November 24, 2016

    Hi Emnoc,

     

    Ok great  - thanks for your reply. Good point about the asymmetric traffic - I hadn't thought of that one - that may change my mind on this and decide not to bother with trying to load balance the traffic  - just have an active and failover link instead.

     

    Rgds, Moby