Skip to main content
vinceneil666
New Member
May 31, 2018
Question

BGP & OSPF

  • May 31, 2018
  • 8 replies
  • 10998 views

Hi people ! :D 

 

I have two vdoms, connected by a vlink. They have BGP running between them. On one of the vdoms I have some ospf routes - and I want them distributed into my BGP.. but ONLY that one BGP running between the two vdoms.. I cant have the ospf route distributed into any other BGP sessions allready running for other stuff on the firewalls..

 

Having a bit of a hard time getting it to work... routemaps ? yeah ? Any tips ? 

    8 replies

    Toshi_Esumi
    SuperUser
    SuperUser
    May 31, 2018

    After you configured redistribute ospf in bgp config, you need to re-introduce the ospf routes into ospf table to trigger new redistribution.  just disable/re-enable the ospf-interface.

    Toshi_Esumi
    SuperUser
    SuperUser
    May 31, 2018

    And, if you search like "fortigate route-map" on the internet, you can find a bunch of example how to construct prefix-list and route-map like below:

    http://kb.fortinet.com/kb/viewContent.do?externalId=FD30432

     

    ericli_FTNT
    Staff
    Staff
    May 31, 2018

    vinceneil666 wrote:

    Hi people ! :D 

     

    I have two vdoms, connected by a vlink. They have BGP running between them. On one of the vdoms I have some ospf routes - and I want them distributed into my BGP.. but ONLY that one BGP running between the two vdoms.. I cant have the ospf route distributed into any other BGP sessions allready running for other stuff on the firewalls..

     

    Having a bit of a hard time getting it to work... routemaps ? yeah ? Any tips ? 

     

    Prefix-list and route-map would be helpful to filter routes between OSPF/BGP. Let me know if you have difficulty on that. Thanks!

    vinceneil666
    New Member
    June 1, 2018

    Hi, tnx guys.

     

    The issue Im facing is that my fortigate has tons of bgp sessions, and if I do turn on OSPF redist into BGP - then I will have those routes sent out to all my BGP peers.

     

    config router bgp config redistribute "ospf"

    set route-map something-something

     

    Is there a way of creating a routemap on the redist ospf config, so that the OSPF routes are only redistributed to one single AS, and then not messing with any of the others ? 

     

     

    Toshi_Esumi
    SuperUser
    SuperUser
    June 1, 2018

    Then why you wrote this, at the first palce?

    "On one of the vdoms I have some ospf routes - and I want them distributed into my BGP."

     

    If you want to advertise to only limited BGP neighbors, you should set route-maps in BGP neighbor config, and applies them to two groups, 1) neighbors not to advertised, and 2) neighbors to be advertised.

    On the other hand, if you have a lot of OSPF routes and you want to redistribute only some of them into BGP, you should construct a prefix-list to match only those you want to redistribute, then use it in a route-map, and use it under the redistribution section. Examples are below:

     

    config router bgp

        set as xxxx1

        set router-id xxx.xxx.xxx.xxx

        config neighbor

            edit "yyy.yyy.yyy.yyy"

                set soft-reconfiguration ena

                set remote-as  xxxx2

                set route-map-out "ADVERTISE-ROUTEMAP"

            next

            edit "zzz.zzz.zzz.zzz"

               set soft-reconfiguration ena

                set remote-as  xxxx2

                set route-map-out "NOT-ADVERTISE-ROUTEMAP"

            next

     ---<snip>---

        config redistribute "ospf"

            set status ena

            set route-map  "REDIST-ROUTEMAP-NAME"

       end

    ---<snip>---

    end

     

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.