Isso é o que acabei fazendo. Faz sentido para mim e eu acho que é explícito o suficiente (todos os prefixos são listados), que um colega de trabalho poderia ler a configuração e entendê-la.
Configuração de RTR1 - Primária para .234, secundária para .235
conf t
!
router bgp 39152
address-family ipv4
neighbor 172.16.15.14 route-map OUR_ROUTES out
exit-address-family
!
route-map OUR_ROUTES permit 10
description Match Our Primary BGP Ranges
match ip address 10
exit
!
route-map OUR_ROUTES permit 20
description Match Our Secondary BGP Ranges
match ip address 20
set as-path prepend 39152 39152 39152
exit
!
access-list 10 remark OUR_PRIMARY_ROUTES
access-list 10 permit 91.192.234.0
!
access-list 20 remark OUR_SECONDARY_ROUTES
access-list 20 permit 91.192.235.0
!
end
RTR2 Config - Primário para .235, secundário para .234
conf t
!
router bgp 39152
address-family ipv4
neighbor 172.16.17.18 route-map OUR_ROUTES out
exit-address-family
!
route-map OUR_ROUTES permit 10
description Match Our Primary BGP Ranges
match ip address 10
exit
!
route-map OUR_ROUTES permit 20
description Match Our Secondary BGP Ranges
match ip address 20
set as-path prepend 39152 39152 39152
exit
!
access-list 10 remark OUR_PRIMARY_ROUTES
access-list 10 permit 91.192.235.0
!
access-list 20 remark OUR_SECONDARY_ROUTES
access-list 20 permit 91.192.234.0
!
end
BGP Looking Glass com apenas RTR1 online
route-server.as3257.net>sho ip bgp regexp 29550 39152 | begin Network
Network Next Hop Metric LocPrf Weight Path
*> 91.192.234.0/24 213.200.64.93 18 0 3257 5089 29550 39152 i
*> 91.192.235.0/24 213.200.64.93 18 0 3257 2914 29550 39152 39152 39152 39152 i
BGP Looking Glass com apenas RTR2 online
route-server.as3257.net>sho ip bgp regexp 29550 39152 | begin Network
Network Next Hop Metric LocPrf Weight Path
*> 91.192.234.0/24 213.200.64.93 18 0 3257 5089 29550 39152 39152 39152 39152 i
*> 91.192.235.0/24 213.200.64.93 18 0 3257 2914 29550 39152 i
BGP Looking Glass com os dois RTR1 & RTR2 online
route-server.as3257.net>sho ip bgp regexp 29550 39152 | begin Network
Network Next Hop Metric LocPrf Weight Path
*> 91.192.234.0/24 213.200.64.93 18 0 3257 5089 29550 39152 i
*> 91.192.235.0/24 213.200.64.93 18 0 3257 2914 29550 39152 i
As seguintes configurações usam listas de prefixo, mas com correspondência explícita em cada regra de mapa de rotas. É menos provável que as listas de prefixo sejam confusas para meus colegas, do que as ACLs.
Configuração RTR1
conf t
!
router bgp 39152
address-family ipv4
neighbor 172.16.15.14 route-map OUR_ROUTES out
exit-address-family
!
ip prefix-list BGP_PRIMARY_ROUTES seq 5 permit 91.192.234.0/24
!
ip prefix-list BGP_SECONDARY_ROUTES seq 5 permit 91.192.235.0/24
!
route-map OUR_ROUTES permit 10
description Match Our Primary BGP Ranges
match ip address prefix-list BGP_PRIMARY_ROUTES
exit
!
route-map OUR_ROUTES permit 20
description Match Our Secondary BGP Ranges
match ip address prefix-list BGP_SECONDARY_ROUTES
set as-path prepend 39152 39152 39152
exit
!
end
Configuração RTR2
conf t
!
router bgp 39152
address-family ipv4
neighbor 172.16.17.18 route-map OUR_ROUTES out
exit-address-family
!
ip prefix-list BGP_PRIMARY_ROUTES seq 5 permit 91.192.235.0/24
!
ip prefix-list BGP_SECONDARY_ROUTES seq 5 permit 91.192.234.0/24
!
route-map OUR_ROUTES permit 10
description Match Our Primary BGP Ranges
match ip address prefix-list BGP_PRIMARY_ROUTES
exit
!
route-map OUR_ROUTES permit 20
description Match Our Secondary BGP Ranges
match ip address prefix-list BGP_SECONDARY_ROUTES
set as-path prepend 39152 39152 39152
exit
!
end