bgpctl(8) community question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bgpctl(8) community question

Adam Thompson
[OpenBSD 6.5-STABLE, up to date]

When using bgpctl(8), I'm able to do almost everything I need, but I'm
having trouble figuring out how to do one thing:

How do I show routes that do NOT have a community (or ext-community, or
large-community) attribute?

The best I can come up with so far is a fairly ugly AWK script that
buffers the detailed route output, then emits it if it doesn't see a
Communities: line.  Am I missing a better way?

Thanks,
-Adam

N.B. manually looking through N sets of DFZ route tables isn't going to
happen, I need a mostly-automatic solution.

Reply | Threaded
Open this post in threaded view
|

Re: bgpctl(8) community question

Claudio Jeker
On Mon, Oct 07, 2019 at 04:48:34PM -0500, Adam Thompson wrote:

> [OpenBSD 6.5-STABLE, up to date]
>
> When using bgpctl(8), I'm able to do almost everything I need, but I'm
> having trouble figuring out how to do one thing:
>
> How do I show routes that do NOT have a community (or ext-community, or
> large-community) attribute?
>
> The best I can come up with so far is a fairly ugly AWK script that buffers
> the detailed route output, then emits it if it doesn't see a Communities:
> line.  Am I missing a better way?
>
> Thanks,
> -Adam
>
> N.B. manually looking through N sets of DFZ route tables isn't going to
> happen, I need a mostly-automatic solution.

Currently there is no other way to filter on prefixes which don't have a
community. You can use the ssv output to make the filtering easier or you
tag the prefixes with a different community (first set community on all
routes and then delete community again from those where you set the other
community).
 
Adding a 'not' option to community matching should be possible. I will
look into that after 6.6 is out.

--
:wq Claudio