Mailing List Archive

[nsp] Load Balancing with BGP over unequal-cost circuits
Hi all,

My understanding is that BGP doesn't do load balancing because of its nature of
selection of best path, however load sharing can be achieved.

I have a customer who is doing load balancing over an E1 (2Mbps) and a 1Mbps
circuit (unequal bandwidth) using BGP, and it seems to work.

Could someone advise how was the load-balancing achieved?

Following is the config :

* Note : Both circuits are terminated to the same router on both ends. *

interface Loopback0
ip address 172.16.255.10 255.255.255.255
!

interface Serial0/1
description ==> Link 1Mbps
bandwidth 1024
ip address 192.168.252.206 255.255.255.252
no ip redirects
no ip proxy-arp
ip load-sharing per-packet
no fair-queue
hold-queue 4096 out
!
interface Serial0/2
description ==> Link 2Mbps
bandwidth 2048
ip address 192.168.252.202 255.255.255.252
no ip redirects
no ip proxy-arp
ip load-sharing per-packet
no fair-queue
hold-queue 1024 out
!

network 172.16.0.0 mask 255.255.192.0
network 172.16.64.0 mask 255.255.192.0
network 172.16.128.0 mask 255.255.192.0
network 172.16.192.0 mask 255.255.192.0
neighbor 192.168.255.202 remote-as 65500
neighbor 192.168.255.202 ebgp-multihop 3
neighbor 192.168.255.202 update-source Loopback0
neighbor 192.168.255.202 version 4
neighbor 192.168.255.202 soft-reconfiguration inbound
neighbor 192.168.255.202 route-map ksc-in in
neighbor 192.168.255.202 route-map ksc-out out

ip route 172.16.0.0 255.255.192.0 Null0
ip route 172.16.64.0 255.255.192.0 Null0
ip route 172.16.128.0 255.255.192.0 Null0
ip route 172.16.192.0 255.255.192.0 Null0
ip route 192.168.255.202 255.255.255.255 Serial0/1
ip route 192.168.255.202 255.255.255.255 Serial0/2


access-list 21 permit any
access-list 22 permit 172.16.0.0 0.0.255.255

route-map ksc-out permit 10
match ip address 22
!

route-map ksc-in permit 10
match ip address 21
set local-preference 500
!

Serial0/1 is up, line protocol is up
Hardware is DSCC4 Serial
Description: ==> Link 1Mbps
Internet address is 192.168.252.206/30
MTU 1500 bytes, BW 1024 Kbit, DLY 20000 usec,
reliability 255/255, txload 242/255, rxload 211/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:00, output 00:00:05, output hang never
Last clearing of "show interface" counters 18:14:54
Queueing strategy: fifo
Output queue 971/4096, 138782 drops; input queue 0/75, 54 drops
5 minute input rate 848000 bits/sec, 213 packets/sec
5 minute output rate 973000 bits/sec, 345 packets/sec

Serial0/2 is up, line protocol is up
Hardware is DSCC4 Serial
Description: ==> Link 2Mbps
Internet address is 192.168.252.202/30
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
reliability 255/255, txload 211/255, rxload 209/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:08, output 00:00:09, output hang never
Last clearing of "show interface" counters 18:17:34
Queueing strategy: fifo
Output queue 1023/1024, 3212912 drops; input queue 0/75, 60 drops
5 minute input rate 1686000 bits/sec, 425 packets/sec
5 minute output rate 1702000 bits/sec, 517 packets/sec


Thanks.

Regards,
Cheeyong
Re: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
The config you've forwarded indicates only a single bgp neighbor.

BGP will, by default, load balance if all available paths are equal, and
you've specified max-paths. BGP to multiple upstreams will not
load-balance due to its nature, but to a single AS, it can be very
effective. IIRC, there is a very intuitive case study on CCO which covers
this nicely.

hth,
brian


On Wed, 2 Oct 2002, Tay Chee Yong wrote:

