04-27-2008 11:27 PM - edited 03-03-2019 09:43 PM
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
04-28-2008 12:04 AM
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
04-28-2008 01:15 AM
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
04-28-2008 02:24 AM
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
04-28-2008 02:45 AM
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
04-28-2008 07:10 AM
I have never tried it on a switch, but I don't see any reason why it shouldn't work. Try it:
http://www.cisco.com/en/US/docs/ios/12_2/switch/command/reference/xrfscmd2.html#wp1072545
Kevin Dorrell
Luxembourg
04-28-2008 08:15 AM
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
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: