RE: BGP load balancing

From: James Matrisciano (jmatrisciano@kenttech.com)
Date: Fri May 27 2005 - 10:50:36 GMT-3


With BGP, once it makes its decision on a way to a destination through
the bgp decision process, it keeps that. So let's say you have two
routes out to the internet. One has three bgp hops to your destination
and the other has two. All values in the decision process are equal
until it gets to hop count, guess who will win....every time? You will
send all your packets to that destination the same way every time unless
you change some thing on the other egress point. Even when you do that,
if you make everything equal for the bgp decision process, higher IP (I
thinks it's higher, although may be lower) will win and all packets to
that destination will choose the one route out.

So lets say you have a network like this

    ----outside----
       | bgp |
router A B
       |_______|
           |
         Switch
You are providing DHCP to several networks.

On routers A and B, set up your eBGP and iBGP. On the interfaces, build
two HSRP or VRRP groups.

Build two DHCP Pools per network, you can still sum them up at the
border routers. In each pool when you do the default network, have
router A then B and in the second pool make router B then A the
selection choices for the default-network command.

I know, seems like a lot of work, but then again, that's bgp!

Now, I am sure there is other ways of doing this, but this is just off
the cuff. Per Packet Load balancing through BGP is not possible, but
someone please correct me if I am wrong. But my thought process on this
is that if you have two ways out, one is 5 hops to the destination
another is 8, and if you load balance per packet, your receiver will get
a bunch of packets that are totally out of wack due to the physical
limitations in getting to the destination.

jm

-----Original Message-----
From: ccie2be [mailto:ccie2be@nyc.rr.com]
Sent: Thursday, May 26, 2005 5:01 PM
To: James Matrisciano; 'Troy Levin'; 'Group Study'
Subject: RE: BGP load balancing

Thanks James.

But, what do you by "true" load-balancing?

Are you referring to per destination vs per packet load-balancing?

Tim

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
James Matrisciano
Sent: Thursday, May 26, 2005 4:45 PM
To: Troy Levin; ccie2be; Group Study
Subject: RE: BGP load balancing

Also, do not forget that as for true load balancing, BGP does not load
balance. You may want to look into something like an HSRP design where
you point half the network one way with a fail over and the other half
the other route with a fail over.

jm

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Troy Levin
Sent: Thursday, May 26, 2005 4:13 PM
To: ccie2be; Group Study
Subject: Re: BGP load balancing

Tim,

Did you try this command?

maximum-paths ibgp
To configure the number of number of equal-cost or unequal-cost routes
that
internal BGP (iBGP) will install in the routing table, use the
maximum-paths
ibgp command in router configuration mode. To restore the default value,
use
the no form of this command.

HTH,

Troy

----- Original Message -----
From: "ccie2be" <ccie2be@nyc.rr.com>
To: "Group Study" <ccielab@groupstudy.com>
Sent: Thursday, May 26, 2005 3:54 PM
Subject: BGP load balancing

> Hi guys,
>
> R2 is learning a default route from 2 ibgp peers. I want R2 to load
> balance
> traffic to destinations beyond its ibgp peers between the 2 ibgp
peers.
>
> I configured the command, maximum-paths 2, on R2, but the default
route
> only
> shows up once in the route table although, as you can see, it's shown
> twice
> in the bgp table. Also note that R2 can ping both next hops shown in
the
> bgp table.
>
> What am I missing?
>
> TIA, Tim
>
> R2#sh ip bgp sum
> BGP router identifier 150.7.2.2, local AS number 200
> BGP table version is 77, main routing table version 77
> 2 network entries using 202 bytes of memory
> 4 path entries using 192 bytes of memory
> 2 BGP path attribute entries using 120 bytes of memory
> 1 BGP AS-PATH entries using 24 bytes of memory
> 0 BGP route-map cache entries using 0 bytes of memory
> 0 BGP filter-list cache entries using 0 bytes of memory
> BGP using 538 total bytes of memory
> BGP activity 17/15 prefixes, 56/52 paths, scan interval 60 secs
>
> Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
> State/PfxRcd
>
> 145.7.245.4 4 200 1306 1307 77 0 0 00:00:54
> 2
> 145.7.245.5 4 200 812 817 77 0 0 00:02:02
> 2
> R2#sh ip bgp
> BGP table version is 77, local router ID is 150.7.2.2
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
> r RIB-failure, S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
> *>i0.0.0.0 145.7.47.7 0 100 0 100 i
> * i 150.7.3.3 0 100 0 100 i
> *>i145.7.0.0 145.7.47.7 0 100 0 100 i
> * i 150.7.3.3 0 100 0 100 i
> R2#sir bgp
> 145.7.0.0/16 is variably subnetted, 9 subnets, 3 masks
> B 145.7.0.0/16 [200/0] via 145.7.47.7, 00:01:26
> B* 0.0.0.0/0 [200/0] via 145.7.47.7, 00:01:26
> R2#f bgp
> router bgp 200
> no synchronization
> bgp router-id 150.7.2.2
> bgp log-neighbor-changes
> neighbor 145.7.245.4 remote-as 200
> neighbor 145.7.245.4 route-reflector-client
> neighbor 145.7.245.5 remote-as 200
> neighbor 145.7.245.5 route-reflector-client
> maximum-paths 2
> no auto-summary
>
>



This archive was generated by hypermail 2.1.4 : Fri Jun 03 2005 - 10:12:03 GMT-3