I would like the ability to conditionally control the announcement of my local default-route generated by my internet edge routers (back to the core) by matching any routes received with the following BGP communities applied:
I would like to classify traffic coming in from our ISP using these two communities.
ABCDE:1239 (ISP AS only)
ABCDE:1 (All other AS's)
Is it possible to conditionally control a locally generated default-route by doing the following:
if bgp table has entries no entries for any bgp communities or only bgp community ABCDE:1239,
then do not send default-route to the core.
if bgp table has entries for communities ABCDE:1239 and ABCDE:1,
then send default-route to the core.
Since this is a not a default route that I am receiving from my ISP, but is one that I am generating locally, I am not sure how I can trigger a default route by matching a condition of received BGP communities (rather than a default route or less specific route).
Before going any further, I was wondering if this is even possible to do, since I haven't been able to make it work successfully so far.