Friday, April 15, 2011

Lab 108 - BGP Aggregation using Aggregate-Address

Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
On R4 the following loopbacks should be advertised into BGP. Do not use network statement.
  • Loopback 3 = 40.0.0.1/16
  • Loopback 4 = 40.1.0.1/16
  • Loopback 5 = 40.2.0.1/16
  • Loopback 6 = 40.3.0.1/16
  • Loopback 7 = 44.4.0.1/19
  • Loopback 8 = 44.4.32.1/19
  • Loopback 9 = 44.4.64.1/19
  • Loopback 10 = 44.4.96.1/19
Task 2
Summarize all prefixes 40.x.x.x to one prefix only. Summarize prefixes 44.x.x.x but make sure that more specific prefixes are also advertised. Use BGP aggregation command to accomplish this.

Solution

Task 1
On R4 the following loopbacks should be advertised into BGP. Do not use network statement.
  • Loopback 3 = 40.0.0.1/16
  • Loopback 4 = 40.1.0.1/16
  • Loopback 5 = 40.2.0.1/16
  • Loopback 6 = 40.3.0.1/16
  • Loopback 7 = 44.4.0.1/19
  • Loopback 8 = 44.4.32.1/19
  • Loopback 9 = 44.4.64.1/19
  • Loopback 10 = 44.4.96.1/19
R4 Configuration:
!
ip prefix-list NET_40 seq 5 permit 40.0.0.0/8 le 16
ip prefix-list NET_44 seq 5 permit 44.4.0.0/16 le 19
!
route-map CONN_TO_BGP permit 10
 match ip address prefix-list NET_40
!
route-map CONN_TO_BGP permit 20
 match ip address prefix-list NET_44
!
router bgp 40
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 redistribute connected route-map CONN_TO_BGP
 neighbor 10.1.14.1 remote-as 10
 neighbor 10.1.24.2 remote-as 20
 no auto-summary
!

Verification:
Pic. 2 - BGP Prefixes Originated locally on R4.


Notice!
Prefixes originated by the router have next-hop attribute set to '0.0.0.0' and weight set to 32768. Prefixes redistributed use Origin incomplete '?'

Task 2

Summarize all prefixes 40.x.x.x to one prefix only. Summarize prefixes 44.x.x.x but make sure that more specific prefixes are also advertised. Use BGP aggregation command to accomplish this.
R4 Configuration:
!
router bgp 40
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 aggregate-address 40.0.0.0 255.252.0.0 summary-only
 aggregate-address 44.4.0.0 255.255.128.0
 redistribute connected route-map CONN_TO_BGP
 neighbor 10.1.14.1 remote-as 10
 neighbor 10.1.24.2 remote-as 20
 no auto-summary
!

Verification:
Pic. 3 - BGP Table on R4.

Notice!
R4 suppresses 's' more specific routes if 'summary-only' command is used. Only 40.0.0.0/14 is going to be advertised.
If 'summary-only' command is NOT used, the router creates the aggregate route and advertises it with addition to more specific routes.

Pic. 4 - Routing Table on R4.
Notice!
Similarly to other routing protocols the entry to 'null0' is created for the summary route as a loop prevention mechanism.

Pic. 5 - AS 40 Prefixes Learned on R5 .

Notice!
All prefixes 44.x.x.x AND the summary route are propageted. The prefix 40.x.x.x is the only summary route since 'summary-only' keyword has been used.