09-06-2011 11:59 AM - edited 03-04-2019 01:31 PM
All,
I'm looking at local-as community for BGP. From my testing, if I have an edge router connected to an ISP router and an internal iBGP neighbor, the community string doesn't take effect. It seems that the route still advertises unless I place the route and community string on a neighbor that only has peerings with others in the same AS. Does that seem to be the case?
If I have:
Router A (ISP) <--- Edge Router <-----Internal router
If I advertise 5.5.5.0/24 on Edge router with a route-map setting the community of local-as, Router A gets the route with the community name set. The internal router also gets it with the community name set.
If I advertise 5.5.5.0/24 on the Internal router with the route-map setting the community value, the Edge router gets it, but Router A doesn't.
It seems that I would need to do some outbound filtering if I had a route that needed to be advertised internal that was originated on the edge router if I didn't want Router A to get it.
Thanks,
John
Solved! Go to Solution.
09-06-2011 12:26 PM
John,
Expected behavior on communities, they are used on the receiving router to determine how to treat the received route.
Think about this other scenario, can you apply a community of 1:1 to a subnet and on the same router block on that subnet using a route-map that matches that community? The answer is no.
However, you can match on 1:1 on the receiving router and block the subnet if you wish.
09-06-2011 12:26 PM
John,
Expected behavior on communities, they are used on the receiving router to determine how to treat the received route.
Think about this other scenario, can you apply a community of 1:1 to a subnet and on the same router block on that subnet using a route-map that matches that community? The answer is no.
However, you can match on 1:1 on the receiving router and block the subnet if you wish.
09-06-2011 12:35 PM
Makes sense...thanks Edison!
09-06-2011 12:39 PM
John,
Think of this: the outbound route map on Edge towards A modifies the attributes of those routes that have been already selected by internal BGP mechanisms to be advertised. Note that these routes - before advertising them to A - do not have the local-as community set yet, so the BGP on Edge has no reason to not advertise these routes to A. Only during the process of advertising them to A, the local-as community gets added.
This also explains the difference when the local-as community is added when advertising routes from internal routes. As the route already has the local-as community set when stored in Edge Loc-RIB, the Edge can already honor it when advertising routes to A.
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