:Hi all,
:
:My understanding is that BGP doesn't do load balancing because of its nature of
:selection of best path, however load sharing can be achieved.
:
:I have a customer who is doing load balancing over an E1 (2Mbps) and a 1Mbps
:circuit (unequal bandwidth) using BGP, and it seems to work.
:
:Could someone advise how was the load-balancing achieved?
:
:Following is the config :
:
:* Note : Both circuits are terminated to the same router on both ends. *
:
:interface Serial0/1
: description ==> Link 1Mbps
: bandwidth 1024
: ip address 192.168.252.206 255.255.255.252
: no ip redirects
: no ip proxy-arp
: ip load-sharing per-packet
: no fair-queue
: hold-queue 4096 out
:!
:interface Serial0/2
: description ==> Link 2Mbps
: bandwidth 2048
: ip address 192.168.252.202 255.255.255.252
: no ip redirects
: no ip proxy-arp
: ip load-sharing per-packet
: no fair-queue
: hold-queue 1024 out
:!
:
: network 172.16.0.0 mask 255.255.192.0
: network 172.16.64.0 mask 255.255.192.0
: network 172.16.128.0 mask 255.255.192.0
: network 172.16.192.0 mask 255.255.192.0
: neighbor 192.168.255.202 remote-as 65500
: neighbor 192.168.255.202 ebgp-multihop 3
: neighbor 192.168.255.202 update-source Loopback0
: neighbor 192.168.255.202 version 4
: neighbor 192.168.255.202 soft-reconfiguration inbound
: neighbor 192.168.255.202 route-map ksc-in in
: neighbor 192.168.255.202 route-map ksc-out out
:
:ip route 172.16.0.0 255.255.192.0 Null0
:ip route 172.16.64.0 255.255.192.0 Null0
:ip route 172.16.128.0 255.255.192.0 Null0
:ip route 172.16.192.0 255.255.192.0 Null0
:ip route 192.168.255.202 255.255.255.255 Serial0/1
:ip route 192.168.255.202 255.255.255.255 Serial0/2
:
:
:access-list 21 permit any
:access-list 22 permit 172.16.0.0 0.0.255.255
:
:route-map ksc-out permit 10
: match ip address 22
:!
:
:route-map ksc-in permit 10
: match ip address 21
: set local-preference 500
RE: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
Cheeyong,

There's a doc on CCO that explains this but I can't seem to find it. :-(
Basically, here, BGP isn't load sharing but the router is load sharing
to the BGP next hop. All routes that your customer receives have a next
hop of 192.168.255.202 and there are two static routes to this address
using the two serials. Presumably this next hop is the loopback of the
router at the other end and this configuration is duplicated on the
other side. This is why you need the "ebgp-multihop" statement. Needless
to say, this is imperfect load sharing as depending on the route-caching
configuration, you will only load share sessions.
Hope this helps.
Marcus.

-----Original Message-----
From: Tay Chee Yong [mailto:tcy@pacific.net.sg]
Sent: 02 October 2002 14:00
To: cisco-nsp@puck.nether.net
Subject: [nsp] Load Balancing with BGP over unequal-cost circuits


Hi all,

My understanding is that BGP doesn't do load balancing because of its
nature of selection of best path, however load sharing can be achieved.

I have a customer who is doing load balancing over an E1 (2Mbps) and a
1Mbps circuit (unequal bandwidth) using BGP, and it seems to work.

Could someone advise how was the load-balancing achieved?

Following is the config :

* Note : Both circuits are terminated to the same router on both ends. *

interface Loopback0
ip address 172.16.255.10 255.255.255.255
!

interface Serial0/1
description ==> Link 1Mbps
bandwidth 1024
ip address 192.168.252.206 255.255.255.252
no ip redirects
no ip proxy-arp
ip load-sharing per-packet
no fair-queue
hold-queue 4096 out
!
interface Serial0/2
description ==> Link 2Mbps
bandwidth 2048
ip address 192.168.252.202 255.255.255.252
no ip redirects
no ip proxy-arp
ip load-sharing per-packet
no fair-queue
hold-queue 1024 out
!

network 172.16.0.0 mask 255.255.192.0
network 172.16.64.0 mask 255.255.192.0
network 172.16.128.0 mask 255.255.192.0
network 172.16.192.0 mask 255.255.192.0
neighbor 192.168.255.202 remote-as 65500
neighbor 192.168.255.202 ebgp-multihop 3
neighbor 192.168.255.202 update-source Loopback0
neighbor 192.168.255.202 version 4
neighbor 192.168.255.202 soft-reconfiguration inbound
neighbor 192.168.255.202 route-map ksc-in in
neighbor 192.168.255.202 route-map ksc-out out

ip route 172.16.0.0 255.255.192.0 Null0
ip route 172.16.64.0 255.255.192.0 Null0
ip route 172.16.128.0 255.255.192.0 Null0
ip route 172.16.192.0 255.255.192.0 Null0
ip route 192.168.255.202 255.255.255.255 Serial0/1
ip route 192.168.255.202 255.255.255.255 Serial0/2


access-list 21 permit any
access-list 22 permit 172.16.0.0 0.0.255.255

route-map ksc-out permit 10
match ip address 22
!

route-map ksc-in permit 10
match ip address 21
set local-preference 500
!

Serial0/1 is up, line protocol is up
Hardware is DSCC4 Serial
Description: ==> Link 1Mbps
Internet address is 192.168.252.206/30
MTU 1500 bytes, BW 1024 Kbit, DLY 20000 usec,
reliability 255/255, txload 242/255, rxload 211/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:00, output 00:00:05, output hang never
Last clearing of "show interface" counters 18:14:54
Queueing strategy: fifo
Output queue 971/4096, 138782 drops; input queue 0/75, 54 drops
5 minute input rate 848000 bits/sec, 213 packets/sec
5 minute output rate 973000 bits/sec, 345 packets/sec

Serial0/2 is up, line protocol is up
Hardware is DSCC4 Serial
Description: ==> Link 2Mbps
Internet address is 192.168.252.202/30
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
reliability 255/255, txload 211/255, rxload 209/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:08, output 00:00:09, output hang never
Last clearing of "show interface" counters 18:17:34
Queueing strategy: fifo
Output queue 1023/1024, 3212912 drops; input queue 0/75, 60 drops
5 minute input rate 1686000 bits/sec, 425 packets/sec
5 minute output rate 1702000 bits/sec, 517 packets/sec


Thanks.

Regards,
Cheeyong


_______________________________________________
cisco-nsp mailing list real_name)s@puck.nether.net
http://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
Hi Brian,

