BGP load balancing

Unanswered Question
Apr 27th, 2008
User Badges:

Hi,

I have the following topology in my lab setup.

|PC-1| - |DUT A| - |DUT B| - |PC-2|


I have redundant links between DUT A and DUT B(not shown in the diagram). Following is the config.

----------------------

DUT A Configuration

==================

!

interface Loopback0

ip address 26.26.26.26 255.255.255.255

!

!

interface GigabitEthernet4/2

no switchport

ip address 1.1.1.1 255.255.255.0

!

interface GigabitEthernet4/6

no switchport

ip address 5.5.5.1 255.255.255.0

!

interface GigabitEthernet4/7

no switchport

ip address 11.11.11.1 255.255.255.0

!

router bgp 200

no synchronization

bgp log-neighbor-changes

neighbor 5.5.5.2 remote-as 100

neighbor 25.25.25.25 remote-as 400

neighbor 25.25.25.25 ebgp-multihop 255

neighbor 25.25.25.25 update-source Loopback0

no auto-summary

!

ip route 25.25.25.25 255.255.255.255 1.1.1.2

ip route 25.25.25.25 255.255.255.255 11.11.11.2

!


DUT B Config:

!

interface Loopback0

ip address 25.25.25.25 255.255.255.255

!

!

interface GigabitEthernet1/2

no switchport

ip address 1.1.1.2 255.255.255.0

!

interface GigabitEthernet1/4

no switchport

ip address 10.10.10.1 255.255.255.0

!

interface GigabitEthernet1/7

no switchport

ip address 11.11.11.2 255.255.255.0

!

router bgp 400

no synchronization

bgp log-neighbor-changes

neighbor 10.10.10.2 remote-as 300

neighbor 26.26.26.26 remote-as 200

neighbor 26.26.26.26 ebgp-multihop 255

neighbor 26.26.26.26 update-source Loopback0

no auto-summary

!

ip route 26.26.26.26 255.255.255.255 1.1.1.1

ip route 26.26.26.26 255.255.255.255 11.11.11.1

!


Here, what I expected is - when I send traffic from Pc1 to pc2, load balancing must happen at DUT gress interfaces ie gi4/2 and gi4/7 in this diagram. But what I am seeing is entire traffic is going through one link only. If that link fails, then it will start using second link. Can anyone tell me how to do load balancing simulataneously on both the links ie both links should be used simultaneously. I have configured "maximum paths 2" also. It did not help.


Thanks in advance

Balajee

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Kevin Dorrell Mon, 04/28/2008 - 00:04
User Badges:
  • Green, 3000 points or more

For BGP load balancing to occur, the two paths must have exactly the same attributes all the way down to the MED, inclusive, but (obviously) should have different next-hops. Please could you do a show ip bgp for the prefix you are interested in balancing, and let us compare the attributes.


Kevin Dorrell

Luxembourg


balajee Mon, 04/28/2008 - 01:15
User Badges:

Hi,

This is the ouput.

kch_dut1#sh ip bgp

BGP table version is 13, local router ID is 26.26.26.26

Status codes: s suppressed, d damped, h history, * valid, > best, i - inter

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete


Network Next Hop Metric LocPrf Weight Path

*> 5.5.5.0/24 0.0.0.0 0 32768 i

*> 10.10.10.0/24 25.25.25.25 0 0 400 i

*> 70.70.10.0/24 25.25.25.25 0 400 300 i

*> 70.70.20.0/24 25.25.25.25 0 400 300 i

*> 70.70.30.0/24 25.25.25.25 0 400 300 i

*> 70.70.40.0/24 25.25.25.25 0 400 300 i

*> 70.70.50.0/24 25.25.25.25 0 400 300 i

*> 80.80.10.0/24 5.5.5.2 0 100 i

*> 80.80.20.0/24 5.5.5.2 0 100 i

*> 80.80.30.0/24 5.5.5.2 0 100 i

*> 80.80.40.0/24 5.5.5.2 0 100 i

*> 80.80.50.0/24 5.5.5.2 0 100 i

kch_dut1#



Both the links have same attributes and metric.


Thanks,

Balajee

Kevin Dorrell Mon, 04/28/2008 - 02:24
User Badges:
  • Green, 3000 points or more

Oh, I see, you want to load balance the traffic between the two links connecting AS200 and AS400?


Since your peering is via loopbacks 25.25.25.25 <--> 26.26.26.26, I see no evidence yet that the traffic is not load balancing. It will depend on your routing in each box to the next-hop. So, go to DUT A and do a show ip route 25.25.25.25. How many routes do you see? You should see your two static routes. If you see 2 routes, then load-balancing is working.


This is nothing really to do with BGP load balancing, which is a different situation altogether. So the bgp max-paths is irrelevant. Instead, it is to do with load balancing across two links to get to a single next-hop. That is more like IGP load balancing.


Be aware that if you are testing with only one PC to another PC, that constitutes a single flow of traffic. By default, load sharing between two routes is "per-destination". That is, traffic from PC1 to PC2 will always go down one particular line. Thraffic from PC1 to PC3 might go down the other line. But always one line for a particular flow.


Kevin Dorrell

Luxembourg


balajee Mon, 04/28/2008 - 02:45
User Badges:

Hi,

Thanks for giving the great info. Can we configure "per packet" load balancing on layer-3 switches instead of per-detination load balancing? If yes, how to configure?


Thanks,

Balajee

lamav Mon, 04/28/2008 - 08:15
User Badges:
  • Blue, 1500 points or more

Balajee:


This is just a lab set up, so I dont know if you care about this or not, but if you do enable per-packet load sharing, you will have to configure the outbound interface for process switching using the no ip route-cache interface command. As you probably already know, process switching is more processor-intensive and time consuming than fast switching. So, you do get the kind of load baancing you want, but at a cost that may or may not be an issue for your environment.


Just something to think about is all...


Victor


Actions

This Discussion