BGP Confederation

My friend who now work in Dar-es-Salaam, Tanzania, asked me about BGP Confederation. He asked me why we don’t use BGP Confederation on our IP Networks nationwide, so our country just use one AS Number, and every ISP use Private AS Number.

But the answer is, no we can’t. Because the purpose of using BGP as exterior routing protocol between ISPs is to manage routing policy as flexible as possible. One of the routing policy factor is AS-Path list. Unfortunately when we use BGP Confederation, our external BGP Peers (in this point is foreign country AS, as our upstream provider for example) just saw one AS Number, that is the Confederation ID.

The other BGP Confederation characteristic is some BGP Attribute like MED and Local-Preference is can crossing along the BGP Confederation AS members (sub AS). This is the characteristic of IBGP.

This is because the BGP Confederation function is to minimizing the need of full-mesh of the BGP speakers for the IBGP updates. One Autonomous-System (AS) is dividing to several sub AS. Every sub AS is peering with the other using EBGP rule.

Below is an example of the BGP Confederation implementation:

Assumed that the IGP of the AS 100 is already working. These is the network prefixes of every router:

  • R1 = 1.1.1.1/32
  • R2 = 2.2.2.2/32
  • R3 = 3.3.3.3/32
  • R4 = 4.4.4.4/32

AS 100 consist of two sub AS, that is AS 65001 and AS 65002. AS 100 peering with AS 200 via R2. We will find that AS 200 just see AS 100 in the AS-Path list for every prefix that send to AS 200. This is because list of Confederation sub AS attribute is stripped from every prefix that send to the external BGP peers of the AS. Beside that, the global AS number is prepended to the prefixes. See the BGP table of R1 below:

  • R1#sh ip bgp
  • BGP table version is 6, local router ID is 1.1.1.1
  • 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
  • *> 1.1.1.1/32 0.0.0.0 0 32768 i
  • *> 2.2.2.2/32 10.1.1.2 0 0 100 i
  • *> 3.3.3.3/32 10.1.1.2 0 100 i
  • *> 4.4.4.4/32 10.1.1.2 0 100 i
  • * 10.1.1.0/24 10.1.1.2 0 0 100 i
  • *> 0.0.0.0 0 32768 i
  • R1#

If we set the MED or Local-Preference attribute in R2 (for example 200) for every prefixes that receive from R1, we will see that those attributes is send across every sub AS. See the BGP table of R4 below:

  • R4#sh ip bgp
  • BGP table version is 8, local router ID is 4.4.4.4
  • 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
  • *> 1.1.1.1/32 10.1.1.1 200 200 0 (65002) 200 i
  • *> 2.2.2.2/32 10.2.2.1 0 100 0 (65002) i
  • *> 3.3.3.3/32 10.3.3.1 0 100 0 (65002) i
  • *> 4.4.4.4/32 0.0.0.0 0 32768 i
  • *> 10.1.1.0/24 10.2.2.1 0 100 0 (65002) i
  • R4#

CMIIW….

Say your words