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 11AS 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

11 comments:

  1. why on earth wouldn't you use ebgp multi-hop?

    ReplyDelete
  2. Because:

    (A) it poses a slight security risk (although that can be reduced these days).

    (B) you need to configure the routing toward the EBGP next-hop.

    Neither one of these is a big issue, but there's no reason you shouldn't use this feature if it's available.

    ReplyDelete
  3. I wonder if this is widely accepted in the ISP world. For example, if one of the circuits is behaving erratically and need to perform a series of ping packets to confirm, how can I control the ping to travel onto the same circuit and back?

    Honestly this is a neat trick I must admit, but configuing it would require you to disable one serial interface before you can configure the same IP address on another serial interface or else IOS would complain that you have overlapping IP addresses on the box.

    ReplyDelete
  4. @william: The issues you raise are probably the true reasons this trick is not widely used.

    As for configuring it, IOS allows overlapping addresses on WAN links (that's the essence of this design).

    ReplyDelete
  5. Maybe I'm missing something, but... what's wrong with MLPPP for this?

    ReplyDelete
  6. MLPPP is perfect if you can use it. You might have performance/hardware issues (although that should not be too much of a problem lately) or your WAN encapsulation might be something else than PPP.

    ReplyDelete
  7. I might be missing something, but how can you put the same IP address on two interfaces on the same router/vrf? Doesn't the router complain about duplicate IP addresses?

    ReplyDelete
  8. The "trick" is that the router does not complain about overlapping addresses if both interfaces are WAN links (could be even multi-access links like FR/X.25/ATM).

    ReplyDelete
  9. Hopefully not too stupid of a comment. When I lab this using physical interface, frame relay encapsulation, and frame relay maps cef does not load balance.

    However, when I create point-to-point subinterfaces it works identically to what you have described using frame relay encapsulation.

    It really is dependent on the interface being flagged as point-to-point :)

    ReplyDelete
  10. can i use 2 AS number on single BGP running router

    ReplyDelete
  11. No, but you can pretend to be a different AS to a neighbor:

    http://wiki.nil.com/BGP_Local-AS_feature

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.