Prerequisites: CCNP level skills.
Personal Note!
Three day trip to Galway (Sun-Tue). Nice distraction but I'm tired like hell today. Fell deeply in love with the town. It must be these 17 thousands young students on the streets. The fountain of Youth!
Note!
R4 loopbacks as per Lab 108.
Topology
Task 1
Configure R4 to advertise loopbacks to 40.x.x.x/16 and 44.4.x.x/19 into BGP. Do not use the network statement. Make sure the prefixes are advertised with the IGP origin code ('i').
Task 2
Configure R1 and R2 aggregation for the prefixes advertised on R4 (in Task 1). Make sure that R5 can see the all AS numbers to reach these two aggregates.
Solution
Task 1
Configure R4 to advertise loopbacks to 40.x.x.x/16 and 44.4.x.x/19 into BGP. Do not use the network statement. Make sure the prefixes are advertised with the IGP origin code ('i').
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
!
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
match ip address prefix-list NET_40
set origin igp
!
route-map CONN_TO_BGP permit 20
match ip address prefix-list NET_44
!
route-map CONN_TO_BGP permit 20
match ip address prefix-list NET_44
set origin igp
!
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
!
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 by R4.
Task 2
Configure R1 and R2 aggregation for the prefixes advertised on R4 (in Task 1). Make sure that R5 can see the all AS numbers to reach these two aggregates.
R1 Configuration:
!
router bgp 10
no synchronization
bgp router-id 172.16.101.1
bgp log-neighbor-changes
network 172.16.101.0 mask 255.255.255.0
aggregate-address 40.0.0.0 255.252.0.0 as-set summary-only
aggregate-address 44.4.0.0 255.255.128.0 as-set summary-only
neighbor 10.1.13.3 remote-as 30
neighbor 10.1.14.4 remote-as 40
no auto-summary
no synchronization
bgp router-id 172.16.101.1
bgp log-neighbor-changes
network 172.16.101.0 mask 255.255.255.0
aggregate-address 40.0.0.0 255.252.0.0 as-set summary-only
aggregate-address 44.4.0.0 255.255.128.0 as-set summary-only
neighbor 10.1.13.3 remote-as 30
neighbor 10.1.14.4 remote-as 40
no auto-summary
!
R2 Configuration:
!
router bgp 20
no synchronization
bgp router-id 172.16.102.2
bgp log-neighbor-changes
network 172.16.102.0 mask 255.255.255.0
aggregate-address 40.0.0.0 255.252.0.0 as-set summary-only
aggregate-address 44.4.0.0 255.255.128.0 as-set summary-only
neighbor 10.1.23.3 remote-as 30
neighbor 10.1.24.4 remote-as 40
no auto-summary
no synchronization
bgp router-id 172.16.102.2
bgp log-neighbor-changes
network 172.16.102.0 mask 255.255.255.0
aggregate-address 40.0.0.0 255.252.0.0 as-set summary-only
aggregate-address 44.4.0.0 255.255.128.0 as-set summary-only
neighbor 10.1.23.3 remote-as 30
neighbor 10.1.24.4 remote-as 40
no auto-summary
!
Pic. 3 - BGP Table on R5.
Notice!
R1 and R2 being aggregating routers remove AS 40 before they advertise the the summary routes. They set two attributes: aggregator and atomic-aggregate. Below picture shows the aggregate route WITHOUT the 'as-set' option.
Pic. 4 - R5's Aggregate without 'AS-SET'.
Pic. 5 - R5's Aggregate with 'AS-SET'.
The 'atomic-aggregate' no longer shows. AS 40 is prepended to aggregate.
Pic. 6 - BGP Table on R5.
Remember that losing information about AS number can cause loops. BGP routers reject prefixes if their own AS shows in the path.