Yes. It only indicate a single bgp neighbor, as the bgp peering is between the 2
loopback interfaces, that is "binding" the 2 interfaces together with the static
route.

Sorry, but what is IIRC?

Regards,
Cheeyong

On Wed, 2 Oct 2002, Brian Wallingford wrote:

> The config you've forwarded indicates only a single bgp neighbor.
>
> BGP will, by default, load balance if all available paths are equal, and
> you've specified max-paths. BGP to multiple upstreams will not
> load-balance due to its nature, but to a single AS, it can be very
> effective. IIRC, there is a very intuitive case study on CCO which covers
> this nicely.
>
> hth,
> brian
>
>
> On Wed, 2 Oct 2002, Tay Chee Yong wrote:
>
> :Hi all,
> :
> :My understanding is that BGP doesn't do load balancing because of its nature of
> :selection of best path, however load sharing can be achieved.
> :
> :I have a customer who is doing load balancing over an E1 (2Mbps) and a 1Mbps
> :circuit (unequal bandwidth) using BGP, and it seems to work.
> :
> :Could someone advise how was the load-balancing achieved?
> :
> :Following is the config :
> :
> :* Note : Both circuits are terminated to the same router on both ends. *
> :
> :interface Serial0/1
> : description ==> Link 1Mbps
> : bandwidth 1024
> : ip address 192.168.252.206 255.255.255.252
> : no ip redirects
> : no ip proxy-arp
> : ip load-sharing per-packet
> : no fair-queue
> : hold-queue 4096 out
> :!
> :interface Serial0/2
> : description ==> Link 2Mbps
> : bandwidth 2048
> : ip address 192.168.252.202 255.255.255.252
> : no ip redirects
> : no ip proxy-arp
> : ip load-sharing per-packet
> : no fair-queue
> : hold-queue 1024 out
> :!
> :
> : network 172.16.0.0 mask 255.255.192.0
> : network 172.16.64.0 mask 255.255.192.0
> : network 172.16.128.0 mask 255.255.192.0
> : network 172.16.192.0 mask 255.255.192.0
> : neighbor 192.168.255.202 remote-as 65500
> : neighbor 192.168.255.202 ebgp-multihop 3
> : neighbor 192.168.255.202 update-source Loopback0
> : neighbor 192.168.255.202 version 4
> : neighbor 192.168.255.202 soft-reconfiguration inbound
> : neighbor 192.168.255.202 route-map ksc-in in
> : neighbor 192.168.255.202 route-map ksc-out out
> :
> :ip route 172.16.0.0 255.255.192.0 Null0
> :ip route 172.16.64.0 255.255.192.0 Null0
> :ip route 172.16.128.0 255.255.192.0 Null0
> :ip route 172.16.192.0 255.255.192.0 Null0
> :ip route 192.168.255.202 255.255.255.255 Serial0/1
> :ip route 192.168.255.202 255.255.255.255 Serial0/2
> :
> :
> :access-list 21 permit any
> :access-list 22 permit 172.16.0.0 0.0.255.255
> :
> :route-map ksc-out permit 10
> : match ip address 22
> :!
> :
> :route-map ksc-in permit 10
> : match ip address 21
> : set local-preference 500
>
> _______________________________________________
> cisco-nsp mailing list real_name)s@puck.nether.net
> http://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>
RE: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
Hi Marcus,

