05-20-2015 11:19 AM - edited 03-05-2019 01:30 AM
Dear Forum,
We have two routers that belong to the same AS Number, and are connected to each other using BGP.
Router A has the following peers:
1)Public Peering Exchange with approx 70K Routes
2)Transit Connection with approx 530K Routes
3)The internal connection to Router B
We are successfully tagging the routes on both the peering and transit with community using the following syntax:
neighbor 80.255.14.101 route-map TRANSIT_ROUTES in
neighbor 195.66.224.254 route-map PEERING_ROUTES in
route-map PEERING_ROUTES permit 10
set community 51852:1001
route-map TRANSIT_ROUTES permit 10
set community 51852:1000
A simple sho ip bgp 8.8.8.8 (Just one sample route) shows routes properly tagged
33891 15169
80.255.14.101 from 80.255.14.101 (81.95.15.241)
Origin IGP, metric 0, localpref 100, weight 40000, valid, external
Community: 51852:1000
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
15169
195.66.224.125 from 195.66.225.230 (195.66.225.230)
Origin IGP, metric 0, localpref 100, weight 40000, valid, external, best
Community: 51852:1001
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 6
We want to advertise from Router A to Router B, only the routes learned from the peering connection. This is the problem we are having. Here is the code that we have in place for that:
ip as-path access-list 10 permit .*
neighbor 190.211.252.41 activate
neighbor 190.211.252.41 send-community
neighbor 190.211.252.41 next-hop-self
neighbor 190.211.252.41 route-map PEERING_ROUTES_OUT out
ip community-list expanded peering permit 51852:1002 51852:1001
route-map PEERING_ROUTES_OUT permit 10
match extcommunity peering
With this syntax Router B is receiving 0 routes.
Any help or direction to documentation would greatly be appreciated.
Thanks in Advance,
James Prado
05-20-2015 03:53 PM
James,
I see several issues with your configuration.
First, the match extcommunity command is not correct for your purposes. This command matches extended communities which you are not using. You have created an expanded community list, meaning that it is expressed as a regular expression, but you are only using standard communities. It is not surprising, then, that router B does not receive any routes - because none of your prefixes carries an extended community so none of them makes it through. You should be using match community instead.
Second, the community list itself is not correct. It specifies two community values in the same regular expression, meaning that the sequence of communities - when expressed as a text string - must match the line as entered, including their order. Clearly, this is not what you want - you want to match routes having a standard community of either 51852:1001 or 51852:1002. For this, a standard community list would be much more appropriate, as follows:
ip community-list 1 permit 51852:1001
ip community-list 1 permit 51852:1002
The complete route-map would then be:
route-map PEERING_ROUTES_OUT permit 10
match community 1
Would you mind trying this out?
Best regards,
Peter
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