12-06-2019 08:25 AM - edited 12-06-2019 08:32 AM
R1(192.168.1.1) - > (192.168.1.2) R2
R1
--
Advertises 3 routes :
1.1.1.0 with the community value : 200:21 2002:22 2002:52
2.2.2.0 with the community value: 1001:21 1001:22 1002:52
5.5.5.0 with no values
R2
--
Policy list configured with matching community list
ip policy-list vOD_BLOCK permit
match community 52
ip policy-list vOD permit
match community 99
ip community-list 52 permit 2002:52
ip community-list 99 permit 1002:52
R2#show ip bgp 1.1.1.1
BGP routing table entry for 1.1.1.0/24, version 2
Paths: (1 available, best #1, table default)
Advertised to update-groups:
14
Refresh Epoch 1
Local
192.168.1.1 from 192.168.1.1 (33.3.3.3)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Community: 200:21 2002:22 2002:52
rx pathid: 0, tx pathid: 0x0
R2#show ip bgp 2.2.2.2
BGP routing table entry for 2.2.2.0/24, version 3
Paths: (1 available, best #1, table default)
Advertised to update-groups:
14
Refresh Epoch 1
Local
192.168.1.1 from 192.168.1.1 (33.3.3.3)
Origin IGP, metric 123456, localpref 100, valid, internal, best
Community: 1001:21 1001:22 1002:52
rx pathid: 0, tx pathid: 0x0
R2#show ip bgp 5.5.5.5
BGP routing table entry for 5.5.5.5/32, version 4
Paths: (1 available, best #1, table default)
Advertised to update-groups:
14
Refresh Epoch 1
Local
192.168.1.1 from 192.168.1.1 (33.3.3.3)
Origin incomplete, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0
router bgp 1
bgp log-neighbor-changes
neighbor 192.168.1.1 remote-as 1
neighbor 192.168.1.1 route-map TEST22 in
R2#show route-map TEST22
route-map TEST22, deny, sequence 10
Match clauses:
IP Policy lists:
vOD_BLOCK
vOD
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map TEST22, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
The idea is to implement AND logic and filter out routes with the community value 2002:52 and 1002:52 and accept everything else. Apparently I get all the routes in the BGP table on R2.
When I remove "route-map TEST22 permit 20" I get none. What am I missing
R2# show ip bgp
BGP table version is 4, local router ID is 192.168.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 1.1.1.0/24 192.168.1.1 0 100 0 ?
*>i 2.2.2.0/24 192.168.1.1 123456 100 0 i
*>i 5.5.5.5/32 192.168.1.1 0 100 0 ?
Solved! Go to Solution.
12-06-2019 09:39 AM
Hello,
create a route map with 3 route-map clauses
route-map STOP-SOME deny 10
permit community-list 52
route-map STO-SOME deny 20
permit community-list 99
And final
route-map STOP-SOME permit 30
you are forgetting the implicit deny any of a route map
Hope to help
Giuseppe
12-06-2019 09:39 AM
Hello,
create a route map with 3 route-map clauses
route-map STOP-SOME deny 10
permit community-list 52
route-map STO-SOME deny 20
permit community-list 99
And final
route-map STOP-SOME permit 30
you are forgetting the implicit deny any of a route map
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide