CCIE_Nuggets - BGP : Aggregate address

CCIE_Nuggets - BGP : Aggregate address

Aggregation is a characteristic used by BGP to summarize prefixes. It helps to hide some attributes of the summarized prefixes. The key think is that have to be at least one prefix in a BGP table which is a part of aggregation scope. The newly created prefix has two additional attributes such as:

AGGREGATOR – consist of router information like Router-ID, AS_PATH which does actual job,
ATOMIC_AGGREGATE – inform other routers that some part of BGP attributes are missing like complete AS_PATH, NEXT_HOP.

R_10#sh run | s router
router bgp 65001
bgp router-id 100.10.10.10
bgp log-neighbor-changes
bgp confederation identifier 1000
bgp confederation peers 65002 65003
network 100.10.10.10 mask 255.255.255.255
aggregate-address 100.0.0.0 255.0.0.0
redistribute connected
neighbor 6.10.1.1 remote-as 400
neighbor 7.10.1.1 remote-as 400
neighbor 10.11.1.2 remote-as 65001
neighbor 10.11.1.2 next-hop-self
neighbor 10.12.1.2 remote-as 65001
neighbor 10.12.1.2 next-hop-self

R_13#sh run | s router
router bgp 65003
bgp router-id 100.13.13.13
bgp log-neighbor-changes
bgp confederation identifier 1000
bgp confederation peers 65001 65002
network 100.13.13.13 mask 255.255.255.255
aggregate-address 100.0.0.0 255.0.0.0
redistribute connected
neighbor 8.13.1.1 remote-as 500
neighbor 9.13.1.1 remote-as 500
neighbor 13.14.1.2 remote-as 65003
neighbor 13.14.1.2 next-hop-self
neighbor 13.15.1.2 remote-as 65003
neighbor 13.15.1.2 next-hop-self

Checking on R_1 : The aggregate route is created but the specific subnets are still be advertised

