Skip to main content
trixsta
New Member
April 20, 2021
Question

BGP Migration from static

  • April 20, 2021
  • 1 reply
  • 12086 views

Hi,

 

Migrating from Static routing to BGP and adding a second MPLS and I've only used RIP.

So when the primary WWW & WAN were to fail we.d failover to Secondary WWW &WAN. We don't have control over the Primary and secondary routers, just our FortiGate,s and have been provided BGP details.

 

BGP Detail is below and I'm looking for guidance on getting this BGP info (also prepending) configured in our 300D (Active-passive) 6.2.5

 

WWW Vlan's are in SDWAN

 

Primary WAN/WWW

 

WAN Pri  Vlan v820

Remote IP x.x.x.66/31

remote AS 420000053

Our IP x.x.x.67/31

Our AS 420000207

No Pre Pending

 

WWW Pri Vlan 810

Remote IP x.x.x.8/31

remote AS 420000051

Our IP x.x.x.9/31

Our AS 420000208

No Pre Pending

 

Secondary WAN/WWW

 

WAN Sec Vlan 821

Remote IP x.x.x.60/31

remote AS 420000053

Our IP x.x.x.61/31

Our AS 420000207

Prepend x2

 

WWW Sec Vlan 811

Remote IP x.x.x.2/31

remote AS 420000053

Our IP x.x.x.3/31

Our AS 420000208

Prepend x2

 

 

 

Thanks,

 

 

 

 

 

    1 reply

    Toshi_Esumi
    SuperUser
    SuperUser
    April 21, 2021

    We regularly don't use AS prepend so basically I would do what you need to do in case it's required: Internet Search! I found two KBs.

    https://kb.fortinet.com/kb/documentLink.do?externalID=FD39448

    https://kb.fortinet.com/kb/documentLink.do?externalID=FD31868

    Both use 2bytes private ASN but your case is 4byte ones 42xxxxxxx. Just number difference so don't worry. You just need to get used to how to use route-maps and set up neighbors. The key requirement is you seems to be expected to append the same ASN on the secondary side at least two times (I would add three or more, which shouldn't hurt) when you advertise your local routes over the secondary.

    For route receiving side, the second KB is using local preference to set higher preference on the primary side. We usually set local preference lower on the secondary side instead. Either way would work.

    So you need to take care of those advertisement side and receiving side. One you got use to those, you would realize there are multiple ways to accomplish your goal.

    trixsta
    trixstaAuthor
    New Member
    May 20, 2021

    Update: We managed to get this going with the below config

     

    I have another question:  We need to restrict receiving & sending all routes over the WWW Pri & WWW Sec internet interfaces and only accept the default route advertised.

    We also have some public address ranges provided by our ISP ( previously routed to us using static routes on their core) but we now need to advertise these public ranges to them, These are not configured on connected interfaces on our FortiGate.

     

    Any help or point me in the right direction would be apprecated 

     

     

    Config used for the BGP setup:

     

    config router route-map     edit "Secondary_ISP_WWW"         config rule             edit 1                 set set-aspath "4200002028 4200002028 4200002028"             next         end     next end config router route-map     edit "Secondary_ISP_WAN"         config rule             edit 1                 set set-aspath "4200002027 4200002027 4200002027"             next         end     next end Route-map that sets higher local preference for prefixes received from Primary ISP: config router route-map     edit "Primary_ISP_WWW"         config rule             edit 1                 set set-local-preference 200                 set set-aspath "4200002028"             next         end     next end config router route-map     edit "Primary_ISP_WAN"         config rule             edit 1                 set set-local-preference 200                 set set-aspath "4200002027"             next         end     next end The route-maps are applied to both BGP neighbors: config router bgp     set as 4200002027         config neighbor             edit "x.x.x.66"                 set remote-as 4200000533                 set local-as 4200002027                 set route-map-in “Primary_ISP_WAN”             next             edit "x.x.x.60"                 set remote-as 4200000533                 set local-as 4200002027                 set route-map-out "Secondary_ISP_WAN"             next         end config router bgp     set as 4200002028         config neighbor             edit "x.x.x.8"                 set remote-as 4200000531                 set route-map-in “Primary_ISP_WWW”             next             edit "x.x.x.2"                 set remote-as 4200000531                 set route-map-out "Secondary_ISP_WWW"             next         end end

    Toshi_Esumi
    SuperUser
    SuperUser
    May 20, 2021

    You need to split route-maps to 1) receiving and 2) advertisement, then 1) is applied to "route-map-in" and 2) is applied to "route-map-out" for each neighbor.

    Obviously the local pref setting is in 1),  then AS prepending is in 2) like in the KB: https://kb.fortinet.com/k....do?externalID=FD39448