Skip to main content
Fabio
Explorer III
April 15, 2022
Solved

BGP load balancing active on two links

  • April 15, 2022
  • 15 replies
  • 13399 views

Hello guys,

I have a cluster of Fortigate connected with another couple of FGT with two links in protocol BGP.

I have choose to set one primary and one in backup with the weight.

I would like now share the links in active way mode, to load balacing both of them in upload than in download, so in routing table have for each remote network both the links with the same distance and metric.

This is my conf:

Thanos_GRA (BGP_DR) # sh router bgp
config router bgp
set as 65000
set router-id 2.1.71.238
config neighbor
edit "2.1.71.237"
set description "Gravina_vs_Siziano_1"
set remote-as 1267
set keep-alive-timer 45
set holdtime-timer 120
set connect-timer 60
set weight 200
next
edit "2.1.71.245"
set description "Flaminia_vs_Siziano_2"
set remote-as 1267
set keep-alive-timer 45
set holdtime-timer 120
set connect-timer 60
set weight 90
next
end


Thanos_GRA (BGP_DR) # get router info bgp network 192.168.202.0
VRF 0 BGP routing table entry for 192.168.202.0/24
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
2.1.71.245
Original VRF 0
1267 1267
2.1.71.237 from 2.1.71.237 (151.7.203.107)
Origin IGP metric 0, localpref 100, weight 200, valid, external, best
Extended Community: RT:1267:64921
Last update: Wed Apr 6 12:04:07 2022

Original VRF 0
1267 1267 1267
2.1.71.245 from 2.1.71.245 (151.7.203.107)
Origin IGP metric 0, localpref 100, weight 90, valid, external
Extended Community: RT:1267:64921
Last update: Fri Mar 25 23:17:53 2022

 

Thanos_GRA (BGP_DR) # get router info routing-table details 192.168.202.0/24

Routing table for VRF=0
Routing entry for 192.168.202.0/24
Known via "bgp", distance 20, metric 0, best
Last update 01w1d23h ago
* 2.1.71.237, via VLAN_71 distance 0


If I set the weight at the same value, could i achieve the goal?

Thank you for the answer.

Fabio

Best answer by akristof

Oh, my bad. I took wrong neighbor when I copied it. Yes, I meant 2.1.71.237 :)

15 replies

akristof
Staff
Staff
April 15, 2022

Hello,

Thank you for your question. Yes, it will work. You will need to enable ebgp-multipath and you will need to play with some attributes. For example, I can see that each route has different length of as-path. Other than this, I don't  see any problem.

Fabio
FabioAuthor
Explorer III
April 20, 2022

Hello guys, 

i just applied some config as suggested but i didn't goal the result.. only one link is matching as you see:

 

onfig router bgp
set as 65000
set router-id 2.1.71.238
set ebgp-multipath enable
set ibgp-multipath enable
config neighbor
edit "2.1.71.237"
set description "Gravina_vs_Siziano_1"
set remote-as 1267
set keep-alive-timer 45
set holdtime-timer 120
set connect-timer 60
set weight 200
next
edit "2.1.71.245"
set description "Flaminia_vs_Siziano_2"
set remote-as 1267
set keep-alive-timer 45
set holdtime-timer 120
set connect-timer 60
set weight 200
next
end

 


Thanos_GRA (Siziano_DR) # get router info bgp network 192.168.224.0/23
VRF 0 BGP routing table entry for 192.168.224.0/23
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
2.1.71.245
Original VRF 0
1267 1267 1267
2.1.71.245 from 2.1.71.245 (151.7.203.107)
Origin IGP metric 0, localpref 100, weight 200, valid, external
Extended Community: RT:1267:64921
Last update: Wed Apr 20 12:11:25 2022

Original VRF 0
1267 1267
2.1.71.237 from 2.1.71.237 (151.7.203.107)
Origin IGP metric 0, localpref 100, weight 200, valid, external, best
Extended Community: RT:1267:64921
Last update: Wed Apr 6 12:04:07 2022


Thanos_GRA (Siziano_DR) # get router info routing-table details 192.168.224.0/23

Routing table for VRF=0
Routing entry for 192.168.224.0/23
Known via "bgp", distance 20, metric 0, best
Last update 02w0d00h ago
* 2.1.71.237, via VLAN_71 distance 0

 

 

any idea on as path to change?

 

thank you

akristof
Staff
Staff
April 20, 2022

Hello,

 

As I said, as-path is different. Try to configure as-path prepend on inbound direction:

https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-configure-BGP-AS-prepending/ta-p/190528

Here is route-map configured on outbound direction, but same should work for inbound.

Fabio
FabioAuthor
Explorer III
April 20, 2022

ok :) I try

 

Thank you Akristof

Fabio
FabioAuthor
Explorer III
April 20, 2022

i see the different lenght path of as-path:

Original VRF 0
1267 1267 1267
2.1.71.245 from 2.1.71.245 (151.7.203.107)

and the second ...the best 'cause much short

Original VRF 0
1267 1267
2.1.71.237 from 2.1.71.237 (151.7.203.107)

 

how could change the lenght of as-path ? with route-map ? and the form ?

 

thank you

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.
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