Thanks for your mail. I do understand your point, just that I am curious at how
does the router cache the route in such a way that lesser routes will flow via
the 1Mbps and more traffic flowing via the 2Mbps.

Hope that the Cisco Engineers on this list and advise the location of the URL
that is explaining this.

Thanks.

Regards,
Cheeyong

On Wed, 2 Oct 2002, Marcus Keane wrote:

> Cheeyong,
>
> There's a doc on CCO that explains this but I can't seem to find it. :-(
> Basically, here, BGP isn't load sharing but the router is load sharing
> to the BGP next hop. All routes that your customer receives have a next
> hop of 192.168.255.202 and there are two static routes to this address
> using the two serials. Presumably this next hop is the loopback of the
> router at the other end and this configuration is duplicated on the
> other side. This is why you need the "ebgp-multihop" statement. Needless
> to say, this is imperfect load sharing as depending on the route-caching
> configuration, you will only load share sessions.
> Hope this helps.
> Marcus.
>
> -----Original Message-----
> From: Tay Chee Yong [mailto:tcy@pacific.net.sg]
> Sent: 02 October 2002 14:00
> To: cisco-nsp@puck.nether.net
> Subject: [nsp] Load Balancing with BGP over unequal-cost circuits
>
>
> Hi all,
>
> My understanding is that BGP doesn't do load balancing because of its
> nature of selection of best path, however load sharing can be achieved.
>
> I have a customer who is doing load balancing over an E1 (2Mbps) and a
> 1Mbps circuit (unequal bandwidth) using BGP, and it seems to work.
>
> Could someone advise how was the load-balancing achieved?
>
> Following is the config :
>
> * Note : Both circuits are terminated to the same router on both ends. *
>
> interface Loopback0
> ip address 172.16.255.10 255.255.255.255
> !
>
> interface Serial0/1
> description ==> Link 1Mbps
> bandwidth 1024
> ip address 192.168.252.206 255.255.255.252
> no ip redirects
> no ip proxy-arp
> ip load-sharing per-packet
> no fair-queue
> hold-queue 4096 out
> !
> interface Serial0/2
> description ==> Link 2Mbps
> bandwidth 2048
> ip address 192.168.252.202 255.255.255.252
> no ip redirects
> no ip proxy-arp
> ip load-sharing per-packet
> no fair-queue
> hold-queue 1024 out
> !
>
> network 172.16.0.0 mask 255.255.192.0
> network 172.16.64.0 mask 255.255.192.0
> network 172.16.128.0 mask 255.255.192.0
> network 172.16.192.0 mask 255.255.192.0
> neighbor 192.168.255.202 remote-as 65500
> neighbor 192.168.255.202 ebgp-multihop 3
> neighbor 192.168.255.202 update-source Loopback0
> neighbor 192.168.255.202 version 4
> neighbor 192.168.255.202 soft-reconfiguration inbound
> neighbor 192.168.255.202 route-map ksc-in in
> neighbor 192.168.255.202 route-map ksc-out out
>
> ip route 172.16.0.0 255.255.192.0 Null0
> ip route 172.16.64.0 255.255.192.0 Null0
> ip route 172.16.128.0 255.255.192.0 Null0
> ip route 172.16.192.0 255.255.192.0 Null0
> ip route 192.168.255.202 255.255.255.255 Serial0/1
> ip route 192.168.255.202 255.255.255.255 Serial0/2
>
>
> access-list 21 permit any
> access-list 22 permit 172.16.0.0 0.0.255.255
>
> route-map ksc-out permit 10
> match ip address 22
> !
>
> route-map ksc-in permit 10
> match ip address 21
> set local-preference 500
> !
>
> Serial0/1 is up, line protocol is up
> Hardware is DSCC4 Serial
> Description: ==> Link 1Mbps
> Internet address is 192.168.252.206/30
> MTU 1500 bytes, BW 1024 Kbit, DLY 20000 usec,
> reliability 255/255, txload 242/255, rxload 211/255
> Encapsulation HDLC, loopback not set
> Keepalive set (10 sec)
> Last input 00:00:00, output 00:00:05, output hang never
> Last clearing of "show interface" counters 18:14:54
> Queueing strategy: fifo
> Output queue 971/4096, 138782 drops; input queue 0/75, 54 drops
> 5 minute input rate 848000 bits/sec, 213 packets/sec
> 5 minute output rate 973000 bits/sec, 345 packets/sec
>
> Serial0/2 is up, line protocol is up
> Hardware is DSCC4 Serial
> Description: ==> Link 2Mbps
> Internet address is 192.168.252.202/30
> MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
> reliability 255/255, txload 211/255, rxload 209/255
> Encapsulation HDLC, loopback not set
> Keepalive set (10 sec)
> Last input 00:00:08, output 00:00:09, output hang never
> Last clearing of "show interface" counters 18:17:34
> Queueing strategy: fifo
> Output queue 1023/1024, 3212912 drops; input queue 0/75, 60 drops
> 5 minute input rate 1686000 bits/sec, 425 packets/sec
> 5 minute output rate 1702000 bits/sec, 517 packets/sec
>
>
> Thanks.
>
> Regards,
> Cheeyong
>
>
> _______________________________________________
> cisco-nsp mailing list real_name)s@puck.nether.net
> http://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>
Re: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
Hi!