Router#sh ip bgp 100.0.0.0
BGP routing table entry for 100.0.0.0/8, version 76
Paths: (4 available, best #4, table default)
Advertised to update-groups:
1
Refresh Epoch 1
300 500 1000, (aggregated by 1000 100.13.13.13)
1.5.1.2 from 1.5.1.2 (5.5.5.5)
Origin IGP, localpref 100, valid, external, atomic-aggregate
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
300 500 1000, (aggregated by 1000 100.13.13.13)
1.4.1.2 from 1.4.1.2 (4.4.4.4)
Origin IGP, localpref 100, valid, external, atomic-aggregate
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
200 400 1000, (aggregated by 1000 100.10.10.10)
1.2.1.2 from 1.2.1.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external, atomic-aggregate
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
200 400 1000, (aggregated by 1000 100.10.10.10)
1.3.1.2 from 1.3.1.2 (3.3.3.3)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
rx pathid: 0, tx pathid: 0X0

AGGREGATE SUMMARY ONLY

Automatically suppress advertisement of more specific prefixes.

Let’s add the keyword “summary-only”

aggregate-address 100.0.0.0 255.0.0.0 summary-only

Checking on R_10 and R_13 – The “s” means that the specific prefixes have been suppressed.

*> 100.0.0.0 0.0.0.0 32768 i
s> 100.10.10.10/32 0.0.0.0 0 32768 i
s>i 100.11.11.11/32 10.11.1.2 0 100 0 i
s>i 100.12.12.12/32 10.12.1.2 0 100 0 i
s>i 100.14.14.14/32 10.12.1.2 0 100 0 (65003) i
s>i 100.15.15.15/32 10.12.1.2 0 100 0 (65003) i
s>i 100.16.16.16/32 10.12.1.2 0 100 0 (65002) i
s>i 100.17.17.17/32 10.11.1.2 0 100 0 (65002) i
s>i 100.18.18.18/32 10.12.1.2 0 100 0 (65003 65002) i

Checking on R_1, we see that the specific subnets are no longer on the BGP Table

NULL0 ROUTE

To prevent the routing loops from occurring, BGP process creates a new static route to Null0 for every aggregate statement.

R_10#show ip route 100.0.0.0
Routing entry for 100.0.0.0/8, 9 known subnets
Attached (1 connections)
Variably subnetted with 2 masks
Redistributing via bgp 65001
B 100.0.0.0/8 [200/0], 01:44:10, Null0
C 100.10.10.10/32 is directly connected, Loopback0
B 100.11.11.11/32 [200/0] via 10.11.1.2, 00:51:39
B 100.12.12.12/32 [200/0] via 10.12.1.2, 00:51:39
B 100.14.14.14/32 [200/0] via 10.12.1.2, 00:51:39
B 100.15.15.15/32 [200/0] via 10.12.1.2, 00:51:39
B 100.16.16.16/32 [200/0] via 10.12.1.2, 00:51:39
B 100.17.17.17/32 [200/0] via 10.11.1.2, 00:51:39
B 100.18.18.18/32 [200/0] via 10.12.1.2, 00:51:39

SUPPRESS MAP

Selectively suppress advertisement of some prefixes.

R_13(config)# ip prefix-list SUPPRESS permit 100.14.14.14/32
R_13(config)# ip prefix-list SUPPRESS permit 100.11.11.11/32
R_13(config)# ip prefix-list SUPPRESS permit 100.10.10.10/32
R_13(config)# ip prefix-list SUPPRESS permit 100.12.12.12/32
R_13(config)#route-map SUPPRESS_MAP permit 10
R_13(config-route-map)#match ip address prefix-list SUPPRESS
R_13(config-route-map)# router bgp 65003
R_13(config-router)#$address 100.0.0.0 255.0.0.0 suppress-map SUPPRESS_MAP
R_13(config-router)#exit

R_13#show ip prefix-list SUPPRESS
ip prefix-list SUPPRESS: 4 entries
seq 5 permit 100.14.14.14/32
seq 10 permit 100.11.11.11/32
seq 15 permit 100.10.10.10/32
seq 20 permit 100.12.12.12/32

R_10(config)# ip prefix-list SUPPRESS permit 100.14.14.14/32
R_10(config)# ip prefix-list SUPPRESS permit 100.11.11.11/32
R_10(config)# ip prefix-list SUPPRESS permit 100.10.10.10/32
R_10(config)# ip prefix-list SUPPRESS permit 100.12.12.12/32
R_10(config)#route-map SUPPRESS_MAP permit 10
R_10(config-route-map)#match ip address prefix-list SUPPRESS
R_10(config-route-map)# router bgp 65001
R_10(config-router)#$address 100.0.0.0 255.0.0.0 suppress-map SUPPRESS_MAP
R_10(config-router)#exit

As a result, only prefixes that have been included in the prefix-list are suppressed. The other prefixes are advertised along with the aggregate address.

*> 100.0.0.0 0.0.0.0 32768 i
s> 100.10.10.10/32 0.0.0.0 0 32768 i
s>i 100.11.11.11/32 10.11.1.2 0 100 0 i
s>i 100.12.12.12/32 10.12.1.2 0 100 0 i
*>i 100.13.13.13/32 10.12.1.2 0 100 0 (65003) i
s>i 100.14.14.14/32 10.12.1.2 0 100 0 (65003) i
*>i 100.15.15.15/32 10.12.1.2 0 100 0 (65003) i
*>i 100.16.16.16/32 10.12.1.2 0 100 0 (65002) i
*>i 100.17.17.17/32 10.11.1.2 0 100 0 (65002) i


Summary and AS-SET

restore the whole set of AS_PATH information and include it in aggregated prefix, the ATOMIC_AGGREGATE attribute is not needed any more.

Let’s move back and advertise the summary-only

R_13(config-router)#$address 100.0.0.0 255.0.0.0 summary-only

R_10(config-router)#$ddress 100.0.0.0 255.0.0.0 summary-only

Checking R13 / R10 bgp table and focus on the AS path of each prefix

We should see this :

*> 100.0.0.0 0.0.0.0 32768 i
s> 100.10.10.10/32 0.0.0.0 0 32768 i
s>i 100.11.11.11/32 10.11.1.2 0 100 0 i
s>i 100.12.12.12/32 10.12.1.2 0 100 0 i
s>i 100.14.14.14/32 10.12.1.2 0 100 0 (65003) i
s>i 100.15.15.15/32 10.12.1.2 0 100 0 (65003) i
s>i 100.16.16.16/32 10.12.1.2 0 100 0 (65002) i
s>i 100.17.17.17/32 10.11.1.2 0 100 0 (65002) i
s>i 100.18.18.18/32 10.12.1.2 0 100 0 (65003 65002) i
s>i 100.19.19.19/32 10.12.1.2 0 100 0 (65003) 3000 i
s>i 100.20.20.20/32 10.11.1.2 0 100 0 2000 i

  • i 100.0.0.0 10.12.1.1 0 100 0 (65001) i
    *> 0.0.0.0 32768 i
    s>i 100.11.11.11/32 11.12.1.1 0 100 0 (65001) i
    s>i 100.12.12.12/32 12.15.1.1 0 100 0 (65001) i
    s> 100.13.13.13/32 0.0.0.0 0 32768 i
    s>i 100.14.14.14/32 13.14.1.2 0 100 0 i
    s>i 100.15.15.15/32 13.15.1.2 0 100 0 i
    s>i 100.16.16.16/32 12.16.1.2 0 100 0 (65001 65002) i
    s>i 100.17.17.17/32 11.12.1.1 0 100 0 (65001 65002) i
    s>i 100.18.18.18/32 13.14.1.2 0 100 0 (65002) i
    s>i 100.19.19.19/32 13.14.1.2 0 100 0 3000 i
    s>i 100.20.20.20/32 11.12.1.1 0 100 0 (65001) 2000 i

R1 is receiving an aggregate route and the as-path does not include the sub-ases on the confederation nor the ASes of R19 (AS_3000) and R20 (AS_2000)

  • 100.0.0.0 1.2.1.2 0 200 400 1000 i
    *> 1.3.1.2 0 200 400 1000 i
  • 1.4.1.2 0 300 500 1000 i
  • 1.5.1.2 0 300 500 1000 i

R_1#show ip bgp 100.0.0.0
BGP routing table entry for 100.0.0.0/8, version 145
Paths: (4 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
200 400 1000, (aggregated by 1000 100.10.10.10)
1.2.1.2 from 1.2.1.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 1

Now, let’s add the the keyword “as-set”

Adding the below command on both R19 and R20

aggregate-address 100.0.0.0 255.0.0.0 summary-only as-set

If we check on R13 and R10, nothing has changed

*> 100.0.0.0 0.0.0.0 100 32768 {3000,2000} i
s> 100.10.10.10/32 0.0.0.0 0 32768 i
s>i 100.11.11.11/32 10.11.1.2 0 100 0 i
s>i 100.12.12.12/32 10.12.1.2 0 100 0 i
s>i 100.14.14.14/32 10.12.1.2 0 100 0 (65003) i
s>i 100.15.15.15/32 10.12.1.2 0 100 0 (65003) i
s>i 100.16.16.16/32 10.12.1.2 0 100 0 (65002) i
s>i 100.17.17.17/32 10.11.1.2 0 100 0 (65002) i
s>i 100.18.18.18/32 10.12.1.2 0 100 0 (65003 65002) i
s>i 100.19.19.19/32 10.12.1.2 0 100 0 (65003) 3000 i
s>i 100.20.20.20/32 10.11.1.2 0 100 0 2000 i

However, if we take a loo at R1, we can see that the whole as-path is advertised

  • 100.0.0.0 1.2.1.2 0 200 400 1000 {3000,2000} i
  • 1.3.1.2 0 200 400 1000 {3000,2000} i
    *> 1.4.1.2 0 300 500 1000 {3000,2000} i
  • 1.5.1.2 0 300 500 1000 {3000,2000} i

The atomic aggregate is no longer needed

BGP routing table entry for 100.0.0.0/8, version 144
Paths: (4 available, best #3, table default)
Advertised to update-groups:
1
Refresh Epoch 1
200 400 1000 {3000,2000}, (aggregated by 1000 100.10.10.10)
1.2.1.2 from 1.2.1.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
200 400 1000 {3000,2000}, (aggregated by 1000 100.10.10.10)
1.3.1.2 from 1.3.1.2 (3.3.3.3)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
300 500 1000 {3000,2000}, (aggregated by 1000 100.13.13.13)
1.4.1.2 from 1.4.1.2 (4.4.4.4)
Origin IGP, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 1
300 500 1000 {3000,2000}, (aggregated by 1000 100.13.13.13)
1.5.1.2 from 1.5.1.2 (5.5.5.5)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0

Leave a reply

Your email address will not be published. Required fields are marked *