R1 ---> R2 --------> R3
R2 has default route ann route-map is configured towards R3 outbound.
R2#show run | sec route-map
neighbor 172.16.1.1 route-map rm_to_ce_blue out
route-map rm_to_ce_blue deny 100
description ** Deny prefixes matching policy **
match policy-list rp_lolo_source rp_site_multi_source
route-map rm_to_ce_blue permit 220
description ** Prepend AS on regional default route prefix **
match policy-list rp_regional_scope
set as-path prepend 65265 65265
SEQ 100
R2#show ip policy-list rp_lolo_source
policy-list rp_lolo_source permit
Match clauses:
community (community-list filter): 163
Community (expanded) access list 163
permit 163:12345 ! It is a match
R2#show ip policy-list rp_site_multi_source
policy-list rp_site_multi_source permit
Match clauses:
community (community-list filter): 102
R2#show ip community-list 102
Community (expanded) access list 102
deny _2002:57_ ! IGNORE
deny _2002:80_ ! IGNORE
permit _2002:35_ ! Permit
As a result of SEQ 100 deny clause, community 163:12345 and 2002:35 is matched and the default route is denied to be advertised out.
SEQ 200
R2#show ip policy-list rp_regional_scope
policy-list rp_regional_scope permit
Match clauses:
community (community-list filter): 57
R2#show ip community-list 57
Community standard list 57
permit 2002:57
1. SEQ 100 denies route with communities 163:12345 or 2002:35. Default route matches the logic and denied.
2. SEQ 200 is matches on communities 2002:57, where again default route is a match but it should go out tp R3 but no roures are advertised.
R2#show ip bgp nei 172.16.1.1 advertised-routes
Total number of prefixes 0