On Wed, Oct 02, 2002 at 12:00:13PM +0800, Tay Chee Yong wrote:
> My understanding is that BGP doesn't do load balancing because of its nature of
> selection of best path, however load sharing can be achieved.
> I have a customer who is doing load balancing over an E1 (2Mbps) and a 1Mbps
> circuit (unequal bandwidth) using BGP, and it seems to work.
> Could someone advise how was the load-balancing achieved?

Look at following documents :

http://www.cisco.com/warp/public/459/25.shtml
http://www.cisco.com/warp/public/459/40.html

(BGP Technical Tips may be very useful too:
http://www.cisco.com/warp/public/459/18.html
)

----------------
SY, Jen Lin'kova aka Furry jen@rambler-co.ru
Re: [nsp] Load Balancing with BGP over unequal-cost circuits [ In reply to ]
| Serial0/1 is up, line protocol is up
| reliability 255/255, txload 242/255, rxload 211/255
| Output queue 971/4096, 138782 drops; input queue 0/75, 54 drops

| Serial0/2 is up, line protocol is up
| reliability 255/255, txload 211/255, rxload 209/255
| Output queue 1023/1024, 3212912 drops; input queue 0/75, 60 drops


It seems that the output links are both quite congested, so some of the
load-balancing effect you are seeing is due to a 50%/50% balancing that puts
50% of the sessions on a more congested link, but these sessions converge
(TCP-backoff) to less bandwidth per session.

As some have already pointed out, what the router is doing is next-hop load
balancing, caused by these routes:

|ip route 192.168.255.202 255.255.255.255 Serial0/1
|ip route 192.168.255.202 255.255.255.255 Serial0/2

Try adding another route that would go thru the 2Mbps link and then you'll
have a 33%/66% balancing that is more representative of the scenario.

Rubens Kühl Jr.