BGP 4+ configuration options

The BGP routing protocol is very rich and offers many options. In this paragraph we will study the most used and useful BGP 4+ options. We describe these options in the IPv6 context, however they are not specific to an address family. Most of them are available with IPv4 too.

Aggregation

../../../../../_images/bgp-4-plus-aggregation.png

BGP 4+ aggregation

This option works in BGP 4+ like in BGP 4. The aggregation of the IPv6 network prefixes within the BGP 4+ tables can be done with the following command:

rt2{myconfig-rtg-bgp-ipv6}aggregate-address PREFIX/M [summary-only] [as-set]

Note

Unlike BGP 4, the BGP 4+ command is executed in the IPv6 address-family context.

The aggregate command originates a new prefix. All aggregation options available to BGP 4 are also available to BGP 4+.

Thus if we consider the example in the figure above. The router rt2 will aggregate the prefixes 2001:1::/48 through 2001:1:3/48.

No aggregation flags

When neither the summary-only flag nor the as-set flag are set, a route with the aggregated PREFIX/M is originated from the BGP router. However the sub-prefixes are still advertised.

Example

rt2{myconfig-rtg}display
router bgp 65520
  neighbor 3ffe:2::2 remote-as 65530
  neighbor 3ffe:1::1 remote-as 65510
  bgp router-id 10.1.1.2
  address-family ipv6
    aggregate-address 2001:1::/32
    neighbor 3ffe:1::1 activate
    neighbor 3ffe:2::2 activate
    network 2001:1:2::/48
    network 2001:1:3::/48
    network 3ffe:1::/64
  exit

Display the BGP table in router rt1:

