Friday, December 14, 2007

Running BGP across parallel serial links

 

Whenever I'm describing the idea of running BGP across parallel serial links with duplicate IP addresses (like I did in the November IP Corner article, Load Balancing in BGP Networks, section External BGP Load Balancing), there's always someone asking “does it really work?” … so I'm enclosing a tested working configuration.

AS 11
AS 12

interface Serial1/1
ip address 10.0.1.9 255.255.255.252
encapsulation ppp
!
interface Serial1/2
ip address 10.0.1.9 255.255.255.252
encapsulation ppp
!
router bgp 11
bgp log-neighbor-changes
neighbor 10.0.1.10 remote-as 12
interface Serial1/1
ip address 10.0.1.10 255.255.255.252
encapsulation ppp
!
interface Serial1/2
ip address 10.0.1.10 255.255.255.252
encapsulation ppp
!
router bgp 12
bgp log-neighbor-changes
network 172.16.0.0
neighbor 10.0.1.9 remote-as 11
!
ip route 172.16.0.0 255.255.0.0 Null0

Here are a few printouts. First the BGP neighbors …

AS11#show ip bgp summary ¦ begin Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.1.10 4 12 13 12 2 0 0 00:09:02 1

… then the BGP routing table …

R2#show ip bgp | begin Network
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 10.0.1.10 0 0 12 i

… and finally the internal details of the CEF entry (that's the only way to actually verify that the load balancing is taking place):

AS11#show ip cef 172.16.0.0 internal
172.16.0.0/16, version 35, epoch 0, per-destination sharing
0 packets, 0 bytes
tag information from 10.0.1.10/32, shared
local tag: 17
via 10.0.1.10, 0 dependencies, recursive
next hop 10.0.1.10, Serial1/1 via 10.0.1.10/32
valid adjacency
tag rewrite with Se1/1, point2point, tags imposed: {}

Recursive load sharing using 10.0.1.10/32
Load distribution: 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 (refcount 2)

Hash OK Interface Address Packets Tags imposed
1 Y Serial1/1 point2point 0 none
2 Y Serial1/2 point2point 0 none
3 Y Serial1/1 point2point 0 none
4 Y Serial1/2 point2point 0 none
5 Y Serial1/1 point2point 0 none
6 Y Serial1/2 point2point 0 none
7 Y Serial1/1 point2point 0 none
8 Y Serial1/2 point2point 0 none
9 Y Serial1/1 point2point 0 none
10 Y Serial1/2 point2point 0 none
11 Y Serial1/1 point2point 0 none
12 Y Serial1/2 point2point 0 none
13 Y Serial1/1 point2point 0 none
14 Y Serial1/2 point2point 0 none
15 Y Serial1/1 point2point 0 none
16 Y Serial1/2 point2point 0 none

Posted to Cisco IOS Hints and Tricks by Ivan Pepelnjak
© Copyright Ivan Pepelnjak