July 15, 2011

BGP Summarization Part 2

BGP Summarization Part 2

Erick N. Borgard CCNP

In part one of BGP Summarization, we looked at the “static route” to Null0 approach to BGP summarization.  We found that we could create a summary route using the network command or with redistribution.  In addition,  I showed how to use the same concept to advertise a default route into BGP.
The last thing that was covered was the correct use of the network command in BGP.

In this blog, we will take a look at the aggregate-address command briefly.  We will not explore any of the options that go along with the aggregate-address command. The options and features will be saved for other documents.  This document will give a brief overview of the aggregate-address command.

Diagram 1-1



Before we dive into the example, it's important to do a bit more digging into what actually happens with BGP route aggregation.  When a BGP router performs route aggregation using the aggregate-address command, the AS path information is lost and the aggregating router sets the atomic aggregate attribute to inform the upstream neighbors that AS path information has been lost.  If the as-set argument is used, BGP AS path information is built.  The atomic aggregate will consist of the aggregating router's ASN and BGP router-id.

eBGP speaking routers use the AS path information to avoid routing loops.(iBGP uses cluster-id in the case the route reflectors are used)  If a router receives a a route and it sees it's own AS in the path, the router will not accept the route information.  When aggregation occurs, the AS path information is lost, thereby creating the possibility of a routing loop.  eBGP speaking routers will hold the AS path information in the in the AS_SEQUENCE segment of the AS path attribute.  This is an ordered list of autonomous systems that the route has passed through with each consecutive autonomous prepending it's own AS in the AS path information.  The use of the as-set argument restores the AS path information for the aggregate in an unordered list.  The same rules apply inside of confederation autonomous systems, the only difference is how it's handled inside the AS and which segments of the AS path attribute are being used.

There are 4 parts to the AS Path attribute. They include the following:

AS_SEQUENCE
An ordered list of AS path information
AS_SET
An unordered list of AS path information
AS_CONFED_SEQ
An ordered list of confederated AS(s) path information
AS_CONFED_SET
An unordered list of confederated AS(s) path information

One thing to remember is that with the “static route” method of summarization, no AS path information is lost.  In our previous example, we used the network command and redistribution to create the summary.  Let's take a lookat R2's entry in the BGP table to see if the atomic aggregate attribute is set on the route.

R2#sh ip bgp 10.10.0.0255.255.192.0
BGP routing table entry for10.10.0.0/18, version 11
Paths: (1 available, best#1, table Default-IP-Routing-Table)
  Advertised to update-groups:
        1
  100
    100.1.1.1 from 100.1.1.1(1.1.1.1)
      Origin IGP, metric 0,local pref 100, valid, external, best

Notice that there is no atomic aggregate attribute set when when the method in part one isused.  Now lets use the aggregate-address command.  By default, when using the aggregate-address command, the router will send the summary and the more specific routes to it's neighbors this is the opposite of the static route method.  We can use the summary-only key word to instruct the router to only send the summary.  Another difference between the two methods is that if we want to use the aggregate-address command, there must be at least one component subnet in the BGP table to form the aggregate route.  This is not the case with the static route method.

Here is the output of R2 after we use the aggregate-address 10.10.0.0 255.255.192.0 command on R1.

R2#sh ip bgp 10.10.0.0255.255.192.0
BGP routing table entry for10.10.0.0/18, version 13
Paths: (1 available, best#1, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to update-groups:
        1
  100, (aggregated by 1001.1.1.1)
    100.1.1.1 from 100.1.1.1(1.1.1.1)
      Origin IGP, metric 0,local pref 100, valid, external,atomic aggregate, best

Here we see that without the use of the as-set argument, the atomic aggregate attribute is set and passed along to it's neighbors.  We can verify this by examining the output of the same command on R3. (Not shown in picture)

R3#sh ip bgp 10.10.0.0255.255.192.0
BGP routing table entry for10.10.0.0/18, version 13
Paths: (1 available, best#1, table Default-IP-Routing-Table)
  Not advertised to any peer
  200 100, (aggregated by100 1.1.1.1)
    101.1.1.2 from 101.1.1.2(2.2.2.2)
      Origin IGP, local pref100, valid, external,atomic-aggregate, best


We can also look at the BGP table on R1 to see that the more specific route has been suppressed.

R1#sh ip bgp
BGP table version is 24,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
*> 10.10.0.0/18     0.0.0.0                      32768 i
s> 10.10.10.0/24    0.0.0.0                      32768 i

Now let's take a look at an example where the as-set argument is used to rebuild the AS path information in an unordered list.  We will use the aggregate-address10.10.0.0 255.255.192.0 as-set summary-only command on R1 and examine the output of the aggregate on R2.

BGP(0): Aggregate processing for IPv4 Unicast
BGP(0): For aggregate 10.10.0.0/18
BGP(0): 10.10.0.0/18 subtree has an entry 10.10.10.0/24
BGP(0): sub-prefix : 10.10.10.0/24
BGP(0): Needs to be re-aggregated
BGP(0): 10.10.0.0/18 subtree has an entry 10.10.10.0/24
BGP(0): 10.10.0.0/18 aggregate has 10.10.10.0/24 more-specific
BGP(0): 10.10.0.0/18 aggregate created, attributes updated
BGP(0): 10.10.0.0/18 subtree has an entry 10.10.0.0/18
BGP(0): 10.10.0.0/18 subtree has another entry 10.10.10.0/24
BGP(0): Found sub-prefix 10.10.10.0/24: suppressed
BGP(0): Found sub-prefix 10.10.20.0/24: suppressed
BGP(0): Found sub-prefix 10.10.30.0/24: suppressed
BGP(0): Found sub-prefix 10.10.40.0/24: suppressed
BGP(0): Found sub-prefix 10.10.50.0/24: suppressed


R2#sh ip bgp 10.10.0.0255.255.192.0
BGP routing table entry for10.10.0.0/18, version 17
Paths: (1 available, best#1, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to update-groups:
        1
  100, (aggregated by 1001.1.1.1)
    100.1.1.1 from 100.1.1.1(1.1.1.1)
      Origin IGP, metric 0,local pref 100, valid, external, best

In this example, notice that the atomic aggregate attribute is not added to the route because the as-set portion of the AS path attribute is used to rebuild AS path information.

The document outlined some of the key differences between using the static route method of BGP summarization and using the aggregate-address command.  There are many more features to the aggregate address command that we will look at in future blogs.

No comments:

Post a Comment