rt1{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 2001:1::/32 3ffe:1::2 0 65520 i
*> 2001:1::/48 3ffe:1::2 0 65520 65530 i
*> 2001:1:1::/48 3ffe:1::2 0 65520 65530 i
*> 2001:1:2::/48 3ffe:1::2 0 0 65520 i
*> 2001:1:3::/48 3ffe:1::2 0 0 65520 i

* 3ffe:1::/64 3ffe:1::2 0 0 65520 i
*> :: 0 32768 i

Total number of prefixes 6
rt1{}show routing ipv6 bgp 2001:1::/32
BGP routing table entry for 2001:1::/32
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
65520, (aggregated by 65520 10.1.1.2)
3ffe:1::2 from 3ffe:1::2 (10.1.1.2)
(fe80::209:c0ff:fe30:4046)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
Last update: Sat Sep 2 07:23:39 2000

Note

  • The aggregated prefix has the atomic-aggregate attribute, which means that the AS information is lost for the aggregate prefix 2001:1::/32
  • Not to advertise the sub-prefixes, the flag summary-only can be set. Or a prefix-list or a distribute-list can be defined to filter them.

Summary-only aggregation flag

When the summary-only flag is set and the as-set flag is not set, only the route with the aggregated PREFIX/M is originated from the BGP router. The sub-prefixes are not advertised. Moreover the ID of the router is set within the AS-PATH to help traffic engineering.

rt2{myconfig-rtg-bgp-ipv6}aggregate-address 2001:1::/32 summary-only

rt2{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 2001:1::/32 :: 32768 i

s> 2001:1::/48 3ffe:2::2 0 0 65530 i

s> 2001:1:1::/48 3ffe:2::2 0 0 65530 i

s> 2001:1:2::/48 :: 0 32768 i

s> 2001:1:3::/48 :: 0 32768 i

* 3ffe:1::/64 3ffe:1::1 0 0 65510 i
*> :: 0 32768 i

Total number of prefixes 6

The sub-prefixes which have been suppressed are labeled s.

On the remote peer, only the route to 2001:1::/32 is received by the BGP RIB:

rt1{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 2001:1::/32 3ffe:1::2 0 65520 i

* 3ffe:1::/64 3ffe:1::2 0 0 65520 i
*> :: 0 32768 i

Total number of prefixes 2

As-set aggregation flag

When the summary-only flag is not set and the as-set flag is set, a route with the aggregated PREFIX/M is originated from the BGP router. Moreover the information of the previous AS-PATHs is collected into an unordered list called an AS-SET. This AS-SET, that is included within the new AS-PATH originated by the router, can help to avoid some networks loops. However the sub-prefixes are still advertised.

Example

rt2{running-rtg-bgp-ipv6}aggregate-address 2001:1::/32 as-set

The AS information appears between brackets { }. It is an unordered list of the ASes.

rt2{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 2001:1::/32 :: 32768 {65530} i
*> 2001:1::/48 3ffe:2::2 0 0 65530 i
*> 2001:1:1::/48 3ffe:2::2 0 0 65530 i
*> 2001:1:2::/48 :: 0 32768 i
*> 2001:1:3::/48 :: 0 32768 i

* 3ffe:1::/64 3ffe:1::1 0 0 65510 i
*> :: 0 32768 i

Total number of prefixes 6

The route to 2001:1::/32 is not announced with the atomic-aggregate flag anymore. It just has the aggregated flag:

rt2{}show routing ipv6 bgp 2001:1::/32
BGP routing table entry for 2001:1::/32
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  3ffe:1::1 3ffe:2::2
  {65530}, (aggregated by 65520 10.1.1.2)
  :: from :: (10.1.1.2)
    Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best
    Last update: Sat Sep 2 07:37:51 2000

Combined summary-only and as-set aggregation flags

When both the summary-only and as-set flags are set, a route to the aggregated network PREFIX/M is originated from the BGP router. Moreover the information of the previous AS-PATHs is collected into an unordered list called an AS-SET. This AS-SET, that is included within the new AS-PATH originated by the router, can help to avoid some networks loops. The sub-prefixes are no longer advertised.

rt2{myconfig-rtg-bgp-ipv6}aggregate-address 2001:1::/32 summary-only as-set

Example

rt2 BGP 4+ RIB is:

rt2{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

   Network       Next Hop  Metric LocPrf Weight Path
*> 2001:1::/32   ::                      32768 {65530} i
s> 2001:1::/48   3ffe:2::2      0            0 65530 i
s> 2001:1:1::/48 3ffe:2::2      0            0 65530 i
s> 2001:1:2::/48 ::             0        32768 i
s> 2001:1:3::/48 ::                      32768 i
*  3ffe:1::/64   3ffe:1::1      0            0 65510 i
*>               ::             0        32768 i

Total number of prefixes 6

On the remote peer, only the aggregated prefix with the AS-SET is received :

rt1{}show routing ipv6 bgp
BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

   Network       Next Hop  Metric LocPrf Weight Path
*> 2001:1::/32   3ffe:1::2                    0  65520 {65530} i
* 3ffe:1::/64    3ffe:1::2      0             0  65520  i
*>               ::             0         32768 i

Total number of prefixes 2

Confederation

A confederation is a set of many private ASes that are joined to be advertised as a single AS. A confederated AS is a confederation of many ASes that are joined by eBGP and that are running themselves an IGP.

The use cases are:

  • The join of independent ASes into a single AS
  • The support for multi-homed customers
  • To avoid the scaling issues of the full-mesh eBGP routers

To configure a BGP 4+ confederation use the following command, like in BGP 4:

router{conf:myconfig-rtg-bgp}bgp confederation identifier ASN
ASN
Confederation identifier.

Moreover, the union of the private ASes that belong to the same confederation is done with the following command:

router{conf:myconfig-rtg-bgp}bgp confederation peers ASN1 ... ASNn
ASNi
Private ASNs that should be joined.

Example

Configure the following confederation:

../../../../../_images/bgp-plus-confederation.png

BGP+ confederation

Where the following configurations are set:

rt1

eth0_0
  ipaddress 2001:fe::1/64
eth1_0
  ipaddress 3ffe:fe::1/64

rtg
    router bgp 65521
      neighbor 3ffe:fe::5 remote-as 65500
      neighbor 2001:fe::2 remote-as 65521
      neighbor 2001:fe::3 remote-as 65522
      bgp confederation identifier 65520
      bgp confederation peers 65522
      bgp router-id 1.1.1.1
      address-family ipv6
        neighbor 2001:fe::2 activate
        neighbor 2001:fe::3 activate
        neighbor 3ffe:fe::5 activate
      exit

rt2

eth0_0
  ipaddress 2001:fe::2/64
eth1_0
  ipaddress 2001:2::2/64

rtg
    router bgp 65521
      neighbor 2001:fe::1 remote-as 65521
      bgp confederation identifier 65520
      bgp router-id 1.1.1.2
      address-family ipv6
        neighbor 2001:fe::1 activate
        network 2001:2::2/64
      exit

rt3

eth0_0
  ipaddress 2001:fe::3/64
eth1_0
  ipaddress 2001:ff::3/64
loopback
  loop 1 2001:3::1/64

rtg
    router bgp 65522
      neighbor 2001:fe::1 remote-as 65521
      neighbor 2001:ff::4 remote-as 65522
      bgp confederation identifier 65520
      bgp confederation peers 65521
      bgp router-id 1.1.1.3
      address-family ipv6
        neighbor 2001:fe::1 activate
        neighbor 2001:ff::4 activate
        network 2001:3::/64
      exit

rt4

eth0_0
  ipaddress 2001:4::4/64
eth1_0
  ipaddress 2001:ff::4/64

rtg
  router bgp 65522
    neighbor 2001:ff::3 remote-as 65522
    bgp confederation identifier 65520
    bgp router-id 1.1.1.4
    address-family ipv6
      neighbor 2001:ff::3 activate
      network 2001:4::/64
    exit

However, when rt5 peers with rt1, it peers to the AS 65520 that is rt1’s BGP confederation identifier. It does not peer to the AS 65521 that is internal to the AS 65520:

rt5

eth0_0
  ipaddress 3ffe:1::1/64
eth1_0
  ipaddress 3ffe:fe::5/64

rtg
  router bgp 65500
    neighbor 3ffe:fe::1 remote-as 65520
    bgp router-id 1.1.1.5
    address-family ipv6
      neighbor 3ffe:fe::1 activate
      network 3ffe:1::/32
    exit

You can check this configuration on rt3 that displays the confederation path between parentheses:

rt3{}show routing ipv6 bgp
BGP table version is 0, local router ID is 1.1.1.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

   Network      Next Hop    Metric LocPrf Weight Path
*> 2001:2::/64  2001:fe::2       0    100      0 (65521) i
*> 2001:3::/64  ::               0         32768 i
*>i2001:4::/64  2001:ff::4       0    100      0 i
*> 3ffe:1::/32  3ffe:fe::5       0    100      0 (65521) 65500 i

Total number of prefixes 4

rt3{}show routing ipv6 bgp 3ffe:1::
BGP routing table entry for 3ffe:1::/32
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  2001:ff::4
  (65521) 65500
    3ffe:fe::5 from 2001:fe::1 (1.1.1.1)
    (fe80::209:c0ff:fe30:404a)
      Origin IGP, metric 0, localpref 100, valid, confed-external, best
      Last update: Mon Sep 4 01:30:26 2000

Then the FIB of rt3 is:

rt3{}show routing ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPF v3,
       B - BGP, D - DEP, N - NAT-PT, * - FIB route.

C>* ::/96 is directly connected, tu0
C>* ::1/128 is directly connected, lo0
B>* 2001:2::/64 [200/0] via fe80::209:c0ff:fe30:404a, eth0_0, 00:17:03
C>* 2001:3::/64 is directly connected, loop1
B>* 2001:4::/64 [200/0] via fe80::209:c0ff:fe30:435d, eth1_0, 16:31:20
C>* 2001:fe::/64 is directly connected, eth0_0
C>* 2001:ff::/64 is directly connected, eth1_0
B>* 3ffe:1::/32 [200/0] via fe80::209:c0ff:fe30:404a, eth0_0, 16:40:21
C * fe80::/64 is directly connected, eth1_0
C * fe80::/64 is directly connected, eth0_0
C>* fe80::/64 is directly connected, lo0

Note

rt3 can route to the AS65500 that owns the prefix 3ffe:1::/32 whereas on the Figure 12 - BGP 4 confederation (p. 66) rt3 could not reach the AS65500’s next-hop.