BGP load sharing, dual-homed to one SP
Written by jlgaddis on March 22, 2009 – 7:59 pm -Here’s another lab that I just made up using dynamips/dynagen. There is a download link to the .net file I used (modify it as needed) at the bottom of this post.
NOTE: See the video demonstration below!
For this lab, here’s the topology we’re working with:
![[Network Diagram]](http://evilrouters.net/wp-content/uploads/2009/03/bgp-load-sharing-dual-homed-one-isp.png)
Our scenario here is pretty basic. We are AS 65065 and are dual-homed to our service provider, AS 65001. We have two T-1 connections: R1 to R2 and R1 to R3. We’re running BGP with our service provider and we would like to load share our outgoing traffic over these two T-1 connections. Fortunately, Cisco provides us with an easy way to do this.
As you may already know, BGP will, by default, only install the one best path into the routing table. In our case, that means that we would only be utilizing one connection at a given time. That’s not exactly the best use of our available bandwidth. The “maximum-paths” command is our friend.
From the Cisco IOS IP Command Reference:
“To configure the maximum number of parallel routes that an IP routing protocol will install into the routing table, use the maximum-paths command in router configuration or address family configuration mode. To restore the default value, use the no form of this command.”
Here are our starting configurations for R2 and R3:
R2:
interface fastethernet 0/0 ip address 172.16.23.2 255.255.255.0 no shutdown interface serial 1/1 ip address 172.16.12.2 255.255.255.0 no shutdown router bgp 65001 network 172.16.12.0 mask 255.255.255.0 network 172.16.23.0 mask 255.255.255.0 neighbor 172.16.12.1 remote-as 65065 neighbor 172.16.23.3 remote-as 65001 neighbor 172.16.23.3 next-hop-self end
R3:
interface fastethernet 0/0 ip address 172.16.23.3 255.255.255.0 no shutdown interface serial 1/0 ip address 172.16.13.3 255.255.255.0 no shutdown router bgp 65001 network 172.16.13.0 mask 255.255.255.0 network 172.16.23.0 mask 255.255.255.0 neighbor 172.16.13.1 remote-as 65065 neighbor 172.16.23.2 remote-as 65001 neighbor 172.16.23.2 next-hop-self end
The interface configuration for R1 is pretty standard and simple, with perhaps one exception:
interface serial 1/0 ip address 172.16.13.1 255.255.255.0 ip load-sharing per-packet no shutdown interface serial 1/1 ip address 172.16.12.1 255.255.255.0 ip load-sharing per-packet no shutdown
Note the use of “ip load-sharing per-packet”. Cisco’s default is to use per-destination load sharing. You’ll want to evaluate your network to decide which is best for you.
Now, let’s configure BGP on R1 and we’re practically done:
router bgp 65065 maximum-paths 2 neighbor 172.16.12.2 remote-as 65001 neighbor 172.16.13.3 remote-as 65001
The only thing left to do is test and verify. See how I did it in the video below:
Tags: bgp, ccnp, cisco, labs, networking, video | 1 Comment »




March 26th, 2009 at 4:41 am
nice video i must say, is there a way we can download the video and replay any time we need it, since i might not have 24/7 connection to the internet.
please for the load-sharing, i am wondering why you did not use BGp multipath command?
what would have been the reason why?
thanks